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

Rest Custom API Channel limit 50 exceeded

Votes:

0

I have created a REST Custom Sensor to Monitor our VPN Tunnels on a Palo Alto Firewall.

We have over 50 Tunnels so my question. Is it possible to just create the tunnels that startswith "at00" ?

Example from a Tunnel Name "name": "at00_vpn-de02:de02",

"result":	
[

	"valueLookup": "lookup-file",

	"value": {#1: $..({ @.name : lookup(@.state, "active","init","inactive") }).*

	},

}

Thanks for you help

api channel palo-alto-networks rest rest-custom

Created on Nov 24, 2020 12:10:59 PM

Last change on Nov 25, 2020 12:48:40 PM by  Florian Lesage [Paessler Support]



5 Replies

Votes:

0

Hello Philipp,

Thank you for your message.

I'm afraid that it's not possible to apply filter on the name via the template. Therefore, I invite you to use our EXE/Script, EXE/Script Advanced sensors instead.

Regarding custom sensors, please have a look to this manual: https://www.paessler.com/manuals/prtg/custom_sensors

Kind regards.

Created on Nov 25, 2020 1:34:25 PM by  Florian Lesage [Paessler Support]

Last change on Nov 25, 2020 2:14:38 PM by  Florian Lesage [Paessler Support]



Votes:

0

Hi and thanks for your reply,

is it possible to count all tunnels with one sensor and if the status of a tunnel goes to inactive an output via channel text will be displayed.

Created on Nov 25, 2020 2:38:37 PM



Votes:

0

With a script, you can absolutely count the number of tunnel according to their status (Active/Down) and then, return the names of the tunnels in Down state in the sensor message field.

Therefore, if you monitor both channels mentioned above, you have to use the EXE/Script Advanced sensor. Here is the output you could return with the script into PRTG:

<prtg>
<result>
<channel>Active</channel>
<value></value>
</result>
<result>
<channel>Down</channel>
<value></value>
</result>
<text></text>
</prtg>

Then, for each channel you return the corresponding value, and add the name of each Down tunnel inside <text></text>.

Kind regards.

Created on Nov 25, 2020 4:31:38 PM by  Florian Lesage [Paessler Support]

Last change on Nov 25, 2020 4:32:15 PM by  Florian Lesage [Paessler Support]



Votes:

0

Hi, now i have got the right filter

"value": { "Tunnel "+ #2 +"": $..entry[60:68]({ @.name : lookup(@.state, "active","init","inactive")}).*}

Channels will be created with the Tunnel Name and there Status.

Created on Nov 27, 2020 10:10:24 AM



Votes:

0

Hello Philipp,

As filtering by name is not possible, you can indeed match multiple children by using [<begin>:<end>] as you did. Thank you for sharing your template.

I just add the manual of the Rest Custom sensor as documentation for this article. The manual includes information on the JSON Path as well as functions available: https://www.paessler.com/manuals/prtg/rest_custom_sensor#jsonpath

Regards.

Created on Nov 27, 2020 11:36:24 AM by  Florian Lesage [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.