Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send_nsca: consider adding --quiet option #12

Closed
sebastic opened this issue Dec 9, 2016 · 4 comments
Closed

send_nsca: consider adding --quiet option #12

sebastic opened this issue Dec 9, 2016 · 4 comments

Comments

@sebastic
Copy link
Contributor

sebastic commented Dec 9, 2016

As reported by Timo Juhani Lindfors in Debian Bug #605469

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.)

send_nsca_document_quiet1.patch.txt
send_nsca_quiet_flag1.patch.txt

@jfrickson jfrickson self-assigned this Dec 14, 2016
@jfrickson
Copy link
Contributor

Sounds like a good idea. Looking into it.

@xavierba
Copy link
Contributor

xavierba commented Oct 31, 2019

I made #38 out of this.

xavierba added a commit to xavierba/nsca that referenced this issue Oct 31, 2019
Originally submitted by Timo Juhani Lindfors in
https://bugs.debian.org/605469

Reported upstream by Bas Couwenberg in
NagiosEnterprises#12
@xavierba
Copy link
Contributor

#38 was merged so this bug report can be closed as fixed.

@sawolf
Copy link
Contributor

sawolf commented Mar 26, 2020

Thanks for the reminder.

@sawolf sawolf closed this as completed Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants