Page 2 of 2

Re: Get a nice text or CSV dump of all configured alerts

Posted: Wed Aug 08, 2012 8:30 am
by rez1sog
This is really good. I will take a look at this and see what I can get for info. Quick question, how do you pass in the user/pass info in the string so that you can get auth for the request?

Re: Get a nice text or CSV dump of all configured alerts

Posted: Wed Aug 08, 2012 9:07 am
by scottwilkerson
If you follow the instructions in
http://assets.nagios.com/downloads/nagi ... nd_API.pdf

You will get the username and ticket combinations in the component that will authenticate the user

Re: Get a nice text or CSV dump of all configured alerts

Posted: Mon Aug 13, 2012 1:39 pm
by rez1sog
Thanks. What would be the command that could have the list of services, hosts and what the contact info is? I have not found any of the commands that tie the service -> to the contact info.

Re: Get a nice text or CSV dump of all configured alerts

Posted: Mon Aug 13, 2012 3:26 pm
by mguthrie
We don't currently have that built into the API, so getting that into a CSV export could be a little bit tricky at the moment. The queries to determine if users are authorized for an object get pretty ugly

Re: Get a nice text or CSV dump of all configured alerts

Posted: Wed Aug 22, 2012 1:50 pm
by benhank
I found that if you cut and past the links into your browser (firefox works best) you can then save the page as an xml file. then open that file in MS Excell and it will format the info in such a way that you need to see to believe. The you can create can create a sweet csv file.

Re: Get a nice text or CSV dump of all configured alerts

Posted: Wed Aug 22, 2012 2:31 pm
by scottwilkerson
That's correct, the API will deliver XML output.