diff --git a/plugins/logevents/loggrepx_ b/plugins/logs/loggrepx_ similarity index 97% rename from plugins/logevents/loggrepx_ rename to plugins/logs/loggrepx_ index 2c3a5c02..c738ea4d 100755 --- a/plugins/logevents/loggrepx_ +++ b/plugins/logs/loggrepx_ @@ -100,8 +100,8 @@ function config() { while read -u 3 -r logfile; do var_prefix="$(echo "$logfile" | sed -r 's/^[^a-zA-Z]+//g' | sed -r 's/[^a-zA-Z0-9]+/_/g')" var="${var_prefix}_label" - lbl="${!var:-0}" - echo "$var_prefix.label $([ -n "$lbl" ] && echo "$lbl" || echo "$logfile")" + lbl="${!var:-$logfile}" + echo "$var_prefix.label $lbl" print_warning "$var_prefix" print_critical "$var_prefix" echo "$var_prefix.info Lines that match '${regex}' in log file '$logfile'" diff --git a/plugins/logevents/service_events b/plugins/logs/service_events similarity index 100% rename from plugins/logevents/service_events rename to plugins/logs/service_events