From e9f11ee3d1a7ffef965b2879738c43c5c0562b4c Mon Sep 17 00:00:00 2001
From: Paolino Paperino <paperino@paperopoli.com>
Date: Tue, 8 May 2018 08:31:08 +0200
Subject: [PATCH] 2018-05-08:  FG;  Updated Ceph ADM template, added min/max
 OSD used fractions.

---
 Ceph/Template/zbx_tmpl_ceph-adm.xml | 402 ++++++++++++++++++++++++++--
 1 file changed, 383 insertions(+), 19 deletions(-)

diff --git a/Ceph/Template/zbx_tmpl_ceph-adm.xml b/Ceph/Template/zbx_tmpl_ceph-adm.xml
index a3e72f5..df94ce4 100644
--- a/Ceph/Template/zbx_tmpl_ceph-adm.xml
+++ b/Ceph/Template/zbx_tmpl_ceph-adm.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <zabbix_export>
     <version>3.0</version>
-    <date>2017-11-21T10:30:24Z</date>
+    <date>2018-05-08T06:28:09Z</date>
     <groups>
         <group>
             <name>Templates</name>
@@ -29,6 +29,92 @@
                 </application>
             </applications>
             <items>
+                <item>
+                    <name>Ceph Global max OSD used fraction</name>
+                    <type>0</type>
+                    <snmp_community/>
+                    <multiplier>0</multiplier>
+                    <snmp_oid/>
+                    <key>ceph.global.maxfrac[{$CEPH_CONNPAR}]</key>
+                    <delay>120</delay>
+                    <history>15</history>
+                    <trends>365</trends>
+                    <status>0</status>
+                    <value_type>0</value_type>
+                    <allowed_hosts/>
+                    <units>%</units>
+                    <delta>0</delta>
+                    <snmpv3_contextname/>
+                    <snmpv3_securityname/>
+                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
+                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
+                    <snmpv3_authpassphrase/>
+                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
+                    <snmpv3_privpassphrase/>
+                    <formula>1</formula>
+                    <delay_flex/>
+                    <params/>
+                    <ipmi_sensor/>
+                    <data_type>0</data_type>
+                    <authtype>0</authtype>
+                    <username/>
+                    <password/>
+                    <publickey/>
+                    <privatekey/>
+                    <port/>
+                    <description>Ceph fraction used of total raw size (%).</description>
+                    <inventory_link>0</inventory_link>
+                    <applications>
+                        <application>
+                            <name>Ceph ADM</name>
+                        </application>
+                    </applications>
+                    <valuemap/>
+                    <logtimefmt/>
+                </item>
+                <item>
+                    <name>Ceph Global min OSD used fraction</name>
+                    <type>0</type>
+                    <snmp_community/>
+                    <multiplier>0</multiplier>
+                    <snmp_oid/>
+                    <key>ceph.global.minfrac[{$CEPH_CONNPAR}]</key>
+                    <delay>120</delay>
+                    <history>15</history>
+                    <trends>365</trends>
+                    <status>0</status>
+                    <value_type>0</value_type>
+                    <allowed_hosts/>
+                    <units>%</units>
+                    <delta>0</delta>
+                    <snmpv3_contextname/>
+                    <snmpv3_securityname/>
+                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
+                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
+                    <snmpv3_authpassphrase/>
+                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
+                    <snmpv3_privpassphrase/>
+                    <formula>1</formula>
+                    <delay_flex/>
+                    <params/>
+                    <ipmi_sensor/>
+                    <data_type>0</data_type>
+                    <authtype>0</authtype>
+                    <username/>
+                    <password/>
+                    <publickey/>
+                    <privatekey/>
+                    <port/>
+                    <description>Ceph fraction used of total raw size (%).</description>
+                    <inventory_link>0</inventory_link>
+                    <applications>
+                        <application>
+                            <name>Ceph ADM</name>
+                        </application>
+                    </applications>
+                    <valuemap/>
+                    <logtimefmt/>
+                </item>
                 <item>
                     <name>Ceph Global objects degraded, fraction</name>
                     <type>0</type>
@@ -36,7 +122,7 @@
                     <multiplier>0</multiplier>
                     <snmp_oid/>
                     <key>ceph.global.objsdegfrac[{$CEPH_CONNPAR}]</key>
