From b26ba8e6bd65d67aa23cce32e8dd9d5c6d9d12b7 Mon Sep 17 00:00:00 2001 From: Kael Shipman Date: Thu, 15 Nov 2018 14:27:29 -0600 Subject: [PATCH] Bugfix and re-positioning --- plugins/{logevents => logs}/loggrepx_ | 4 ++-- plugins/{logevents => logs}/service_events | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename plugins/{logevents => logs}/loggrepx_ (97%) rename plugins/{logevents => logs}/service_events (100%) 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