mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +00:00
Modify munin_events following intrustions from @sumpfralle
This commit is contained in:
parent
56cd2c926c
commit
e7bcfec037
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue