Page 1 of 1
Report or list of services, commands and arguments
Posted: Thu Jun 11, 2020 12:52 am
by lilydalehs
Hi All,
is it possible to run a report (or do a db query) which would allow me to get a list of all services with the associated commands and arguments. In particular I'm after the arguments so that I can do some verification against our current setup.
I have resumed looking after a site and I believe that interim techs have moved ports on switches and I'd like to do some QA on the commands. In particular, the $ARG1$ from the attached image.
Cheers,
Chris.
Re: Report or list of services, commands and arguments
Posted: Thu Jun 11, 2020 2:39 pm
by benjaminsmith
Hi Chris,
I believe the API might do the trick here. You can pull all of the current services in the CCM using the following example:
Code: Select all
curl -XGET "HTTP://ipaddress/nagiosxi/api/v1/config/service?apikey=123&pretty=1"
and then filter the data to your choosing. More details on the Config API endpoint by going to Help > API Docs in the GUI.
Let me know if you have further questions.
Re: Report or list of services, commands and arguments
Posted: Tue Jun 16, 2020 7:39 pm
by lilydalehs
Hi benjaminsmith,
thanks for the info. It seems our nagios version is a little too old for that one. That command returns "Not implemented yet", so I will have to wait till I can upgrade.
Cheers,
Chris.
P.S. I spent a bit of time digging around in the nagios database and discovered the data I'm interested in so I think I'll do it that way. Thanks for the other info anyway.
Re: Report or list of services, commands and arguments
Posted: Wed Jun 17, 2020 6:58 am
by scottwilkerson
lilydalehs wrote:Hi benjaminsmith,
thanks for the info. It seems our nagios version is a little too old for that one. That command returns "Not implemented yet", so I will have to wait till I can upgrade.
Cheers,
Chris.
P.S. I spent a bit of time digging around in the nagios database and discovered the data I'm interested in so I think I'll do it that way. Thanks for the other info anyway.
Glad you found a solution!
Locking thread