Hi Team,
We are using Nagios Xi in our environment, is there anyway to pull the report which includes the hostnames, ip address , services monitored on each hosts with there thresholds from the NAGIOS console (or) is there any way we can run the mysql query to get this reported.
Nagios report with hostname and ips
Re: Nagios report with hostname and ips
You could use the REST API added as of Nagios XI 5. Usage can be found in the "Help" section of your Nagios XI GUI.
Here's a sample API call to get all the defined hosts in Nagios XI (this will not work on your machine; it's an example):
Similarly, there is also an endpoint to get all the services (this will not work on your machine; it's an example):
You're sort of on your own for joining the hosts+services together though. One way to do it would be to first get a list of hosts, then get a list of all the services under that host using a limited query. Limited queries are explained in the documentation I mentioned previously.
Here's a sample API call to get all the defined hosts in Nagios XI (this will not work on your machine; it's an example):
Code: Select all
curl -XGET "http://192.168.67.1/nagiosxi/api/v1/objects/host?apikey=KR2LLsBuhmmFnS4dbmeURW0culVlv39vbbBVW8pet69bXdH8CUiK8DcFX7gMpohD&pretty=1"
Code: Select all
curl -XGET "http://192.168.67.1/nagiosxi/api/v1/objects/host?apikey=KR2LLsBuhmmFnS4dbmeURW0culVlv39vbbBVW8pet69bXdH8CUiK8DcFX7gMpohD&pretty=1"Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/