The check_http plugin is a robust tool for doing basic HTTP checks, and has many useful capabilities.
Most Zenoss users probably get to the point, however, where would like to check multiple URLs on the same device. With the Device-based template that ships with Zenoss, this makes handling the templates somewhat awkward. I have tried to solve this in several ways, each has had its drawbacks.
With great thanks to the community, particularly the “Example Zenpack” and the “MenuExamples Zenpack” (this wouldn’t have been possible without them), I have achieved a decent solution that fits well within the standard “Zenoss” management framework.
I’ve published a Zenpack that provides a “wrapper” around the basic “check_http” plugin that ships with Zenoss and with Nagios.
The key is to treat each HTTP monitor instance as a manually-added device component (like a File System). The component is not affected by the modeler process, but individual URLs can be added/removed/modified through the device “Add Component” menu (thanks again to MenuExamples).
The particular attributes for each URL are assigned through a dialog:
But can be later modified on the component Details pane:
Since it’s a component, the RRD template is applied separately to each monitored URL, which each set of graphs displayed uniquely per URL (like other device components).
Additionally, there’s a “wrapper” shell script included with the Zenpack that handles the optional arguments before passing them to the check_http plugin, so it can handle the component attributes that may or not be present (such as authentication, found string,POSTs,etc).
While it may need a bit more polish (for instance, a complicated URL could contain invalid characters for the component ID, and I haven’t fixed this yet), I think this is a good way to handle the need for multiple manually-created monitors on a single device, and I plan to re-use this model as a “skeleton” to
handle other similar monitoring needs (like generic NRPE checks and log file monitoring).
The Zenpack is here: