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 Reports Question

Votes:

0

I'm working on creating custom reports for our sensors.

Is there any way to create a report for any sensor that is in a Warning or down state?

report sensor states

Created on Feb 10, 2022 6:51:35 PM



5 Replies

Votes:

0

Hello Paul,

Thank you for your message.

Can you please provide me more details about what you would like to achieve here, so I can be sure that I understood it well. Are you looking to generate a list of sensors in Down and Warning state?

If that's the case, then you can use the following request:

/api/table.json?columns=objid,name&filter_status=5&noraw=1&username=PRTGUSER&passhash=PASSHASH

Of course, if you want to get more information for these sensors you can add columns. You will find a list of those columns here: https://www.paessler.com/manuals/prtg/live_multiple_object_property_status#supported_output

Otherwise, you can use the request above to get a list of the sensors and then generate a report for each of them by using the query below:

/api/historicdata.json?id=SENSORID&avg=0&sdate=YYYY-MM-DD-hh-mm-ss&edate=YYYY-MM-DD-hh-mm-ss&usecaption=1&username=PRTGUSER&passhash=PASSHASH

If you have questions, do not hesitate.

Regards.

Created on Feb 15, 2022 2:12:13 PM by  Florian Lesage [Paessler Support]

Last change on Feb 15, 2022 2:12:57 PM by  Florian Lesage [Paessler Support]



Votes:

0

As I said, I want to be able to generate a report on ANY sensor that is deployed, that is CURRENTLY in a Down or Warning state. I do not want to go through the sensors manually and add the infracting sensors to the report, it must be generated AUTOMATICALLY.

And how do I use that request you posted? Is that scripting? If so, why isn't this option for a report a default built-in report? Not all admins are comfortable with scripting.

Created on Feb 15, 2022 6:19:38 PM



Votes:

0

Thank you for the clarification.

I'm afraid that there is no template to generate such report, however you can do so by navigating to "/sensors.htm?filter_status=5&filter_status=4" and then use the button View as XML located on the right, below the header. The later will then provide you an XML file with all the information displayed in the current page.

Please, note that there might be an issue with the latest version (22.1.74) regarding the button View as XML, which does not provide the data as expected (forwarded to our development team). In the meantime, you can use the following API call in the browser:

https://PRTGServer/api/table.xml?content=sensors&columns=objid,name,probe,group,favorite,lastvalue,device,downtime,downtimetime,downtimesince,uptime,uptimetime,uptimesince,knowntime,cumsince,lastcheck,lastup,lastdown,minigraph,schedule,basetype,baselink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*&filter_status=5&filter_status=4&username=PRTGUSER&passhash=PASSHASH

You don't need to write a script to execute the request, you can do it directly in the address bar of your browser. Make sure to replace PRTGSERVER, PRTGUSER and PASSHASH accordingly. You will find the passhash under Setup > Account Settings > My Account.

If the report above is not what you are looking for, please open an official feature request with detailed information by following our guideline available here: https://kb.paessler.com/en/topic/79245-how-can-i-propose-new-features-or-sensors-for-prtg. Our product owners will then have a look on it at the next feature request review.

Regards.

Created on Feb 16, 2022 9:10:31 AM by  Florian Lesage [Paessler Support]

Last change on Feb 16, 2022 9:37:45 AM by  Florian Lesage [Paessler Support]



Votes:

0

Thanks for your attempt to help. Where am I supposed to navigate to this

/sensors.htm?filter_status=5&filter_status=4

from? address bar in chrome won't work, there's no where to navigate from within the admin piece or admin login? The directions lack ... directions.

The second option of https://PRTGServer/api/table.xml?content=sensors&columns=objid,name,probe,group,favorite,lastvalue,device,downtime,downtimetime,downtimesince,uptime,uptimetime,uptimesince,knowntime,cumsince,lastcheck,lastup,lastdown,minigraph,schedule,basetype,baselink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*&filter_status=5&filter_status=4&username=PRTGUSER&passhash=PASSHASH

produces a "page does not exist" error whether it's from a browser on the machine itself, or from my workstation, replacing the PRTGServer with either the IP address of the server or the hostname. I even tried the localhost of 127.0.0.1 on the PRTG Server and got the same result.

Created on Feb 16, 2022 3:23:10 PM

Last change on Feb 17, 2022 6:05:44 AM by  Felix Wiesneth [Paessler Support]



Votes:

0

Hello Paul,

The page sensors.htm must be used within the address bar of your browser, right after the address of the PRTG server such as "https://prtg.domain.com/sensors.htm?filter_status=5&filter_status=4". The latter will show all sensors with status 4 and 5 corresponding to Warning and Down respectively.

The second address uses the API of PRTG to generate an XML file which will replace the button View as XML while our development team is working on the issue. You need to replace PRTGSERVER, PRTGUSER and PASSHASH in the request to be able to execute it (via your browser). You should then automatically get a file on your computer.

By the way, if you desire to get it in CSV format I invite you to use the following API call instead and then rename the generated file to .csv.

https://PRTGServer/api/table.xml?content=sensors&output=csvtable&columns=objid,name,probe,group,favorite,lastvalue,device,downtime,downtimetime,downtimesince,uptime,uptimetime,uptimesince,knowntime,cumsince,lastcheck,lastup,lastdown,minigraph,schedule,basetype,baselink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*&filter_status=5&filter_status=4&username=PRTGUSER&passhash=PASSHASH

Created on Feb 17, 2022 8:20:25 AM by  Florian Lesage [Paessler Support]

Last change on Feb 17, 2022 8:22:25 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.