Projet

Général

Profil

Révision e7bcfec0

IDe7bcfec037cd2f17fcd82e9e381ae36ef972159f
Parent 56cd2c92
Enfant 207f8011

Ajouté par Viktor Szépe il y a environ 9 ans

Modify munin_events following intrustions from @sumpfralle

Voir les différences:

plugins/munin/munin_events
39 39

  
40 40
=head1 VERSION
41 41

  
42
  1.2.20161017
42
  1.2.20160514
43 43

  
44 44
=head1 AUTHOR
45 45

  
......
70 70
do_value() {
71 71
    FIELD="$1"
72 72
    EVENT_LABEL="$2"
73
    EVENT_COUNT="$("$logtail_bin" -t "$muninupdate" 2> /dev/null | grep -c "^[0-9/: ]\{19\} \[${EVENT_LABEL}\]")"
74 73

  
75
    if ! [ -z "$(echo "$EVENT_COUNT" | sed 's|[0-9]\+||')" ]; then
74
    EVENT_COUNT="$("$logtail_bin" -t "$muninupdate" 2> /dev/null | grep -c "^[0-9/: ]\{19\} \[${EVENT_LABEL}\]")"
75
    if echo "$EVENT_COUNT" | grep -q "[^0-9]"; then
76 76
        echo "Cannot determine event count" 1>&2
77 77
        exit 10
78 78
    fi

Formats disponibles : Unified diff