From 0dd451c9b609e55be582f2d898ac22902869a996 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Mon, 21 May 2012 10:15:00 +0000 Subject: [PATCH] fix non-snmp sensor polling git-svn-id: http://www.observium.org/svn/observer/trunk@3220 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/polling/functions.inc.php | 8 ++++++-- includes/polling/unix-agent.inc.php | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php index 8a043ec53..1507ba957 100644 --- a/includes/polling/functions.inc.php +++ b/includes/polling/functions.inc.php @@ -32,13 +32,17 @@ function poll_sensor($device, $class, $unit) else { echo "no agent data!\n"; - break; + continue; } + } else if ($sensor['poller_type'] == "ipmi") + { + echo " already polled.\n"; # ipmi should probably move here from the ipmi poller file (FIXME) + continue; } else { echo "unknown poller type!\n"; - break; + continue; } if ($sensor_value == -32768) { echo("Invalid (-32768) "); $sensor_value = 0; } diff --git a/includes/polling/unix-agent.inc.php b/includes/polling/unix-agent.inc.php index 63c8f1d94..91276ed14 100755 --- a/includes/polling/unix-agent.inc.php +++ b/includes/polling/unix-agent.inc.php @@ -21,6 +21,7 @@ if ($device['os_group'] == "unix") $agent_raw .= fgets($agent, 128); } } + $agent_end = utime(); $agent_time = round(($agent_end - $agent_start) * 1000); if (!empty($agent_raw))