What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Custom sensor to alert if number of sensors with a particular tag are down

Votes:

0

Your Vote:

Up

Down

I would like to create a sensor that monitors a pool of redundant servers that will alert if the number of healthy servers is less than 5. I would like to do this without coming up with a list of every sensor ID, so that it would be dynamic if additional servers were added.

example: health check on webserver1, webserver2, webserver3, webserver4, webserver5, webserver6, webserver7 all tagged 'pool1'

if number of down webservers with tag pool1 > 3 custom sensor goes to Down.

Thanks

-chuck

counter custom-sensor prtg tags

Created on Mar 27, 2015 4:57:29 PM by  chucksalsa (0) 1



3 Replies

Votes:

6

Your Vote:

Up

Down

You can use the api/table.xml function and filter on a sensor tag like this:

http://yourserver/api/table.xml?content=sensors&columns=sensor,status&[email protected](pool1)

This will list all sensors (and their status) having the 'pool1' tag.

Created on Mar 30, 2015 1:17:37 PM by  PRTG Tools Family [prtgtoolsfamily.com] (13,243) 3 4



Votes:

0

Your Vote:

Up

Down

Thanks for that information. How is that used inside PRTG to notify if a number of sensors in the tagged pool are in Down state?

It returns:

<?xml version="1.0" encoding="UTF-8"?> <sensors totalcount="25" listend="1"> <prtg-version>15.1.14.1778</prtg-version> <item> <sensor>tomcat_ok.jsp</sensor> <status>Up </status> <status_raw>3</status_raw> </item> <item> <sensor>tomcat_ok.jsp</sensor> <status>Up </status> <status_raw>3</status_raw> </item> <item> <sensor>tomcat_ok.jsp</sensor> <status>Up </status> <status_raw>3</status_raw> </item> <item> ... </sensors>

Created on Mar 30, 2015 3:15:16 PM by  chucksalsa (0) 1



Votes:

4

Your Vote:

Up

Down

And....

if you feed the url from the example above to the HTTP XML/REST Value Sensor, you can easy count the number of nodes in the XML result. Using limits you can set the sensor to an error state if the number of nodes > 3.

This will save you from creating a Custom Sensor.

Created on Mar 30, 2015 4:18:11 PM by  PRTG Tools Family [prtgtoolsfamily.com] (13,243) 3 4



Please log in or register to enter your reply.


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.