Hi Ferenc,

I also tried to use the Icinga Web REST API but it seems not to be made for any 
usage outside of Icinga Web itself.
There were some massive changes also in minor version updates and documentation 
is a problem, as you already found out.
We implemented a http exporter service for mk_livestatus socket and icinga.cmd 
file. We use it for our deployment automation tool to schedule a downtime for 
hosts during deployment.
It is also used to transport commands from remote icinga-web instances to 
multiple icinga instances (much better than SSH in our environment).

If you are interested:
http://mathias-kettner.de/checkmk_livestatus.html
https://github.com/ImmobilienScout24/livestatus_service
https://github.com/marco-hoyer/icinga-web-module-http-console-connection

Kind regards,
Marco

Am 20.01.2014 um 11:55 schrieb Ferenc Stelcz 
<ferenc.ste...@gmail.com<mailto:ferenc.ste...@gmail.com>>:

Hi!

I'm making myself familiar with the Icinga Web REST API, but I'm stuck and 
can't figure out what the problem could be.

I have a production Icinga (1.8.4) with icinga-web 1.8.1.

auth.xml is configured to enable api key authentication. Have added a 
"dashboard" user with api key "dashboard" and with the only privilege 
appkit.api.access.

If I query the api via GET I get the correct results as it should be. (GET: 
http://prod-icinga/icinga-web/web/api/service/authkey=dashboard/json)

Now, I have a testing Icinga from the opensuse build service (Icinga 1.10.0, 
backend 1.10.0, icinga-web 1.10.0). If I add the "dashboard" user with the 
exact same settings as above and try to query the API I get the following (GET: 
http://test-icinga/icinga-web/web/api/service/authkey=dashboard/json)


{"result":[[],[],[],[],[],[],[],[],[],[],[],[],[],[]],"success":"true"}

(number of brackets is correct, as I only have 14 services defined in my 
environment but no real data)

I've seen the above output in one of the Wiki comments, but setting the same 
api key as the username does not seem to work. As the Web REST API in my 
opinion is pretty poorly documented (is it anywhere, but the sources?) I would 
like to ask you for your help. Were there any non-documented changes in 
authentication, authorization, api call syntax or whatever?




Thank you in advance,

Ferenc STELCZ

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org<mailto:icinga-users@lists.icinga.org>
https://lists.icinga.org/mailman/listinfo/icinga-users

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to