From bba651d2708f18a6066c8b6b26540dda7d1e60c6 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Thu, 28 Sep 2023 17:31:21 +0200 Subject: [PATCH] added a caveat in 'serv.pm' and its doc about to have different logfiles when a service is defined multiple times --- lib/serv.pm | 5 +++++ man/man5/monitorix.conf.5 | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lib/serv.pm b/lib/serv.pm index d2935f5..b99c75e 100644 --- a/lib/serv.pm +++ b/lib/serv.pm @@ -259,6 +259,11 @@ sub serv_update { $sc[3] = "\".\"" unless $sc[3] ne "\"\""; # set "." as a minimal regex my @regex = split('\+', $sc[3]); my $IN; + + # FIXME + # $seek_pos does not distinguish between different + # logfiles when a service is defined multiple times. + my $seek_pos = $config->{serv_hist}->{$seek_str} || 0; if($logfile =~ m/^file:.+/) { $logfile =~ s/^file://; diff --git a/man/man5/monitorix.conf.5 b/man/man5/monitorix.conf.5 index dbd0777..6f3514a 100644 --- a/man/man5/monitorix.conf.5 +++ b/man/man5/monitorix.conf.5 @@ -3212,6 +3212,8 @@ You can create multiple definitions of the same service with different values, s .RE .P You can define as much entries as you want. +.P +Caveat: it does not distinguish between different logfiles when a service is defined multiple times. .RE .P .BI mode