Nagios xi report

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Nagios xi report

Post by inas.labib »

Hi ,

We user Nagios XI 5.2.2

Please advice us how can we take the report of currently available hosts/services list with its arguments, notification contacts , arguments, check interval, notification interval , etc in a single report (excel sheet)

Thanks,
kyang

Re: Nagios xi report

Post by kyang »

Hi @inas.labib,

There is currently no way to run a report that includes all of that information into a single report and view it in an excel spreadsheet (csv).

I'm not sure what 5.2.2 includes when running an availability report, but in recent versions of XI, there is an advanced option that covers a little bit more fields.

But I don't see any way of getting a report for all of the variables you are wanting into a single report.

All of this information is located in the cfg files for each host/service

Code: Select all

/usr/local/nagios/etc/hosts
/usr/local/nagios/etc/services
Or the objects.cache

Code: Select all

/usr/local/nagios/var/objects.cache
Is there anything else?
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: Nagios xi report

Post by inas.labib »

Thanks for the reply.
Using below API we got few details as below. is it possible to add few more details along with this. like contacts, contacts groups,command for the respective service.
please advice

Api:
curl -XGET "http://10.x.x.x/nagiosxi/api/v1/objects ... x&pretty=1"




{
"@attributes": {
"id": "3480"
},
"instance_id": "1",
"host_name": "10.x.x.x",
"service_description": "SNMP Traps",
"is_active": "1",
"config_type": "1",
"display_name": "SNMP Traps",
"check_interval": "1",
"retry_interval": "1",
"max_check_attempts": "1",
"first_notification_delay": "0",
"notification_interval": "1",
"passive_checks_enabled": "1",
"active_checks_enabled": "0",
"notifications_enabled": "1",
"notes": "",
"notes_url": "",
"action_url": "",
"icon_image": "snmptrap.png",
"icon_image_alt": ""
},
kyang

Re: Nagios xi report

Post by kyang »

You could try doing it towards servicestatus, which would include the check_command and more details.

Code: Select all

curl -XGET "http://192.168.x.xxx/nagiosxi/api/v1/objects/contact/servicestatus?apikey=t0bMmNo0qFu70qFZO93e8sSIqREI82WV2nHna5oTZc0gWFgK4ier47qOe4smlohm&pretty=1"
The help documentation for REST api, is the best to look at for now. Until we further update the REST api abilities.

You can narrow it down to a specific host_name with something like this.

Code: Select all

curl -XGET "http://192.168.4.125/nagiosxi/api/v1/objects/servicestatus?apikey=t0bMmNo0qFu70qFZO93e8sSIqREI82WV2nHna5oTZc0gWFgK4ier47qOe4smlohm&pretty=1&host_name=localhost"
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: Nagios xi report

Post by inas.labib »

Thanks , we will review the given api url
kyang

Re: Nagios xi report

Post by kyang »

Sounds good!

Otherwise, keep in mind there will be more API endpoints added into our upcoming 5.5 version of XI.

https://www.nagios.com/roadmaps/
Locked