Writing to nagios.cmd in Distributed Monitoring

Hi. Of course. My solution was to use the web API. The exact implementation can be seen here:

The link should be permanent, but including a copy/paste of it. It’s python code making a web request.

r = requests.get(self.checkmkhost + \
            'check_mk/view.py' + \
            '?_transid=-1&_do_actions=yes&view_name=service&_do_confirm=yes' + \
            '&host=' + host + \
            '&service=' + service + \
            '&_acknowledge=Acknowledge&_ack_sticky=on&_ack_notify=on' + \
            '&_ack_comment=' + comment + \
            '&output_format=json&_username=' + \
            self.checkmkusername + \
            '&_secret=' + \
            self.checkmksecret)
1 Like