Hi Team,
What is CGI in Nagios XI, is it command line feature, can we use any commands to get reports. I would like to get a report of host groups and members of host groups in text or csv format. In some other question I was told by you Tech guy i.e API not support in our existing Nagios XI version 5.2.7
Please let me know how to get the required report in text, csv or other file format in other way than API. Thanks in advance.
CGI commands and scripts
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: CGI commands and scripts
With that old of a version you cannot get it from Nagios XI API, but it is available from the Nagios Core JSON API
Go to the following URL (you will need to re-authenticate)
Go to the following URL (you will need to re-authenticate)
Code: Select all
http://<SERVER_IP>/nagios/cgi-bin/objectjson.cgi?query=hostgrouplist&details=trueRe: CGI commands and scripts
H scottwilkerson,
Thanks for sharing. I tried in a different ways, but not succeded, can we get all details like Hostgroup and its Hosts, Status and Services. In my screen shot group adgkapp has two hosts, each host has some (5) services, these details also want to get. It is easy to us. Please suggest.
Thanks for sharing. I tried in a different ways, but not succeded, can we get all details like Hostgroup and its Hosts, Status and Services. In my screen shot group adgkapp has two hosts, each host has some (5) services, these details also want to get. It is easy to us. Please suggest.
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: CGI commands and scripts
This is not available in a single API pull. It is definitely easier if you upgrade to the latest and can use the Nagios XI APIs though