From a2e0d42caef61893707e01b7abe6a69c1c4c1b3a Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Mon, 12 Jun 2023 16:38:05 +0200
Subject: [PATCH] add graph templates for onevm and onehost

---
 iml_onehost.ini | 41 +++++++++++++++++++++++++++++++++++++++++
 iml_onevm.ini   | 45 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 iml_onehost.ini
 create mode 100644 iml_onevm.ini

diff --git a/iml_onehost.ini b/iml_onehost.ini
new file mode 100644
index 0000000..a2e36e7
--- /dev/null
+++ b/iml_onehost.ini
@@ -0,0 +1,41 @@
+; ======================================================================
+;
+; ONE hosts
+;
+; Opennebula hosts
+;
+; ----------------------------------------------------------------------
+; 2023-06-i12  <axel.hahn@unibe.ch>  initial version
+; ======================================================================
+
+
+; ----------------------------------------------------------------------
+; graph
+; ----------------------------------------------------------------------
+
+[onehost.graph]
+check_command = "ONE-hosts"
+
+[onehost.urlparams]
+areaAlpha   = "0.2"
+; areaMode    = "first"
+areaMode    = "stacked"
+colorList   = "66cc88,888888,ddddee"
+;              ^      ^      ^
+;              on     other  total
+
+lineWidth   = "2"
+min         = "0"
+;max         = "100"
+yUnitSystem = "binary"
+
+[onehost.metrics_filters]
+valon      = "$service_name_template$.perfdata.on.value"
+valother   = "$service_name_template$.perfdata.other.value"
+valtotal   = "$service_name_template$.perfdata.total.value"
+
+[onehost.functions]
+valon     = "alias($metric$, 'ON')"
+valother  = "alias($metric$, 'other state')"
+valtotal  = "alias($metric$, ':hidden:')"
+
diff --git a/iml_onevm.ini b/iml_onevm.ini
new file mode 100644
index 0000000..90121c0
--- /dev/null
+++ b/iml_onevm.ini
@@ -0,0 +1,45 @@
+; ======================================================================
+;
+; ONE vm
+;
+; Opennebula virtual machines
+;
+; ----------------------------------------------------------------------
+; 2023-06-i12  <axel.hahn@unibe.ch>  initial version
+; ======================================================================
+
+
+; ----------------------------------------------------------------------
+; graph
+; ----------------------------------------------------------------------
+
+[onevm.graph]
+check_command = "ONE-vms"
+
+[onevm.urlparams]
+areaAlpha   = "0.2"
+; areaMode    = "first"
+areaMode    = "stacked"
+colorList   = "66cc88,cc66dd,ee8888,888888,6699aa"
+;              ^      ^      ^      ^      ^
+;              runn   unkn   fail   other  total
+
+lineWidth   = "2"
+min         = "0"
+;max         = "100"
+yUnitSystem = "binary"
+
+[onevm.metrics_filters]
+valrunning = "$service_name_template$.perfdata.running.value"
+valunknown = "$service_name_template$.perfdata.unknown.value"
+valfail    = "$service_name_template$.perfdata.fail.value"
+valother   = "$service_name_template$.perfdata.other.value"
+valtotal   = "$service_name_template$.perfdata.total.value"
+
+[onevm.functions]
+valrunning  = "alias($metric$, 'Running')"
+valunknown  = "alias($metric$, 'Unknown state')"
+valfail     = "alias($metric$, 'Failed')"
+valother    = "alias($metric$, 'other state')"
+valtotal    = "alias($metric$, ':hidden:')"
+
-- 
GitLab