[Pkg-nagios-devel] Bug#605469: send_nsca: consider adding --quiet option

Timo Juhani Lindfors timo.lindfors at iki.fi
Tue Nov 30 13:00:21 UTC 2010


Package: nsca
Version: 2.7.2
Severity: wishlist

When I use send_nsca from cronjobs like

#!/bin/sh
set -e
dumpdir=/data/mysqldump
dumper="mysqldump --defaults-file=/etc/mysql/debian.cnf -h localhost -u debian-sys-maint"
$dumper tau TauDatabase tau_measure > $dumpdir/tau.dump
...
...
report="$(find $dumpdir/*.dump -printf "%f %s, ")"
printf "data\tbackup-mysqldump\t0\t$report\n" | /usr/sbin/send_nsca -H nagios | grep -v "sent to host successfully."

it is really annoying that I need to use the grep to suppress output
that is printed when everything goes as requested.

Please consider the attached patch. It adds a --quiet option that does
not print "sent to host successfully" if at least one result was sent.

(There is only long option since I figured plain "-q" might collide
with something that upstream might add in the future.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: send_nsca_quiet_flag1.patch
Type: text/x-diff
Size: 978 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20101130/fe9045e8/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: send_nsca_document_quiet1.patch
Type: text/x-diff
Size: 671 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20101130/fe9045e8/attachment-0001.patch>
-------------- next part --------------



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5+lindi.5-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=fi_FI (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages nsca depends on:
ii  debconf [debconf-2.0]  1.5.36            Debian configuration management sy
ii  libc6                  2.11.2-6+squeeze1 Embedded GNU C Library: Shared lib
ii  libmcrypt4             2.5.8-3.1         De-/Encryption Library

nsca recommends no packages.

Versions of packages nsca suggests:
pn  nagios                        <none>     (no description available)
ii  nagios-plugins                1.4.15-2   Plugins for the nagios network mon
ii  nagios-plugins-basic          1.4.15-2   Plugins for the nagios network mon

-- debconf information excluded


More information about the Pkg-nagios-devel mailing list