Hey guys,
I want to use the API and automation user to request specific service groups or host groups and I hope there is a way to get back the status of all group members.
I would expect to get some sort of json data, which I could use and parse on a different server.
I already tried something like:
curl "http://127.0.0.1/mysite/check_mk/view.py?optservice_group=myservicegroup&servicegroup=myservicegroup&view_name=servicegroup&_username=automation&_secret=SECRET"
As per documentation, there does not seem to be a special request command or action like āget_servicegroupā. So Iām not sure how to use the webapi.py, which should look like:
curl "http://127.0.0.1/mysite/check_mk/webapi.py?action=get_host&_username=automation&_secret=SECRET&output_format=python" -d 'request={"hostname":"myhost"}'
Currently I am using another automation user to enable and disable custom downtimes for specific services and it works fine:
http://127.0.0.1/mysite/check_mk/view.py?host=HOSTNAME&service=SERVICENAME&site=mysite&view_name=service&_username=automation&_secret=SECRET&_do_confirm=yes&_transid=-1&_do_actions=yes&_down_comment=downtime-test&_down_from_now=From+now+for&_down_minutes=1&filled_in=actions
Could you give me a hint?