diff --git a/html/images/os/nrg.png b/html/images/os/nrg.png
new file mode 100644
index 000000000..1172f2b50
Binary files /dev/null and b/html/images/os/nrg.png differ
diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php
index 5919cfbdb..1122612d7 100644
--- a/includes/definitions.inc.php
+++ b/includes/definitions.inc.php
@@ -758,6 +758,14 @@ $config['os'][$os]['icon'] = "ricoh";
$config['os'][$os]['over'][0]['graph'] = "device_toner";
$config['os'][$os]['over'][0]['text'] = "Toner";
+$os = "nrg";
+$config['os'][$os]['group'] = "printer";
+$config['os'][$os]['text'] = "NRG Printer";
+$config['os'][$os]['type'] = "printer";
+$config['os'][$os]['icon'] = "nrg";
+$config['os'][$os]['over'][0]['graph'] = "device_toner";
+$config['os'][$os]['over'][0]['text'] = "Toner";
+
$os = "epson";
$config['os'][$os]['group'] = "printer";
$config['os'][$os]['text'] = "Epson Printer";
diff --git a/includes/discovery/os/nrg.inc.php b/includes/discovery/os/nrg.inc.php
new file mode 100644
index 000000000..11bebecc1
--- /dev/null
+++ b/includes/discovery/os/nrg.inc.php
@@ -0,0 +1,8 @@
+
diff --git a/includes/polling/cisco-mac-accounting.inc.php b/includes/polling/cisco-mac-accounting.inc.php
index 64640aaf9..05bf065f8 100755
--- a/includes/polling/cisco-mac-accounting.inc.php
+++ b/includes/polling/cisco-mac-accounting.inc.php
@@ -74,8 +74,10 @@ if ($device['os_group'] == "cisco")
DS:PIN:COUNTER:600:0:12500000000 \
DS:POUT:COUNTER:600:0:12500000000 " . $config['rrd_rra']);
}
- $woo = "N:".($b_in+0).":".($b_out+0).":".($p_in+0).":".($p_out+0);
- $ret = rrdtool_update("$rrdfile", $woo);
+
+ // FIXME - use memcached to make sure these values don't go backwards?
+ $rrdupdate = array($b_in, $b_out, $p_in, $p_out);
+ $ret = rrdtool_update("$rrdfile", $rrdupdate);
if ($acc['update'])
{ /// Do Updates
diff --git a/includes/polling/os/nrg.inc.php b/includes/polling/os/nrg.inc.php
new file mode 100644
index 000000000..740e03e83
--- /dev/null
+++ b/includes/polling/os/nrg.inc.php
@@ -0,0 +1,17 @@
+
diff --git a/includes/polling/ucd-mib.inc.php b/includes/polling/ucd-mib.inc.php
index c1eb827f5..2a81cd9e0 100755
--- a/includes/polling/ucd-mib.inc.php
+++ b/includes/polling/ucd-mib.inc.php
@@ -52,7 +52,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']);
+ rrdtool_update($cpu_rrd, array($ss['ssCpuRawUser'],$ss['ssCpuRawSystem'],$ss['ssCpuRawNice'],$ss['ssCpuRawIdle']));
$graphs['ucd_cpu'] = TRUE;
}
@@ -115,6 +115,8 @@ if (is_array($snmpdata[0]))
foreach (array_keys($snmpdata[0]) as $key) { $$key = $snmpdata[0][$key]; }
}
+$snmpdata = $snmpdata[0];
+
## Check to see that the OIDs are actually populated before we make the rrd
if (is_numeric($memTotalReal) && is_numeric($memAvailReal) && is_numeric($memTotalFree))
{
@@ -123,7 +125,7 @@ if (is_numeric($memTotalReal) && is_numeric($memAvailReal) && is_numeric($memTot
## Create the rrd file if it doesn't exist
rrdtool_create($mem_rrd, $mem_rrd_create);
}
- rrdtool_update($mem_rrd, "N:$memTotalSwap:$memAvailSwap:$memTotalReal:$memAvailReal:$memTotalFree:".($memShared+0).":".($memBuffer+0).":".($memCached+0));
+ rrdtool_update($mem_rrd, array($memTotalSwap, $memAvailSwap, $memTotalReal, $memAvailReal, $memTotalFree, $memShared, $memBuffer, $memCached));
$graphs['ucd_memory'] = TRUE;
}
@@ -134,26 +136,20 @@ if (is_numeric($memTotalReal) && is_numeric($memAvailReal) && is_numeric($memTot
#UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 429
#UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 479
-$la_load_create = " --step 300 DS:1min:GAUGE:600:0:5000 DS:5min:GAUGE:600:0:5000 DS:15min:GAUGE:600:0:5000 ".$config['rrd_rra'];
+$load_raw = snmp_get_multi($device, "laLoadInt.1 laLoadInt.2 laLoadInt.3", "-OQUs", "UCD-SNMP-MIB");
-$load_get = "laLoadInt.1 laLoadInt.2 laLoadInt.3";
-$load_raw = snmp_get_multi($device, $load_get, "-OQUs", "UCD-SNMP-MIB");
-$load1 = $load_raw[1]['laLoadInt'];
-$load5 = $load_raw[2]['laLoadInt'];
-$load10 = $load_raw[3]['laLoadInt'];
-
-## Check to see that the OIDs are actually populated before we make the rrd
-if (is_numeric($load1) && is_numeric($load5) && is_numeric($load10))
+## Check to see that the 5-min OID is actually populated before we make the rrd
+if (is_numeric($load_raw[2]['laLoadInt']))
{
if (!is_file($load_rrd))
{
- rrdtool_create($load_rrd, $la_load_create);
+ rrdtool_create($load_rrd, " --step 300 DS:1min:GAUGE:600:0:5000 DS:5min:GAUGE:600:0:5000 DS:15min:GAUGE:600:0:5000 ".$config['rrd_rra']);
}
- rrdtool_update($load_rrd, "N:$load1:$load5:$load10");
+ rrdtool_update($load_rrd, array($load_raw[1]['laLoadInt'], $load_raw[2]['laLoadInt'], $load_raw[3]['laLoadInt']));
$graphs['ucd_load'] = "TRUE";
}
-unset($ss, $load1, $load5, $load10, $load_rrd, $la_load_create, $load_raw, $load_get, $snmpdata);
+unset($ss, $load_rrd, $load_raw, $snmpdata);
unset($memTotalSwap, $memAvailSwap, $memTotalReal, $memAvailReal, $memTotalFree, $memShared, $memBuffer, $memCached);
unset($key, $mem_rrd, $mem_rrd_create, $collect_oids, $value, $filename, $cpu_rrd, $cpu_rrd_create, $oid);
diff --git a/includes/polling/wifi.inc.php b/includes/polling/wifi.inc.php
index 66ee71b9f..0eef95920 100644
--- a/includes/polling/wifi.inc.php
+++ b/includes/polling/wifi.inc.php
@@ -66,7 +66,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
DS:wificlients:GAUGE:600:-273:1000 ".$config['rrd_rra']);
}
- rrdtool_update($wificlientsrrd,"N:".$wificlients1);
+ rrdtool_update($wificlientsrrd,array($wificlients1));
$graphs['wifi_clients'] = TRUE;
}
@@ -81,7 +81,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
DS:wificlients:GAUGE:600:-273:1000 ".$config['rrd_rra']);
}
- rrdtool_update($wificlientsrrd,"N:".$wificlients2);
+ rrdtool_update($wificlientsrrd,array($wificlients2));
$graphs['wifi_clients'] = TRUE;
}