From c06587557f91ead6d0475be82f4069e1eb110957 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Tue, 11 Aug 2020 17:30:57 +0200 Subject: [PATCH] update graphs to use check_snmp_data --- load.ini | 2 +- snmp-cpu.ini | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 snmp-cpu.ini diff --git a/load.ini b/load.ini index ef1ebff..2c77936 100644 --- a/load.ini +++ b/load.ini @@ -9,7 +9,7 @@ ; ====================================================================== [load.graph] -check_command = "System-load" +check_command = "System-load, check_snmp_data" [load.urlparams] areaAlpha = "0.2" diff --git a/snmp-cpu.ini b/snmp-cpu.ini new file mode 100644 index 0000000..0abb918 --- /dev/null +++ b/snmp-cpu.ini @@ -0,0 +1,70 @@ +; ====================================================================== +; +; SNMP preformance data :: CPU usage +; +; show usage and idle as graph and pie +; +; ---------------------------------------------------------------------- +; 2020-08-11 <axel.hahn@iml.unibe.ch> initial version +; ====================================================================== + + +; ---------------------------------------------------------------------- +; graph +; ---------------------------------------------------------------------- + +[snmpcpu.graph] +check_command = "check_snmp_data" + + +[snmpcpu.urlparams] +areaAlpha = "0.2" +; areaMode = "first" +areaMode = "stacked" +colorList = "cc66dd,66ccdd,ddddee" +; ^ ^ ^ +; system user idle + +lineWidth = "2" +min = "0" +max = "100" +yUnitSystem = "binary" + +[snmpcpu.metrics_filters] +system = "$service_name_template$.perfdata.cpu-system.value" +user = "$service_name_template$.perfdata.cpu-user.value" +idle = "$service_name_template$.perfdata.cpu-idle.value" + + +[snmpcpu.functions] +system = "alias($metric$, 'System')" +user = "alias($metric$, 'User')" +idle = "alias($metric$, 'Idle (%) (stacked)')" + + + +; ---------------------------------------------------------------------- +; PIE chart +; ---------------------------------------------------------------------- + +[snmpcpupie.graph] +check_command = "CPU-usage, check_snmp_data" + +[snmpcpupie.urlparams] +colorList = "cc66dd,66ccdd,ddddee" +; ^ ^ ^ +; system user idle + +graphType = "pie" +title = "Average cpu usage" + +[snmpcpupie.metrics_filters] +system = "$service_name_template$.perfdata.cpu-system.value" +user = "$service_name_template$.perfdata.cpu-user.value" +idle = "$service_name_template$.perfdata.cpu-idle.value" + + +[snmpcpupie.functions] +system = "alias($metric$, 'System')" +user = "alias($metric$, 'User')" +idle = "alias($metric$, 'Idle')" -- GitLab