Skip to content

Commit 5268104

Browse files
committed
Merge branch 'fix/snmp-entity' into 'master'
Add entity id as prefix for SNMP collected data See merge request grafolean/grafolean-collector-snmp!6
2 parents 989cfe7 + e30fbf5 commit 5268104

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snmpcollector.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ def do_snmp(*args, **job_info):
185185
# if some of the data is fetched via SNMP WALK, we will have many results; if only SNMP
186186
# GET was used, we get one.
187187
expression = sensor["sensor_details"]["expression"]
188-
output_path = sensor["sensor_details"]["output_path"]
189-
values = _apply_expression_to_results(results, methods, expression, f'snmp.{output_path}')
188+
output_path = f'entity.{job_info["entity_id"]}.snmp.{sensor["sensor_details"]["output_path"]}'
189+
values = _apply_expression_to_results(results, methods, expression, output_path)
190190
send_results_to_grafolean(job_info['backend_url'], job_info['bot_token'], job_info['account_id'], values)
191191

192192

0 commit comments

Comments
 (0)