What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Custom Template Sensor Syntax given as answer is unclear

Votes:

0

I'm running into some issues regarding the Custom Template Sensor Syntax, and saw this KB: https://kb.paessler.com/en/topic/80514-create-channels-dynamically-based-on-json-objects

In it, Stephen Linke gives this JSONPath syntax as a way of dynamically creating sensors based on the Json result received from a device (reduced for clarity):

"value": { #1: $..({ @.servicegroupname : @.primaryport}).* }

I tried to go through the docs (https://www.paessler.com/manuals/prtg/rest_custom_sensor), but this syntax is still too confusing.

Can someone shed some light as to what this jsonpath does, and how it allows for the creation of channels in a dynamic fashion?

Thanks.

custom-sensors jsonpath prtg

Created on Oct 5, 2020 5:24:12 PM



1 Reply

Votes:

0

Basically, what this Sensor does, is that it iterates through the service groups of the JSON result and then creates a channel for each servicegroup and names it after the service group. #1 is always the current @.servicegroupname. I must admit, the Sensor is unfortunately rather complex, especially the automatic channel generation :(

Created on Oct 6, 2020 6:14:27 PM by  Stephan Linke [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.