mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
fix adding/removal of graphs (DUH). fix UCD-MIB. (also switch to /new/ format graphs soon? :))
git-svn-id: http://www.observium.org/svn/observer/trunk@2267 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -33,6 +33,7 @@ $mem_rrd = $host_rrd . "/ucd_mem.rrd";
|
||||
#UCD-SNMP-MIB::ssRawSwapOut.0 = Counter32: 937422
|
||||
|
||||
$ss = snmpwalk_cache_oid($device, "systemStats", array());
|
||||
$ss = $ss[0]; ### Insert Nazi joke here.
|
||||
|
||||
## Create CPU RRD if it doesn't already exist
|
||||
$cpu_rrd_create = " --step 300 \
|
||||
@@ -60,6 +61,7 @@ if (is_numeric($ss['ssCpuRawUser']) && is_numeric($ss['ssCpuRawNice']) && is_num
|
||||
rrdtool_create($cpu_rrd, $cpu_rrd_create);
|
||||
}
|
||||
rrdtool_update($cpu_rrd, "N:".$ss['ssCpuRawUser'].":".$ss['ssCpuRawSystem'].":".$ss['ssCpuRawNice'].":".$ss['ssCpuRawIdle']);
|
||||
$graphs['ucd_cpu'] = TRUE;
|
||||
}
|
||||
|
||||
### This is how we'll collect in the future, start now so people don't have zero data.
|
||||
@@ -88,7 +90,6 @@ if (is_numeric($ss['ssIORawSent'])) { $graphs['ucd_io'] = TRUE; }
|
||||
if (is_numeric($ss['ssRawContexts'])) { $graphs['ucd_contexts'] = TRUE; }
|
||||
if (is_numeric($ss['ssRawInterrupts'])) { $graphs['ucd_interrupts'] = TRUE; }
|
||||
|
||||
|
||||
############################################################################################################################################
|
||||
|
||||
### Poll mem for load memory utilisation stats on UNIX-like hosts running UCD/Net-SNMPd
|
||||
|
||||
Reference in New Issue
Block a user