General check to read results of web-apis

Hallo,
perhaps it is possible to develop a check to monitor results of web-apis.
field 1 complete url
field 2 expected type string or value
field 3 conditions like expected string, value or others that make sense.

Ralf

At first glance, this sounds good to me but think of the multitude of results a Web-API can have. Some just return “200 OK”, some return a JSON result, Kettner preferably returns Python structures, and some return CSV. I haven’t encountered binary responses yet but I wouldn’t be surprised.

Granted, it’s just text after all (maybe base64 encoded).
Still, I don’t consider it easy to build a generic Web-API check.

It also depends on what you want to cover with it.

Do I understand you as you want to send a defined API call somewhere and get a result back which is then compared ?

*deutsch
Es kommt ja auch darauf an was du über haupt alles damit abdecken willst.

Verstehe ich dich so, du willst einen definierten API Aufruf irgendwohin senden und ein Ergebnis zurück erhalten, was dann verglichen wird ???
Gruß Bernd

Yeap.
Das wäre die Idee dahinter.
Dann müsste man nicht immer checks bauen sondern könnte eine fertige Lösung nutzen.
Wäre mit Sicherheit auch für Nutzer hilfreich die Administration und IT nur nebenbei erledigen können.
Klar kann man man die Apis von z.B. Rancher, Elk und der Docker-Registry nicht über einen Kamm scheren aber letzlich geht es dch immer um Adresse aufrufen und Resultat zurück bekommen.

Gruss

Gruss

Also nur eine Erweiterung des:

**HTTP Form Check - check_form_submit

möglicherweise tatsählich ja
Gruss

Ich schau mir das nächste Woche mal an,

sofern nicht schon einer eifriger ist :wink:

Hallo,
wenn du was hast würde ich einen meiner Studenten bitten das Thema mit aufzunehmen.
Er kann dabei sicher noch was lernen.

Gruss
Ralf

Hi Ralf,
I am using webinject for this scenario. Create a list of steps to check in the webinject xml file and check the result with Roberts extension (https://github.com/HeinleinSupport/check_mk_extensions/tree/master/webinject). It can also complex scenarios like fill a form, send it and check the response of the next webpage.

This can mostly already be done with check_http (ruleset “Check HTTP service”).