Bladeren bron

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

Michael Honkoop 4 maanden geleden
bovenliggende
commit
e15580d259
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6 2
      plugins/edirectory_monitor/agent_based/edirectory_monitor.py

+ 6 - 2
plugins/edirectory_monitor/agent_based/edirectory_monitor.py

@@ -51,6 +51,9 @@ time_attributes = [
 total_counters = [
     "inBytes",
     "outBytes",
+    "Total",
+    "EntryCache",
+    "BlockCache",
 ]
 
 def format_partition_agent(value):
@@ -102,16 +105,17 @@ def check_edirectory_items(item: str, section) -> CheckResult:
             datevalue = convert_timestamp(value)
             yield Result(state=State(0), summary=f"{key}: {datevalue}", details=f"{key}: {datevalue}")
         else:
+            '''create a default result if above does not apply'''
             yield Result(state=State(0), summary=f"{key}: {value}", details=f"{key}: {value}")
         if key in total_counters:
+            '''create a metric which is the difference between previous check value and current check value'''
             try:
                 value = get_rate(get_value_store(), key, time.time(), float(value), raise_overflow=True)
             except GetRateError:
                 value = 0
             yield Metric(key, value, boundaries=(0, None))
-
         elif key not in non_graphable:
-            '''Only create metrics for graphable values'''
+            '''Only create a metric for graphable values'''
             yield Metric(key, float(value))
 
 agent_section_edirectory_monitor = AgentSection(