Skip to content

Commit 3765c93

Browse files
author
Anze
committed
Hide other protocols
1 parent d349bd8 commit 3765c93

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

grafolean-worker-snmp.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ def fetch_accounts_entities(self, protocol):
3232
# make sure that the protocol is enabled on the entity:
3333
if protocol not in entity_info["protocols"]:
3434
continue
35+
# and hide all other protocols: (not strictly necessary, just cleaner)
36+
entity_info["protocols"] = {
37+
protocol: entity_info["protocols"][protocol]
38+
}
39+
3540
if not entity_info["protocols"][protocol]["sensors"]:
3641
continue
3742

@@ -64,7 +69,9 @@ def __init__(self, *args, **kwargs):
6469

6570
def init(self):
6671
for account_id, entity_info, credential in self.fetch_accounts_entities('snmp'):
67-
pass
72+
# print(account_id, entity_info, credential)
73+
import json
74+
print(json.dumps(entity_info))
6875

6976
def execute(self):
7077
pass

0 commit comments

Comments
 (0)