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:
Adam Amstrong
2011-05-08 00:13:58 +00:00
parent 264ae72505
commit 2383cd1dfe
3 changed files with 32 additions and 1 deletions
+2 -1
View File
@@ -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