Просмотр исходного кода

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

Michael Honkoop 1 день назад
Родитель
Сommit
ef33ebb59d

+ 2 - 0
plugins/edirectory_monitor/agent_based/edirectory_monitor_recordmanager.py

@@ -89,6 +89,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 (int(previous_value) > int(value)):
+                previous_value = 0
             value_difference = int(value) - int(previous_value)
             yield Metric((item_detail + "_" + key), abs(value_difference), boundaries=(0, None))
         elif (item_detail + "_" + key) not in non_graphable_attributes: