'.1.3.6.1.4.1.3854.1.2.2.1.17.1.23', 'sensorProbeHumidityDescription' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.1', 'sensorProbeSensorType' => '.1.3.6.1.4.1.3854.1.2.2.1.18.1.9', 'sensorProbeHumidityStatus' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.4', 'sensorProbeHumidityOnline' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.5', 'sensorProbeHumidityHighWarning' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.7', 'sensorProbeHumidityHighCritical' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.8', 'sensorProbeHumidityLowWarning' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.9', 'sensorProbeHumidityLowCritical' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.10', 'sensorProbeHumidityPercent' => '.1.3.6.1.4.1.3854.1.2.2.1.17.1.3' ]; $xml_delimiter = '!'; // all required input parms $hostname = $_SERVER['argv'][1]; // hostname/IP@ $snmp_community = $_SERVER['argv'][2]; $snmp_version = intval($_SERVER['argv'][3]); $snmp_port = intval($_SERVER['argv'][4]); $snmp_timeout = intval($_SERVER['argv'][5]); $max_oids = intval($_SERVER['argv'][6]); // required for SNMP V3 $snmp_auth_username = $_SERVER['argv'][7]; $snmp_auth_password = $_SERVER['argv'][8]; $snmp_auth_protocol = $_SERVER['argv'][9]; $snmp_priv_passphrase = $_SERVER['argv'][10]; $snmp_priv_protocol = $_SERVER['argv'][11]; $snmp_context = $_SERVER['argv'][12]; $cmd = $_SERVER['argv'][13]; if (isset($_SERVER['argv'][14])) { $query_field = $_SERVER['argv'][14]; } if (isset($_SERVER['argv'][15])) { $query_index = $_SERVER['argv'][15]; } // get number of snmp retries from global settings $snmp_retries = intval(read_config_option('snmp_retries')); // ------------------------------------------------------------------------- // main code starts here // ------------------------------------------------------------------------- // ------------------------------------------------------------------------- // script MUST respond to index queries // the command for this is defined within the XML file as // index // you may replace the string "index" both in the XML and here // ------------------------------------------------------------------------- // php -q