Call a special url in case of a failure

Hi dear check_mk users,

I’m pretty new in this forum, but I’m just wondering, if there is a chance to send a special URL to a Restful API Endpoint in case of a fail.

I use ioBroker to automate my home and even a few IT components in my home. So just restarting a router, accesspoint, VPN Tunnel or something else. should be no problem.

Best regards
Bjoern

Hi Björn,

Ist that what you looking for?

Hi MakuBa,

looks good. Just put a little script into ~/local/share/check_mk/notifications called it ioBroker and right now all my linux hosts, proxmox enviroment and unifi equiptment can be restartet automatically.

curl http://192.168.X.X:8087/set/proxmox.0.qemu_XXX.start?value=1

How can I seduce the tripple X with the hostname in the middle and set the right hostname? am I right to use $NOTIFY_HOST variable? Just tried it, but it did not work.

Best regards
Bjoern

Hi,
if you need a list of all valid values: Change the HTML-notification to get them:

Karl

Hi together,

got all things up and running. Just restarting critical machines on my both proxmox clusters via api calls 5 Minutes after a fail has been detected.

The Script looks very simple:

#!/bin/bash

ioBroker simple API

curl http://192.168.X.X:8087/set/proxmox.1.qemu_$NOTIFY_HOSTALIAS.start?value=1

exit 0

The script is only running for those hosts which have the label proxmox1.

Many thanks for the hints.

Best regards
Björn

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.