Monitoring HTTP service on different IPs on the same host

Someone from the docs team here: I’ve got a ticket on documenting macros across the Official User Guide as well as one on rewriting the article on Developing Your Own Check Plugins. Given limited resources, guess which one I’d prefer to do.

Let me explain my motivations: Macros are prone to errors, especially regarding escaping and thus pose some risk to attacks. Next is that check_http is an executable, thus every time it is called, a process is spawn. Last is that check_http is taken vanilla from monitoringplugins.org to maintain Nagios compatibility. This also means bug and limitation compatibility. And there are plenty of bugs and limitations…

Personally I would recommend that, if you run into trouble with check_http, write a Checkmk check plugin that does your task and nothing more. Depending on your setup this might be a “special agent plugin”.

Going back to the initial task, that is to check if the web interface on the secondary IP address answers in time, this check would just be iterating over IP addresses and returning a positive result, if exactly one IP address provides the management interface and answers in time. This wouldn’t even need GUI components, a single check plugin should be sufficient.