I have a question, I work with many monitoring web, if you know PRTG
you can make a URL that returns the status of the various sensors and alarm messages, and process this information in different web graphic pages; Now I have been asked to do the same but with the tool Will they hear the NAGIOS
process? I do not understand how it should build the URL if alguin worked with this I would appreciate help me.
Example URL with PRTG
:
https://10.213.8.25/api/table.json?content=sensors&output=json&columns=status,message&filter_status=4&filter_objid=9336&filter_objid=9495&filter_objid=9496
Return:
{"prtg-version":":","treesize":000,"sensors":[{"objid":1001.....}]}
You can get JSON starting with Nagios Core version 4.0.7. Just browse to http://<address_of_your_nagios_server>/nagios/jsonquery.html
and you'll find a JSON Query Generator page that can help your build your query URL, execute it, and get JSON results. After executing the query, on the right-hand side of the page, the generated URL will be given and below it, the results of the query. You can paste the generated URL into a browser or call from your application to get raw JSON.
More information on this feature can be found here: https://labs.nagios.com/2014/06/19/exploring-the-new-json-cgis-in-nagios-core-4-0-7-part-1/