-                    <delay>60</delay>
+                    <delay>120</delay>
                     <history>15</history>
                     <trends>365</trends>
                     <status>0</status>
@@ -79,7 +165,7 @@
                     <multiplier>0</multiplier>
                     <snmp_oid/>
                     <key>ceph.global.objsdeg[{$CEPH_CONNPAR}]</key>
-                    <delay>60</delay>
+                    <delay>120</delay>
                     <history>15</history>
                     <trends>365</trends>
                     <status>0</status>
@@ -122,7 +208,7 @@
                     <multiplier>0</multiplier>
                     <snmp_oid/>
                     <key>ceph.global.objsmisfrac[{$CEPH_CONNPAR}]</key>
-                    <delay>60</delay>
+                    <delay>120</delay>
                     <history>15</history>
                     <trends>365</trends>
                     <status>0</status>
@@ -165,7 +251,7 @@
                     <multiplier>0</multiplier>
                     <snmp_oid/>
                     <key>ceph.global.objsmis[{$CEPH_CONNPAR}]</key>
-                    <delay>60</delay>
+                    <delay>120</delay>
                     <history>15</history>
                     <trends>365</trends>
                     <status>0</status>
@@ -416,6 +502,49 @@
                     <valuemap/>
                     <logtimefmt/>
                 </item>
+                <item>
+                    <name>Ceph Global backfill-full threshold</name>
+                    <type>0</type>
+                    <snmp_community/>
+                    <multiplier>1</multiplier>
+                    <snmp_oid/>
+                    <key>ceph.global.thrbackfillfull[{$CEPH_CONNPAR}]</key>
+                    <delay>300</delay>
+                    <history>15</history>
+                    <trends>365</trends>
+                    <status>0</status>
+                    <value_type>0</value_type>
+                    <allowed_hosts/>
+                    <units>%</units>
+                    <delta>0</delta>
+                    <snmpv3_contextname/>
+                    <snmpv3_securityname/>
+                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
+                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
+                    <snmpv3_authpassphrase/>
+                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
+                    <snmpv3_privpassphrase/>
+                    <formula>100</formula>
+                    <delay_flex/>
+                    <params/>
+                    <ipmi_sensor/>
+                    <data_type>0</data_type>
+                    <authtype>0</authtype>
+                    <username/>
+                    <password/>
+                    <publickey/>
+                    <privatekey/>
+                    <port/>
+                    <description>Ceph threshold fraction for &quot;backfill-full&quot; (%).</description>
+                    <inventory_link>0</inventory_link>
+                    <applications>
+                        <application>
+                            <name>Ceph ADM</name>
+                        </application>
+                    </applications>
+                    <valuemap/>
+                    <logtimefmt/>
+                </item>
                 <item>
                     <name>Ceph Global full threshold</name>
                     <type>0</type>
@@ -508,9 +637,9 @@
                     <snmp_community/>
                     <multiplier>0</multiplier>
                     <snmp_oid/>
-                    <key>ceph.health</key>
-                    <delay>30</delay>
-                    <history>45</history>
+                    <key>ceph.health[{$CEPH_CONNPAR}]</key>
+                    <delay>60</delay>
+                    <history>15</history>
                     <trends>365</trends>
                     <status>0</status>
                     <value_type>3</value_type>
@@ -545,6 +674,49 @@
                     <valuemap/>
                     <logtimefmt/>
                 </item>
+                <item>
+                    <name>Ceph OSD backfill full</name>
+                    <type>0</type>
+                    <snmp_community/>
+                    <multiplier>0</multiplier>
+                    <snmp_oid/>
+                    <key>ceph.osd.backfillfull[{$CEPH_CONNPAR}]</key>
+                    <delay>120</delay>
+                    <history>15</history>
+                    <trends>365</trends>
+                    <status>0</status>
+                    <value_type>3</value_type>
+                    <allowed_hosts/>
+                    <units/>
+                    <delta>0</delta>
+                    <snmpv3_contextname/>
+                    <snmpv3_securityname/>
+                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
+                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
+                    <snmpv3_authpassphrase/>
+                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
+                    <snmpv3_privpassphrase/>
+                    <formula>1</formula>
+                    <delay_flex/>
+                    <params/>
+                    <ipmi_sensor/>
+                    <data_type>0</data_type>
+                    <authtype>0</authtype>
+                    <username/>
+                    <password/>
+                    <publickey/>
+                    <privatekey/>
+                    <port/>
+                    <description>Ceph OSD backfill full</description>
+                    <inventory_link>0</inventory_link>
+                    <applications>
+                        <application>
+                            <name>Ceph ADM</name>
+                        </application>
+                    </applications>
+                    <valuemap/>
+                    <logtimefmt/>
+                </item>
                 <item>
                     <name>Ceph OSD down</name>
                     <type>0</type>
