Hello,
We need to get availability of the hosts from command line. Kindly help us to get the same.
Nagiosxi availability from command line
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagiosxi availability from command line
Hi @mejokj,
A couple of questions to help narrow this down some more.
1. Are you looking to get the Availability report using the command line instead of the GUI?
2. Or, are you wanting to pull status information on the state of a host using the command line? If this is the case, then the REST API can handle this task. Navigate to Help > API Docs > Objects Reference and take a look at GET GET objects/hoststatus
Regards,
Benjamin
A couple of questions to help narrow this down some more.
1. Are you looking to get the Availability report using the command line instead of the GUI?
2. Or, are you wanting to pull status information on the state of a host using the command line? If this is the case, then the REST API can handle this task. Navigate to Help > API Docs > Objects Reference and take a look at GET GET objects/hoststatus
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagiosxi availability from command line
Hello
Yes Iam trying to get availability report from command line instead of GUI for a specific time period like last 24 hours like that.
Yes Iam trying to get availability report from command line instead of GUI for a specific time period like last 24 hours like that.
Re: Nagiosxi availability from command line
Hi,
How are you doing?
I followed the example from the below URL (Nagios Exchange) page:
https://exchange.nagios.org/directory/A ... df/details
Here's the command I came up with, getting the availability report for "localhost":
NOTE: please replace "XXXX" with your nagiosadmin's password and "x.x.x.x" is your Nagios IP address.
PDF output file is in "/tmp"
Best Regards,
Vinh
How are you doing?
I followed the example from the below URL (Nagios Exchange) page:
https://exchange.nagios.org/directory/A ... df/details
Here's the command I came up with, getting the availability report for "localhost":
NOTE: please replace "XXXX" with your nagiosadmin's password and "x.x.x.x" is your Nagios IP address.
PDF output file is in "/tmp"
Code: Select all
/usr/bin/wkhtmltopdf --username nagiosadmin --password XXXX "https://x.x.x.x/nagios/cgi-bin/avail.cgi?show_log_entries=&host=localhost&timeperiod=last24hours" /tmp/last24.pdf
Best Regards,
Vinh