API or CLI host list
-
- Posts: 39
- Joined: Thu Nov 16, 2017 6:46 am
API or CLI host list
Hello.
How to list servers or even better server’s group (host lists) using API?
Or save https://nagios_logsever_server/nagioslogserver/reports/hosts to csv report file from CLI (bash script)…
I can't find it in online documentation
DarekN.
How to list servers or even better server’s group (host lists) using API?
Or save https://nagios_logsever_server/nagioslogserver/reports/hosts to csv report file from CLI (bash script)…
I can't find it in online documentation
DarekN.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: API or CLI host list
HI DarekN,
That's a good question, and I can double-check this as well, but the best option is to use hosts report as CSV to retrieve this information.
Benjamin
As a future reference and to supplement what's in the gui documentation, the following page as some handy API examples for Log Server.
https://support.nagios.com/kb/article/n ... s-596.html
That's a good question, and I can double-check this as well, but the best option is to use hosts report as CSV to retrieve this information.
Benjamin
As a future reference and to supplement what's in the gui documentation, the following page as some handy API examples for Log Server.
https://support.nagios.com/kb/article/n ... s-596.html
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!
-
- Posts: 39
- Joined: Thu Nov 16, 2017 6:46 am
Re: API or CLI host list
Yes please, check it out.
I wish to get some automation to receive these data.
Manual download is good only from time to time, not for daily monitoring of amount of hosts registered or/and sending data.
DarekN.
I wish to get some automation to receive these data.
Manual download is good only from time to time, not for daily monitoring of amount of hosts registered or/and sending data.
DarekN.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: API or CLI host list
Hi DarekN,
I looked into this and right now it's possible to pull reports from the API.
Let me know if you have any other questions.
I looked into this and right now it's possible to pull reports from the API.
Let me know if you have any other questions.
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!
-
- Posts: 39
- Joined: Thu Nov 16, 2017 6:46 am
Re: API or CLI host list
Great,
but where I can find full API command references for Nagios LS? …or at last the part with listing servers (or pulling report, as u mentioned).
On the examples web page there is no info about listing servers... and I can’t find API documentation on website.
DarekN.
but where I can find full API command references for Nagios LS? …or at last the part with listing servers (or pulling report, as u mentioned).
On the examples web page there is no info about listing servers... and I can’t find API documentation on website.
DarekN.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: API or CLI host list
Hi DarekN,
You'll find the API reference in the user interface, just go to Help > References > API Reference.
Let me know if you have any more questions.
Benjamin
You'll find the API reference in the user interface, just go to Help > References > API Reference.
Let me know if you have any more questions.
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!
-
- Posts: 39
- Joined: Thu Nov 16, 2017 6:46 am
Re: API or CLI host list
I was hoping more straightforward answer then riddles ..since you checked it out and posted it's there.
Help > References > API Reference, It's usefull information, there is description how to access alarm history, logstash log, dashboards, ...but I can't see any clue how to get host raport or json dictionary with host list.
Help > References > API Reference, It's usefull information, there is description how to access alarm history, logstash log, dashboards, ...but I can't see any clue how to get host raport or json dictionary with host list.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: API or CLI host list
HI,
Apologies for any confusion. As mentioned, it's not possible to generate that type of report from the API. The best workaround would be to download the unique hosts report as a CSV file.
Apologies for any confusion. As mentioned, it's not possible to generate that type of report from the API. The best workaround would be to download the unique hosts report as a CSV file.
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!
-
- Posts: 39
- Joined: Thu Nov 16, 2017 6:46 am
Re: API or CLI host list
OK, I see, so it's not possible after all.benjaminsmith wrote:(...)
I looked into this and right now it's possible to pull reports from the API.
(...)
It would be nice feature for monitoring purposes, maybe you could post it to LS road map as customer request/idea/vote.
Thank you for help, and information.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: API or CLI host list
Hi,
No problem. I put in an internal feature request on your behalf for this capability.
No problem. I put in an internal feature request on your behalf for this capability.
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!