Page 1 of 1

Read Only User for CCM that can access json cgi

Posted: Wed Jan 14, 2015 10:03 am
by WillemDH
Hello,

I'm experimenting with the new json cgi's. So I would like to create a script that queries a json url, saves it into a Powershell object and then do some stuff with it. But I need to enter the nagios admin username and password.
What would be the best way to access his json cgi remotely? I would think a read-only user is required, as I would prefer not to use nagiosadmin in my Powershell scripts. How would I make a read-only account for CCM?

Thanks again!

Grtz

Willem

Re: Read Only User for CCM that can access json cgi

Posted: Wed Jan 14, 2015 12:54 pm
by abrist
The json cgis and the ccm are different things.
The ccm is a frontend to our fork of nagiosql - it provides an interface to configure nagios monitoring objects.
The json cgis are provided through a get/post api from core. You can query the cgis without logging into the ccm or xi. Just create an XI user and log in once to set up the account and change the password. Make this user read only but allow it to see all objects. Afterwards you can query the json cgis with:

Code: Select all

http://<username>:<password>@<ip>/nagios/cgi-bin/<cgi>?<query>

Re: Read Only User for CCM that can access json cgi

Posted: Fri Jan 23, 2015 12:21 pm
by WillemDH
Got this working Andy. Thanks for the help. Thread can be closed.