Graph CPU Steal and IO Wait (#11235)

This commit is contained in:
SourceDoctor
2020-03-03 13:17:42 +01:00
committed by GitHub
parent 6a3f321b69
commit d32273decd
4 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<?php
$rrd_filename = rrd_name($device['hostname'], 'ucd_ssCpuRawSteal');
$ds = 'value';
$colour_area = '1111BB';
$colour_line = '0000CC';
$colour_area_max = 'cc9999';
// $graph_max = 1;
$scale_min = 0;
$unit_text = 'CPU Steal';
require 'includes/html/graphs/generic_simplex.inc.php';

View File

@@ -0,0 +1,17 @@
<?php
$rrd_filename = rrd_name($device['hostname'], 'ucd_ssCpuRawWait');
$ds = 'value';
$colour_area = '1111BB';
$colour_line = '0000CC';
$colour_area_max = 'cc9999';
// $graph_max = 1;
$scale_min = 0;
$unit_text = 'IO Wait';
require 'includes/html/graphs/generic_simplex.inc.php';

View File

@@ -28,6 +28,9 @@ use LibreNMS\RRD\RrdDefinition;
// UCD-SNMP-MIB::ssCpuRawSoftIRQ.0 = Counter32: 2605010
// UCD-SNMP-MIB::ssRawSwapIn.0 = Counter32: 602002
// UCD-SNMP-MIB::ssRawSwapOut.0 = Counter32: 937422
// UCD-SNMP-MIB::ssCpuRawWait.0
// UCD-SNMP-MIB::ssCpuRawSteal.0
$ss = snmpwalk_cache_oid($device, 'systemStats', array(), 'UCD-SNMP-MIB');
$ss = $ss[0];
@@ -67,6 +70,8 @@ $collect_oids = array(
'ssRawContexts',
'ssRawSwapIn',
'ssRawSwapOut',
'ssCpuRawWait',
'ssCpuRawSteal',
);
foreach ($collect_oids as $oid) {
@@ -102,6 +107,14 @@ if (is_numeric($ss['ssRawInterrupts'])) {
$graphs['ucd_interrupts'] = true;
}
if (is_numeric($ss['ssCpuRawWait'])) {
$graphs['ucd_io_wait'] = true;
}
if (is_numeric($ss['ssCpuRawSteal'])) {
$graphs['ucd_cpu_steal'] = true;
}
// #
// Poll mem for load memory utilisation stats on UNIX-like hosts running UCD/Net-SNMPd
// UCD-SNMP-MIB::memIndex.0 = INTEGER: 0

View File

@@ -2964,6 +2964,14 @@
},
"type": "graph"
},
"graph_types.device.ucd_cpu_steal": {
"default": {
"section": "system",
"order": 0,
"descr": "CPU Steal"
},
"type": "graph"
},
"graph_types.device.ucd_interrupts": {
"default": {
"section": "system",
@@ -2972,6 +2980,14 @@
},
"type": "graph"
},
"graph_types.device.ucd_io_wait": {
"default": {
"section": "system",
"order": 0,
"descr": "I/0 Wait"
},
"type": "graph"
},
"graph_types.device.ucd_io": {
"default": {
"section": "system",