Is there a document on available filters and the operators? Below is an example of the URL I'm using to show devices with UP status. How can I filter a device group based on not having the UP status (i.e. filter_status not equal to 3)?
Best Answer
Indeed, there is a "not equal" operator: "@neq(value)".
So, a simplified version of the above query could look like this:
/api/table.xml?content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=@neq(3)&sortby=priority
Kind regards,
Matthias Kupfer - Team Tech Support
5 Replies
The documentation is either available directly in PRTG at "/api.htm?tabid=3#toc-index-6" or "https://www.paessler.com/manuals/prtg/live_multiple_object_property_status#filtering".
Your exact request is even covered within the documentation:
All sensors that are not up (with their current state and downtime information):
/api/table.xml?content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority
&filter_status=5&filter_status=4&filter_status=10&filter_status=13&filter_status=14&sortby=priority
Kind regards,
Matthias Kupfer - Team Tech Support
Thanks. I was trying to avoid listing the other filter_status values. Is there no NOT operator?
Indeed, there is a "not equal" operator: "@neq(value)".
So, a simplified version of the above query could look like this:
/api/table.xml?content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=@neq(3)&sortby=priority
Kind regards,
Matthias Kupfer - Team Tech Support
Where can I find a list of operators?
These are listed in the API documentation, accessible either in the PRTG webinterface at
/api.htm?tabid=3#toc-index-7
or here
Kind regards,
Matthias Kupfer - Team Tech Support
Add comment