Get notified if there are X number of unknown PRTG sensor

Get notified by PRTG if there are X number of sensors in unknown or other sensor states on your main PRTG Core server. You can do it on the same PRTG core server or a different one.

PRTG has different sensor states. They are represented in different colors. For example, green means healthy, red means there is a problem, and orange means unusual activities in the network. This article focuses on unknown sensors, but it can be used for any other sensor state.

Different sensor states

I will show you how you can monitor the number of unknown sensors, and get notified if the threshold is reached.

For writing this article, I run my workloads on powerful mini PC - Intel NUC powered with the CPU i7 the latest generation, 64 GB RAM DDR4, 256 M.2 SSD. IntelĀ® NUC Mini PCs are fully complete and ready to work out of the box. You can learn more here IntelĀ® NUC Products.

Step 1: Add the target PRTG core server as a device

In the first place, you need to add a new device with the IP or DNS of your PRTG core server. You can add it to your existing PRTG core server.

Add target PRTG core server as a device

Step 2: Add HTTP XML/REST Value sensor

The HTTP XML/REST Value sensor retrieves an .xml file from a URL and parses it. In this case, you use it to query your PRTG core server and check what is the number of unknown sensors. Navigate to your target PRTG core server device.

  1. Add HTTP XML/REST Value sensor.
  2. Change the name of the sensor (optional). In my case, it is Unknown sensors.
  3. Type URL
http://PRTGCoreserver_IP/api/gettreenodestats.xml?username=jasmin&passhash=1234567890
  1. Type XML Node (and optional property)
undefinedsens
  1. Type the HTTP User Name and HTTP credentials that have permission to query the PRTG core server. You can also create a dedicated API user for that purpose. In the end, it should look like
Sensor Settings
  1. Type %1 into Custom Message so the sensor only shows a number of unknown sensors without any strings.
  2. Click Create.
  3. Congratulation. Your sensor is up and running. In my case, it shows 31 as a number of unknown sensors on the target PRTG core server.
Unknown sensors

Step 3: Enable channel limits

In the second step, you need to configure limits, so the sensor goes to a down state if a certain number of the unknown sensor is detected.

  1. Navigate to your sensor.
  2. Click on settings as shown in the screenshot below, or click on sensor channel Value.
Configure channel limits
  1. Under Lookups and Limits, click on Enable alerting based on limits, and under Upper Error Limit type a number of sensors.
Configure Upper Error Limit

In my case, it is 30. If there are 30 unknown sensors, this sensor will go downstate. Once you save changes, the sensor gauge will change color.

Sensor gauge changes color

Step 4: Configure notifications

In the last step, you need to create a notification, so PRTG informs you if there are any changes with your sensor.

  1. Navigate to your sensor.
  2. Click on Notification triggers.
  3. Create Add State Trigger notification and configure what kind of notification you want to receive in case there is X number of unknown sensors on your PRTG Core server. I go with simple Ticket notification.

The sensor goes into the down state because there are 33 unknown sensors.

The sensor goes in downstate

I received the ticket after 30 seconds. You see that sensor is in a down state because there are 33 sensors in an unknown state.

Ticket notification

Thank you for reading this article. If you found it useful, feel free to share it with your network.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link