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

Modify munin_events following intrustions from @sumpfralle

This commit is contained in:
Viktor Szépe 2016-10-22 18:44:20 +00:00
parent 56cd2c926c
commit e7bcfec037

View file

@ -39,7 +39,7 @@ INFO, WARNING, ERROR, FATAL.
=head1 VERSION
1.2.20161017
1.2.20160514
=head1 AUTHOR
@ -70,9 +70,9 @@ logtail_bin=${logtail_bin:-/usr/sbin/logtail2}
do_value() {
FIELD="$1"
EVENT_LABEL="$2"
EVENT_COUNT="$("$logtail_bin" -t "$muninupdate" 2> /dev/null | grep -c "^[0-9/: ]\{19\} \[${EVENT_LABEL}\]")"
if ! [ -z "$(echo "$EVENT_COUNT" | sed 's|[0-9]\+||')" ]; then
EVENT_COUNT="$("$logtail_bin" -t "$muninupdate" 2> /dev/null | grep -c "^[0-9/: ]\{19\} \[${EVENT_LABEL}\]")"
if echo "$EVENT_COUNT" | grep -q "[^0-9]"; then
echo "Cannot determine event count" 1>&2
exit 10
fi