Browse Source

Update 'plugins/edirectory_monitor/agent_based/edirectory_monitor_idm.py'

Michael Honkoop 5 days ago
parent
commit
463957477c
1 changed files with 22 additions and 4 deletions
  1. 22 4
      plugins/edirectory_monitor/agent_based/edirectory_monitor_idm.py

+ 22 - 4
plugins/edirectory_monitor/agent_based/edirectory_monitor_idm.py

@@ -72,25 +72,41 @@ non_graphable = [
 total_counters = [
     "nrf_identity",
     "nrf_request",
-    "jdbc_statement"
+    "nrf_role",
+    "jdbc_statement",
     "publisher_add",
     "publisher_add-association",
     "publisher_check-password",
     "publisher_delete",
+    "publisher_generated-password",
+    "publisher_get-named-password",
     "publisher_init-params",
+    "publisher_instance",
     "publisher_modify",
+    "publisher_modify-association",
+    "publisher_modify-password",
     "publisher_move",
+    "publisher_password",
     "publisher_query",
-    "publisher_rename",
+    "publisher_query-ex",
+    "publisher_query-schema",
     "publisher_remove-association",
+    "publisher_rename",
+    "publisher_schema-def",
     "publisher_service-supported",
     "publisher_status",
+    "publisher_sync",
+    "publisher_trigger",
     "subscriber_add",
+    "subscriber_check-object-password",
+    "subscriber_delete",
     "subscriber_modify",
+    "subscriber_modify-password",
+    "subscriber_move",
     "subscriber_query",
-    "subscriber_delete",
+    "subscriber_query-ex",
     "subscriber_rename",
-    "subscriber_modify-password",
+    "subscriber_trigger",   
 ]
 
 def check_edirectory_items(item: str, params: Mapping[str, Any], section) -> CheckResult:
@@ -146,6 +162,8 @@ def check_edirectory_items(item: str, params: Mapping[str, Any], section) -> Che
             '''create a metric which is the difference between previous check value and current check value'''
             previous_value = value_store.get(key, 0)
             value_store[key] = value
+            if (previous_value > value):
+                previous_value = 0
             value_difference = int(value) - int(previous_value)
             yield Metric((item_detail + "_" + key), abs(value_difference), boundaries=(0, None))
         elif key in non_graphable: