Apache mod_watch monitoring plugin

Monitoring plugin for Apache with mod_watch module

Collects request and document counts.

Plugin supports Nagios, Collectd and Influx Line Protocol output formats.

Requirements:

Example Apache config

LoadModule watch_module libexec/apache24/mod_watch.so
<VirtualHost 127.0.0.1:8080>
    <Location /watch-list>
        SetHandler watch-list
    </Location>
</VirtualHost>

Collectd output format requires this line in types.db file:

apache  docs:GAUGE:0:U, reqs:GAUGE:0:U

Plugin parameters

<watch-list url>
    [Required] watch-list URL, e.g. http://login:pass@127.0.0.1:8080/watch-list?auto
<domain.com,example.org,...>
    [Required] Comma-separated list of domains to monitor (used as type-instances for collectd and as "domain" tag for influxlp)
<collectd|influxlp>
    [Optional] Output format - nagios, collectd, influxlp (defaults to nagios)

<u>Collectd format:</u>
&lt;myhost.com&gt;
    [Optional] Hostname (defaults to current system hostname)
&lt;myplugin&gt;
    [Optional] Plugin name (defaults to apachewatch)
&lt;300&gt;
    [Optional] Interval (defaults to 60 sec)

<u>Influx Line-Protocol format:</u>
&lt;mymeasurement&gt;
    [Optional] Measurement name (defaults to apachewatch)

Graph example (InfluxDB + Grafana):

InfluxDB + Grafana