1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Merge pull request #961 from bobkare/nullmailer-thresholds

Add support for configurable thresholds to nullmailer_queue plugin
This commit is contained in:
Lars Kruse 2018-11-29 21:31:35 +01:00 committed by GitHub
commit 7c397d94f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,18 +18,22 @@ will need to run as that user or root.
Additionally, the nullmailer queue directory may vary; in that case you
can specify it with the "queuedir" and "errordir" environment variables.
To add extra warning or critical thresholds set queue_warning,
failed_critical etc.
Example:
[nullmailer_queue]
user nullmail
env.queuedir /var/spool/nullmailer/queue
env.errordir /var/spool/nullmailer/failed
env.queue_warning 10
=head1 INTERPRETATION
This plugin will draw a stack of 2: the number of emails in the queue, and
the number of emails that have permanently failed sending. The latter has
a warning attached, since those should never happen.
a warning attached by default, since those should never happen.
=head1 MAGIC MARKERS
@ -50,9 +54,13 @@ GPLv2
=cut
. "$MUNIN_LIBDIR/plugins/plugin.sh"
queuedir=${queuedir:-/var/spool/nullmailer/queue}
errordir=${errordir:-/var/spool/nullmailer/failed}
failed_warning=${failed_warning:-0:0}
case $1 in
autoconf)
if command -v nullmailer-queue >/dev/null 2>/dev/null; then
@ -76,9 +84,12 @@ queue.info Number of emails currently in the queue
failed.label failed
failed.draw AREASTACK
failed.warning 0:0
failed.info Number of emails that have permanently failed to send
EOF
print_warning queue
print_critical queue
print_warning failed
print_critical failed
;;
*)