|
@@ -39,7 +39,7 @@ time_attributes = [
|
|
|
]
|
|
|
|
|
|
def format_partition_agent(value):
|
|
|
- formatted = re.sub('CN=|OU=|O=|T=', '', value).replace("=", " ")
|
|
|
+ formatted = re.sub('CN=|OU=|O=|T=', '', value).replace("=", " ").replace(" ", "").split("#")
|
|
|
return formatted
|
|
|
|
|
|
def convert_timestamp(value):
|
|
@@ -59,9 +59,11 @@ 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).split("#")
|
|
|
+ #continue
|
|
|
+
|
|
|
+ key, value=format_partition_agent(data)
|
|
|
else:
|
|
|
key, value=data.split("=")
|
|
|
parsed[item].setdefault(key, value)
|
|
@@ -70,8 +72,8 @@ 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
|
|
|
+ #if key == "Agent Partition":
|
|
|
+ # continue
|
|
|
yield Service(item=key)
|
|
|
|
|
|
def check_edirectory_items(item: str, section) -> CheckResult:
|