mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Removed ping + performance graphs and tab if skip ping check
This commit is contained in:
@@ -155,7 +155,7 @@ function poll_device($device, $options) {
|
||||
|
||||
$address_family = snmpTransportToAddressFamily($device['transport']);
|
||||
|
||||
$ping_response = isPingable($device['hostname'], $address_family, $device['device_id']);
|
||||
$ping_response = isPingable($device['hostname'], $address_family, $device['device_id'], $attribs);
|
||||
|
||||
$device_perf = $ping_response['db'];
|
||||
$device_perf['device_id'] = $device['device_id'];
|
||||
@@ -265,23 +265,27 @@ function poll_device($device, $options) {
|
||||
}
|
||||
|
||||
// Ping response rrd
|
||||
$ping_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/ping-perf.rrd';
|
||||
if (!is_file($ping_rrd)) {
|
||||
rrdtool_create($ping_rrd, 'DS:ping:GAUGE:600:0:65535 '.$config['rrd_rra']);
|
||||
}
|
||||
if (can_ping_device($attribs) === true) {
|
||||
$ping_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/ping-perf.rrd';
|
||||
if (!is_file($ping_rrd)) {
|
||||
rrdtool_create($ping_rrd, 'DS:ping:GAUGE:600:0:65535 '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
if (!empty($ping_time)) {
|
||||
$fields = array(
|
||||
'ping' => $ping_time,
|
||||
);
|
||||
if (!empty($ping_time)) {
|
||||
$fields = array(
|
||||
'ping' => $ping_time,
|
||||
);
|
||||
|
||||
rrdtool_update($ping_rrd, $fields);
|
||||
}
|
||||
|
||||
$update_array['last_ping'] = array('NOW()');
|
||||
$update_array['last_ping_timetaken'] = $ping_time;
|
||||
|
||||
rrdtool_update($ping_rrd, $fields);
|
||||
}
|
||||
|
||||
$update_array['last_polled'] = array('NOW()');
|
||||
$update_array['last_polled_timetaken'] = $device_time;
|
||||
$update_array['last_ping'] = array('NOW()');
|
||||
$update_array['last_ping_timetaken'] = $ping_time;
|
||||
|
||||
// echo("$device_end - $device_start; $device_time $device_run");
|
||||
echo "Polled in $device_time seconds\n";
|
||||
|
Reference in New Issue
Block a user