|
@@ -33,6 +33,12 @@ uptime_attributes = [
|
|
|
"eDirectoryUpTime",
|
|
|
]
|
|
|
|
|
|
+time_attributes_ignored = [
|
|
|
+ "BackGroundProcInterval",
|
|
|
+ "CheckPointThreadForceStartTime",
|
|
|
+ "CheckPointThreadStartTime",
|
|
|
+]
|
|
|
+
|
|
|
time_attributes = [
|
|
|
"eDirectorySystemCurrTime",
|
|
|
"CheckPointThreadStartTime",
|
|
@@ -59,10 +65,6 @@ def parse_ldap_data(string_table):
|
|
|
parsed.setdefault(item, {})
|
|
|
for _count, data in enumerate(line[1:]):
|
|
|
if item == "Agent Partition":
|
|
|
- #print(data)
|
|
|
- #print(format_partition_agent(data))
|
|
|
- #continue
|
|
|
-
|
|
|
key, value=format_partition_agent(data)
|
|
|
else:
|
|
|
key, value=data.split("=")
|
|
@@ -72,8 +74,6 @@ def parse_ldap_data(string_table):
|
|
|
def discover_edirectory_items(section) -> DiscoveryResult:
|
|
|
'''discover one item per key'''
|
|
|
for key, data in section.items():
|
|
|
- #if key == "Agent Partition":
|
|
|
- # continue
|
|
|
yield Service(item=key)
|
|
|
|
|
|
def check_edirectory_items(item: str, section) -> CheckResult:
|
|
@@ -81,6 +81,8 @@ def check_edirectory_items(item: str, section) -> CheckResult:
|
|
|
if not data:
|
|
|
return
|
|
|
for key, value in data.items():
|
|
|
+ if key in time_attributes_ignored:
|
|
|
+ continue
|
|
|
if key in uptime_attributes:
|
|
|
uptime = datetime.timedelta(seconds=float(value))
|
|
|
yield Result(state=State(0), summary=f"{key}: {uptime}", details=f"{key}: {uptime}")
|