@@ -595,7 +767,7 @@
                     <multiplier>0</multiplier>
                     <snmp_oid/>
                     <key>ceph.osd.full[{$CEPH_CONNPAR}]</key>
-                    <delay>60</delay>
+                    <delay>120</delay>
                     <history>15</history>
                     <trends>365</trends>
                     <status>0</status>
@@ -681,7 +853,7 @@
                     <multiplier>0</multiplier>
                     <snmp_oid/>
                     <key>ceph.osd.nearfull[{$CEPH_CONNPAR}]</key>
-                    <delay>60</delay>
+                    <delay>120</delay>
                     <history>15</history>
                     <trends>365</trends>
                     <status>0</status>
@@ -1918,6 +2090,94 @@
                             <logtimefmt/>
                             <application_prototypes/>
                         </item_prototype>
+                        <item_prototype>
+                            <name>DiskSize {#OSDSIZE}: ALL max used fraction</name>
+                            <type>0</type>
+                            <snmp_community/>
+                            <multiplier>0</multiplier>
+                            <snmp_oid/>
+                            <key>ceph.osdsize.all.maxfrac[{$CEPH_CONNPAR},{$CEPH_DISKSIZERANGE},{#OSDSIZE}]</key>
+                            <delay>120</delay>
+                            <history>15</history>
+                            <trends>365</trends>
+                            <status>0</status>
+                            <value_type>0</value_type>
+                            <allowed_hosts/>
+                            <units>%</units>
+                            <delta>0</delta>
+                            <snmpv3_contextname/>
+                            <snmpv3_securityname/>
+                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
+                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
+                            <snmpv3_authpassphrase/>
+                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
+                            <snmpv3_privpassphrase/>
+                            <formula>1</formula>
+                            <delay_flex/>
+                            <params/>
+                            <ipmi_sensor/>
+                            <data_type>0</data_type>
+                            <authtype>0</authtype>
+                            <username/>
+                            <password/>
+                            <publickey/>
+                            <privatekey/>
+                            <port/>
+                            <description/>
+                            <inventory_link>0</inventory_link>
+                            <applications>
+                                <application>
+                                    <name>Ceph ADM</name>
+                                </application>
+                            </applications>
+                            <valuemap/>
+                            <logtimefmt/>
+                            <application_prototypes/>
+                        </item_prototype>
+                        <item_prototype>
+                            <name>DiskSize {#OSDSIZE}: ALL min used fraction</name>
+                            <type>0</type>
+                            <snmp_community/>
+                            <multiplier>0</multiplier>
+                            <snmp_oid/>
+                            <key>ceph.osdsize.all.minfrac[{$CEPH_CONNPAR},{$CEPH_DISKSIZERANGE},{#OSDSIZE}]</key>
+                            <delay>120</delay>
+                            <history>15</history>
+                            <trends>365</trends>
+                            <status>0</status>
+                            <value_type>0</value_type>
+                            <allowed_hosts/>
+                            <units>%</units>
+                            <delta>0</delta>
+                            <snmpv3_contextname/>
+                            <snmpv3_securityname/>
+                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
+                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
+                            <snmpv3_authpassphrase/>
+                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
+                            <snmpv3_privpassphrase/>
+                            <formula>1</formula>
+                            <delay_flex/>
+                            <params/>
+                            <ipmi_sensor/>
+                            <data_type>0</data_type>
+                            <authtype>0</authtype>
+                            <username/>
+                            <password/>
+                            <publickey/>
+                            <privatekey/>
+                            <port/>
+                            <description/>
+                            <inventory_link>0</inventory_link>
+                            <applications>
+                                <application>
+                                    <name>Ceph ADM</name>
+                                </application>
+                            </applications>
+                            <valuemap/>
+                            <logtimefmt/>
+                            <application_prototypes/>
+                        </item_prototype>
                     </item_prototypes>
                     <trigger_prototypes/>
                     <graph_prototypes>
@@ -2001,6 +2261,62 @@
                                 </graph_item>
                             </graph_items>
                         </graph_prototype>
+                        <graph_prototype>
+                            <name>DiskSize {#OSDSIZE}: used fraction</name>
+                            <width>900</width>
+                            <height>200</height>
+                            <yaxismin>0.0000</yaxismin>
+                            <yaxismax>100.0000</yaxismax>
+                            <show_work_period>1</show_work_period>
+                            <show_triggers>1</show_triggers>
+                            <type>0</type>
+                            <show_legend>1</show_legend>
+                            <show_3d>0</show_3d>
+                            <percent_left>0.0000</percent_left>
+                            <percent_right>0.0000</percent_right>
+                            <ymin_type_1>1</ymin_type_1>
+                            <ymax_type_1>0</ymax_type_1>
+                            <ymin_item_1>0</ymin_item_1>
+                            <ymax_item_1>0</ymax_item_1>
+                            <graph_items>
+                                <graph_item>
+                                    <sortorder>0</sortorder>
+                                    <drawtype>0</drawtype>
+                                    <color>FF66FF</color>
+                                    <yaxisside>1</yaxisside>
+                                    <calc_fnc>2</calc_fnc>
+                                    <type>0</type>
+                                    <item>
+                                        <host>Template App Ceph</host>
+                                        <key>ceph.osdsize.all.count[{$CEPH_CONNPAR},{$CEPH_DISKSIZERANGE},{#OSDSIZE}]</key>
+                                    </item>
+                                </graph_item>
+                                <graph_item>
+                                    <sortorder>1</sortorder>
+                                    <drawtype>0</drawtype>
+                                    <color>00CCCC</color>
+                                    <yaxisside>0</yaxisside>
+                                    <calc_fnc>2</calc_fnc>
+                                    <type>0</type>
+                                    <item>
+                                        <host>Template App Ceph</host>
+                                        <key>ceph.osdsize.all.maxfrac[{$CEPH_CONNPAR},{$CEPH_DISKSIZERANGE},{#OSDSIZE}]</key>
+                                    </item>
+                                </graph_item>
+                                <graph_item>
+                                    <sortorder>2</sortorder>
+                                    <drawtype>0</drawtype>
+                                    <color>6666FF</color>
+                                    <yaxisside>0</yaxisside>
+                                    <calc_fnc>2</calc_fnc>
+                                    <type>0</type>
+                                    <item>
+                                        <host>Template App Ceph</host>
+                                        <key>ceph.osdsize.all.minfrac[{$CEPH_CONNPAR},{$CEPH_DISKSIZERANGE},{#OSDSIZE}]</key>
+                                    </item>
+                                </graph_item>
+                            </graph_items>
+                        </graph_prototype>
                     </graph_prototypes>
                     <host_prototypes/>
                 </discovery_rule>
@@ -2371,7 +2687,7 @@
             <dependencies/>
         </trigger>
         <trigger>
-            <expression>{Template App Ceph:ceph.health.last(0)}=2</expression>
+            <expression>{Template App Ceph:ceph.health[{$CEPH_CONNPAR}].last(0)}=2</expression>
             <name>Ceph health is not OK on {HOST.NAME}</name>
             <url/>
             <status>0</status>
@@ -2459,7 +2775,7 @@
                     <type>0</type>
                     <item>
                         <host>Template App Ceph</host>
-                        <key>ceph.health</key>
+                        <key>ceph.health[{$CEPH_CONNPAR}]</key>
                     </item>
                 </graph_item>
                 <graph_item>
@@ -2489,6 +2805,18 @@
                 <graph_item>
                     <sortorder>3</sortorder>
                     <drawtype>4</drawtype>
+                    <color>FC6EA3</color>
+                    <yaxisside>1</yaxisside>
+                    <calc_fnc>2</calc_fnc>
+                    <type>0</type>
+                    <item>
+                        <host>Template App Ceph</host>
+                        <key>ceph.global.thrbackfillfull[{$CEPH_CONNPAR}]</key>
+                    </item>
+                </graph_item>
+                <graph_item>
+                    <sortorder>4</sortorder>
+                    <drawtype>4</drawtype>
                     <color>EE0000</color>
                     <yaxisside>1</yaxisside>
                     <calc_fnc>2</calc_fnc>
@@ -2498,6 +2826,30 @@
                         <key>ceph.global.thrfull[{$CEPH_CONNPAR}]</key>
                     </item>
                 </graph_item>
+                <graph_item>
+                    <sortorder>5</sortorder>
+                    <drawtype>2</drawtype>
+                    <color>00CCCC</color>
+                    <yaxisside>1</yaxisside>
+                    <calc_fnc>2</calc_fnc>
+                    <type>0</type>
+                    <item>
+                        <host>Template App Ceph</host>
+                        <key>ceph.global.maxfrac[{$CEPH_CONNPAR}]</key>
+                    </item>
+                </graph_item>
+                <graph_item>
+                    <sortorder>6</sortorder>
+                    <drawtype>0</drawtype>
+                    <color>6666FF</color>
+                    <yaxisside>1</yaxisside>
+                    <calc_fnc>2</calc_fnc>
+                    <type>0</type>
+                    <item>
+                        <host>Template App Ceph</host>
+                        <key>ceph.global.minfrac[{$CEPH_CONNPAR}]</key>
+                    </item>
+                </graph_item>
             </graph_items>
         </graph>
         <graph>
@@ -2595,7 +2947,7 @@
                     <type>0</type>
                     <item>
                         <host>Template App Ceph</host>
-                        <key>ceph.health</key>
+                        <key>ceph.health[{$CEPH_CONNPAR}]</key>
                     </item>
                 </graph_item>
                 <graph_item>
@@ -2613,6 +2965,18 @@
                 <graph_item>
                     <sortorder>2</sortorder>
                     <drawtype>0</drawtype>
+                    <color>6C59DC</color>
+                    <yaxisside>0</yaxisside>
+                    <calc_fnc>2</calc_fnc>
+                    <type>0</type>
+                    <item>
+                        <host>Template App Ceph</host>
+                        <key>ceph.osd.backfillfull[{$CEPH_CONNPAR}]</key>
+                    </item>
+                </graph_item>
+                <graph_item>
+                    <sortorder>3</sortorder>
+                    <drawtype>0</drawtype>
                     <color>FF3333</color>
                     <yaxisside>0</yaxisside>
                     <calc_fnc>2</calc_fnc>
@@ -2623,7 +2987,7 @@
                     </item>
                 </graph_item>
                 <graph_item>
-                    <sortorder>3</sortorder>
+                    <sortorder>4</sortorder>
                     <drawtype>0</drawtype>
                     <color>EE00EE</color>
                     <yaxisside>0</yaxisside>
@@ -2635,7 +2999,7 @@
                     </item>
                 </graph_item>
                 <graph_item>
-                    <sortorder>4</sortorder>
+                    <sortorder>5</sortorder>
                     <drawtype>0</drawtype>
                     <color>0000EE</color>
                     <yaxisside>0</yaxisside>
@@ -2671,7 +3035,7 @@
                     <drawtype>0</drawtype>
                     <color>EE00EE</color>
                     <yaxisside>0</yaxisside>
-                    <calc_fnc>2</calc_fnc>
+                    <calc_fnc>4</calc_fnc>
                     <type>0</type>
                     <item>
                         <host>Template App Ceph</host>
@@ -2683,7 +3047,7 @@
                     <drawtype>0</drawtype>
                     <color>444444</color>
                     <yaxisside>0</yaxisside>
-                    <calc_fnc>2</calc_fnc>
+                    <calc_fnc>4</calc_fnc>
                     <type>0</type>
                     <item>
                         <host>Template App Ceph</host>
@@ -2695,7 +3059,7 @@
                     <drawtype>0</drawtype>
                     <color>FF3333</color>
                     <yaxisside>0</yaxisside>
-                    <calc_fnc>2</calc_fnc>
+                    <calc_fnc>4</calc_fnc>
                     <type>0</type>
                     <item>
                         <host>Template App Ceph</host>
@@ -2707,7 +3071,7 @@
                     <drawtype>0</drawtype>
                     <color>0000EE</color>
                     <yaxisside>0</yaxisside>
-                    <calc_fnc>2</calc_fnc>
+                    <calc_fnc>4</calc_fnc>
                     <type>0</type>
                     <item>
                         <host>Template App Ceph</host>
-- 
GitLab