| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | #!/usr/bin/php
 | 
					
						
							|  |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-10 11:47:27 +00:00
										 |  |  | ### ObserverNMS Device Poller
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-27 14:44:38 +00:00
										 |  |  | include("includes/defaults.inc.php"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | include("config.php"); | 
					
						
							|  |  |  | include("includes/functions.php"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $poller_start = utime(); | 
					
						
							| 
									
										
										
										
											2010-07-10 11:47:27 +00:00
										 |  |  | echo("ObserverNMS Poller v".$config['version']."\n\n"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  | $options = getopt("h:t:i:n:d::a::"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if ($options['h'] == "odd") { | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   $where = "AND MOD(device_id,2) = 1";  $doing = $options['h']; | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | } elseif ($options['h'] == "even") { | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   $where = "AND MOD(device_id,2) = 0";  $doing = $options['h']; | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | } elseif ($options['h'] == "all") { | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   $where = " ";  $doing = "all"; | 
					
						
							|  |  |  | } elseif ($options['h']) { | 
					
						
							|  |  |  |   if (is_numeric($options['h'])) | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     $where = "AND `device_id` = '".$options['h']."'";  $doing = "Host ".$options['h']; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   else | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     $where = "AND `hostname` LIKE '".str_replace('*','%',mres($options['h']))."'";  $doing = "Host ".$options['h']; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } elseif ($options['i'] && isset($options['n'])) { | 
					
						
							|  |  |  |   $where = "AND MOD(device_id,".$options['i'].") = '" . $options['n'] . "'";  $doing = "Proc ".$options['n'] ."/".$options['i']; | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  | if (!$where) { | 
					
						
							|  |  |  |   echo("-h <device id> | <device hostname>  Poll single device\n"); | 
					
						
							|  |  |  |   echo("-h odd                              Poll odd numbered devices  (same as -i 2 -n 0)\n"); | 
					
						
							|  |  |  |   echo("-h even                             Poll even numbered devices (same as -i 2 -n 1)\n"); | 
					
						
							|  |  |  |   echo("-h all                              Poll all devices\n\n"); | 
					
						
							|  |  |  |   echo("-i <instances> -n <number>          Poll as instance <number> of <instances>\n"); | 
					
						
							|  |  |  |   echo("                                    Instances start at 0. 0-3 for -n 4\n\n"); | 
					
						
							|  |  |  |   echo("-d                                  Enable some debugging output\n"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  |   echo("\n"); | 
					
						
							|  |  |  |   echo("No polling type specified!\n"); | 
					
						
							|  |  |  |   exit; | 
					
						
							|  |  |  |  } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  | if (isset($options['d'])) { echo("DEBUG!\n"); $debug = 1; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  | echo("Starting polling run:\n\n"); | 
					
						
							|  |  |  | $polled_devices = 0; | 
					
						
							|  |  |  | $device_query = mysql_query("SELECT * FROM `devices` WHERE `ignore` = 0 AND `disabled` = 0 $where  ORDER BY `device_id` ASC"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | while ($device = mysql_fetch_array($device_query)) { | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   $status = 0; unset($array); | 
					
						
							|  |  |  |   $device_start = utime();  // Start counting device poll time
 | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   echo($device['hostname'] . " ".$device['device_id']." ".$device['os']." "); | 
					
						
							| 
									
										
										
										
											2010-06-25 12:18:00 +00:00
										 |  |  |   if($config['os'][$device['os']]['group']) {$device['os_group'] = $config['os'][$device['os']]['group']; echo "(".$device['os_group'].")";} | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   echo("\n"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   unset($poll_update); unset($poll_update_query); unset($poll_separator); unset($version); unset($uptime); unset($features);  | 
					
						
							|  |  |  |   unset($sysLocation); unset($hardware); unset($sysDescr); unset($sysContact); unset($sysName); unset($serial); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   $host_rrd = $config['rrd_dir'] . "/" . $device['hostname']; | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   if (!is_dir($host_rrd)) { mkdir($host_rrd); echo("Created directory : $host_rrd\n"); } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   $device['pingable'] = isPingable($device['hostname']); | 
					
						
							|  |  |  |   if($device['pingable']) { | 
					
						
							|  |  |  |     $device['snmpable'] = isSNMPable($device['hostname'], $device['community'], $device['snmpver'], $device['port']); | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |     if($device['snmpable']) { | 
					
						
							|  |  |  |       $status = "1"; | 
					
						
							|  |  |  |     } else { | 
					
						
							|  |  |  |       echo("SNMP Unreachable"); | 
					
						
							|  |  |  |       $status = "0"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } else { | 
					
						
							|  |  |  |     echo("Unpingable"); | 
					
						
							|  |  |  |     $status = "0"; | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   if ( $device['status'] != $status ) | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`status` = '$status'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     mysql_query("UPDATE `devices` SET `status` = '".$status."' WHERE `device_id` = '".$device['device_id']."'"); | 
					
						
							|  |  |  |     mysql_query("INSERT INTO alerts (importance, device_id, message) VALUES ('0', '" . $device['device_id'] . "', 'Device is " .($status == '1' ? 'up' : 'down') . "')"); | 
					
						
							|  |  |  |     log_event('Device status changed to ' . ($status == '1' ? 'Up' : 'Down'), $device['device_id'], ($status == '1' ? 'up' : 'down')); | 
					
						
							|  |  |  |     mail($email, "Device ".($status == '1' ? 'Up' : 'Down').": " . $device['hostname'], "Device ".($status == '1' ? 'up' : 'down').": " . $device['hostname'] . " at " . date($config['timestamp_format']), $config['email_headers']); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ($status == "1")  | 
					
						
							|  |  |  |   {  | 
					
						
							|  |  |  |     $snmp_cmd =  $config['snmpget'] . " -m SNMPv2-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " .  $device['hostname'].":".$device['port']; | 
					
						
							|  |  |  |     $snmp_cmd .= " sysUpTime.0 sysLocation.0 sysContact.0 sysName.0"; | 
					
						
							|  |  |  |     $snmpdata = str_replace('"','',trim(shell_exec($snmp_cmd))); | 
					
						
							|  |  |  |     list($sysUptime, $sysLocation, $sysContact, $sysName) = explode("\n", $snmpdata); | 
					
						
							|  |  |  |     $snmp_cmd =  $config['snmpget'] . " -m SNMPv2-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " .  $device['hostname'].":".$device['port']; | 
					
						
							|  |  |  |     $snmp_cmd .= " HOST-RESOURCES-MIB::hrSystemUptime.0"; | 
					
						
							|  |  |  |     $snmpdata = str_replace('"','',trim(shell_exec($snmp_cmd))); | 
					
						
							|  |  |  |     list($hrSystemUptime) = explode("\n", $snmpdata); | 
					
						
							|  |  |  |     $sysDescr = trim(shell_exec($config['snmpget'] . " -m SNMPv2-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " .  $device['hostname'].":".$device['port'] . " sysDescr.0")); | 
					
						
							|  |  |  |     $sysName = strtolower($sysName); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if ($hrSystemUptime != "No Such Object available on this agent at this OID" && $hrSystemUptime != "") | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       #HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (63050465) 7 days, 7:08:24.65
 | 
					
						
							|  |  |  |       $hrSystemUptime = str_replace("(", "", $hrSystemUptime); | 
					
						
							|  |  |  |       $hrSystemUptime = str_replace(")", "", $hrSystemUptime);  | 
					
						
							|  |  |  |       list($days,$hours, $mins, $secs) = explode(":", $hrSystemUptime); | 
					
						
							|  |  |  |       list($secs, $microsecs) = explode(".", $secs); | 
					
						
							|  |  |  |       $hours = $hours + ($days * 24); | 
					
						
							|  |  |  |       $mins = $mins + ($hours * 60); | 
					
						
							|  |  |  |       $secs = $secs + ($mins * 60); | 
					
						
							|  |  |  |       $uptime = $secs; | 
					
						
							|  |  |  |       if ($device['os'] == "windows") { $uptime /= 10; } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     else | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       #SNMPv2-MIB::sysUpTime.0 = Timeticks: (2542831) 7:03:48.31
 | 
					
						
							|  |  |  |       $sysUptime = str_replace("(", "", $sysUptime); | 
					
						
							|  |  |  |       $sysUptime = str_replace(")", "", $sysUptime);  | 
					
						
							|  |  |  |       list($days, $hours, $mins, $secs) = explode(":", $sysUptime); | 
					
						
							|  |  |  |       list($secs, $microsecs) = explode(".", $secs); | 
					
						
							|  |  |  |       $hours = $hours + ($days * 24); | 
					
						
							|  |  |  |       $mins = $mins + ($hours * 60); | 
					
						
							|  |  |  |       $secs = $secs + ($mins * 60); | 
					
						
							|  |  |  |       $uptime = $secs; | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |     if ($uptime)  | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       if ( $uptime < $device['uptime'] ) { | 
					
						
							|  |  |  |         notify($device,"Device rebooted: " . $device['hostname'],  "Device Rebooted : " . $device['hostname'] . " " . formatUptime($uptime) . " ago."); | 
					
						
							|  |  |  |         log_event('Device rebooted after '.formatUptime($device['uptime']), $device['device_id'], 'reboot', $device['uptime']); | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |       $uptimerrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/uptime.rrd"; | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |       if (!is_file($uptimerrd))  | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         $woo = shell_exec($config['rrdtool'] . " create $uptimerrd \
 | 
					
						
							|  |  |  |         DS:uptime:GAUGE:600:0:U \ | 
					
						
							|  |  |  |         RRA:AVERAGE:0.5:1:600 \ | 
					
						
							|  |  |  |         RRA:AVERAGE:0.5:6:700 \ | 
					
						
							|  |  |  |         RRA:AVERAGE:0.5:24:775 \ | 
					
						
							|  |  |  |         RRA:AVERAGE:0.5:288:797");
 | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       rrdtool_update($uptimerrd, "N:$uptime"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |       $poll_update .= $poll_separator . "`uptime` = '$uptime'"; | 
					
						
							|  |  |  |       $poll_separator = ", "; | 
					
						
							|  |  |  |     }  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (is_file($config['install_dir'] . "/includes/polling/device-".$device['os'].".inc.php")) { | 
					
						
							|  |  |  |       /// OS Specific
 | 
					
						
							|  |  |  |       include($config['install_dir'] . "/includes/polling/device-".$device['os'].".inc.php"); | 
					
						
							|  |  |  |     }elseif ($device['os_group'] && is_file($config['install_dir'] . "/includes/polling/device-".$device['os_group'].".inc.php")) { | 
					
						
							|  |  |  |       /// OS Group Specific
 | 
					
						
							|  |  |  |       include($config['install_dir'] . "/includes/polling/device-".$device['os_group'].".inc.php"); | 
					
						
							|  |  |  |     }else{ | 
					
						
							|  |  |  |       echo("Generic :("); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $sysLocation = str_replace("\"","", $sysLocation);  | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |     include("includes/polling/temperatures.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/humidity.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/fanspeeds.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/voltages.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/frequencies.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/current.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/processors.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/mempools.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/storage.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/device-netstats.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/ipSystemStats.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/ports.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/cisco-mac-accounting.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/bgpPeer.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/toner.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/ucd-diskio.inc.php"); | 
					
						
							|  |  |  |     include("includes/polling/applications.inc.php"); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  |   unset( $update ) ; | 
					
						
							|  |  |  |   unset( $seperator) ; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $serial && $serial != $device['serial'] ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`serial` = '".mres($serial)."'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("Serial -> $serial", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $sysContact && $sysContact != $device['sysContact'] ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`sysContact` = '".mres($sysContact)."'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("Contact -> $sysContact", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $sysName && $sysName != $device['sysName'] ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`sysName` = '$sysName'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("sysName -> $sysName", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $sysDescr && $sysDescr != $device['sysDescr'] ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`sysDescr` = '$sysDescr'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("sysDescr -> $sysDescr", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $sysLocation && $device['location'] != $sysLocation ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`location` = '$sysLocation'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("Location -> $sysLocation", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $version && $device['version'] != $version ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`version` = '$version'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("OS Version -> $version", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $features != $device['features'] ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`features` = '$features'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("OS Features -> $features", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ( $hardware && $hardware != $device['hardware'] ) { | 
					
						
							|  |  |  |     $poll_update .= $poll_separator . "`hardware` = '$hardware'"; | 
					
						
							|  |  |  |     $poll_separator = ", "; | 
					
						
							|  |  |  |     log_event("Hardware -> $hardware", $device['device_id'], 'system'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   $poll_update .= $poll_separator . "`last_polled` = NOW()"; | 
					
						
							|  |  |  |   $poll_separator = ", "; | 
					
						
							|  |  |  |   $polled_devices++; | 
					
						
							|  |  |  |   echo("\n"); | 
					
						
							|  |  |  |   }  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if ($poll_update) { | 
					
						
							|  |  |  |     $poll_update_query  = "UPDATE `devices` SET "; | 
					
						
							|  |  |  |     $poll_update_query .= $poll_update; | 
					
						
							|  |  |  |     $poll_update_query .= " WHERE `device_id` = '" . $device['device_id'] . "'"; | 
					
						
							|  |  |  |     if($debug) {echo("Updating " . $device['hostname'] . " - $poll_update_query \n");} | 
					
						
							|  |  |  |     $poll_update_result = mysql_query($poll_update_query); | 
					
						
							|  |  |  |     if(mysql_affected_rows() == "1") { echo("UPDATED!\n"); } else { echo("NOT UPDATED!\n"); } | 
					
						
							|  |  |  |   } else { | 
					
						
							|  |  |  |     echo("No Changes to " . $device['hostname'] . "\n"); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |   unset($storage_cache); // Clear cache of hrStorage ** MAYBE FIXME? **
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   $device_end = utime(); $device_run = $device_end - $device_start; $device_time = substr($device_run, 0, 5); | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  |   echo("Polled in $device_time seconds\n"); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  | }    | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | $poller_end = utime(); $poller_run = $poller_end - $poller_start; $poller_time = substr($poller_run, 0, 5); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-23 19:17:06 +00:00
										 |  |  | $string = $argv[0] . " $doing " .  date("F j, Y, G:i") . " - $polled_devices devices polled in $poller_time secs"; | 
					
						
							|  |  |  | if ($debug) echo("$string\n"); | 
					
						
							| 
									
										
										
										
											2010-07-10 11:47:27 +00:00
										 |  |  | shell_exec("echo '".$string."' >> ".$config['install_dir']."/observernms.log"); # FIXME EWW
 | 
					
						
							| 
									
										
										
										
											2009-10-28 13:49:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ?>
 |