Fix state saving in loggrepx_ plugin

The pattern under which the data was saved was different than the pattern under the data was loaded on the next run. The reason being an undefined variable that evaluates to the empty string. The result was that the number of matching lines reported was for the whole logfile instead of the time since the last run.
This commit is contained in:
Lucas Hoffmann 2019-12-19 14:47:03 +01:00 committed by Lars Kruse
parent 86bee01637
commit e3664c39d8
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ function fetch() {
echo "$var_prefix.value $matches"
# Push onto next state
nextstate+=("${var}_lines=$curlines")
nextstate+=("${var_prefix}_lines=$curlines")
done 3< <(echo "$LOGFILES")
# Write state to munin statefile