mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Updated rrdtool_update() to use new array format
This commit is contained in:
@@ -23,7 +23,13 @@ if (is_numeric($sessions)) {
|
||||
}
|
||||
|
||||
print "Sessions: $sessions\n";
|
||||
rrdtool_update($sessrrd, 'N:'.$sessions);
|
||||
|
||||
$fields = array(
|
||||
'sessions' => $sessions,
|
||||
);
|
||||
|
||||
rrdtool_update($sessrrd, $fields);
|
||||
|
||||
$graphs['fortigate_sessions'] = true;
|
||||
}
|
||||
|
||||
@@ -36,6 +42,12 @@ if (is_numeric($cpu_usage)) {
|
||||
}
|
||||
|
||||
echo "CPU: $cpu_usage%\n";
|
||||
rrdtool_update($cpurrd, " N:$cpu_usage");
|
||||
|
||||
$fields = array(
|
||||
'LOAD' => $cpu_usage,
|
||||
);
|
||||
|
||||
rrdtool_update($cpurrd, $fields);
|
||||
|
||||
$graphs['fortigate_cpu'] = true;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,11 @@ if (is_numeric($sessions)) {
|
||||
rrdtool_create($sessrrd, ' --step 300 DS:sessions:GAUGE:600:0:3000000 '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($sessrrd, "N:$sessions");
|
||||
$fields = array(
|
||||
'sessions' => $sessions,
|
||||
);
|
||||
|
||||
rrdtool_update($sessrrd, $fields);
|
||||
|
||||
$graphs['panos_sessions'] = true;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,11 @@ if (is_numeric($FdbAddressCount)) {
|
||||
);
|
||||
}
|
||||
|
||||
rrdtool_update($fdb_rrd_file, "N:$FdbAddressCount");
|
||||
$fields = array(
|
||||
'value' => $FdbAddressCount,
|
||||
);
|
||||
|
||||
rrdtool_update($fdb_rrd_file, $fields);
|
||||
|
||||
$graphs['fdb_count'] = true;
|
||||
|
||||
|
||||
@@ -19,6 +19,12 @@ if (!is_file($sessrrd)) {
|
||||
);
|
||||
}
|
||||
|
||||
rrdtool_update("$sessrrd", "N:$sessalloc:$sessmax:$sessfailed");
|
||||
$fields = array(
|
||||
'allocate' => $sessalloc,
|
||||
'max' => $sessmax,
|
||||
'failed' => $sessfailed,
|
||||
);
|
||||
|
||||
rrdtool_update("$sessrrd", $fields);
|
||||
|
||||
$graphs['screenos_sessions'] = true;
|
||||
|
||||
@@ -36,5 +36,13 @@ if (!is_file($rrdfile)) {
|
||||
);
|
||||
}
|
||||
|
||||
$rrdupdate = "N:$rxbytes:$txbytes:$rxpkts:$rxbytes:$calls:$registrations";
|
||||
rrdtool_update("$rrdfile", $rrdupdate);
|
||||
$fields = array(
|
||||
'INOCTETS' => $rxbytes,
|
||||
'OUTOCTETS' => $txbytes,
|
||||
'INPKTS' => $rxpkts,
|
||||
'OUTPKTS' => $rxbytes,
|
||||
'CALLS' => $calls,
|
||||
'REGISTRATIONS' => $registrations,
|
||||
);
|
||||
|
||||
rrdtool_update("$rrdfile", $fields);
|
||||
|
||||
Reference in New Issue
Block a user