I’m writing an lql api Server/Client for Check_MK its available on Github. I do that because I haven’t found a proper solution to get all data from /mysite/check_mk/views.py.
lql-api supports connection’s to the socket over ssh and locally, for both versions there is a client (a simple replacement for lql and lql over ssh with some parsing).
It’s written in Go (also named golang) and the server supports OpenAPI 3.0.
Both the “localserver” and the “sshserver” expose the same endpoints,
you can view them when you run “sshserver” and point an OpenAPI browser for example the swagger petstore to http://localhost:8080/openapi.json
A yes both support Basic auth with a .htpasswd, where the sshserver automatically picks the one from wato.
I realy want lql-api to be part of omd, this would require the omd apache to be recompiled with mod_proxy_http.
Please let me know, if you find bugs/have improvements.
Kind regards,
René from Austria
P.s.: once I discovered the forum I found out that the CheckMK Team works on an API, I’ll still work on this as the official API is far from being complete yet.
I’m writing an iOS/Android App for CheckMK and it was hard for me to catch all required data (like the tactical_overview data) from views.py. Maybe I should have looked longer.
But also I don’t want to have users to create Views for my App, so I need a proper API.
Last but not least my API supports none Automation users, which is I think important.
Detect if a user is Admin and do not send AuthUser, this is done by parsing the wato/users.mk with python, the users.mk will be watched by inotify for changes.