File: patterninstate.cfg

package info (click to toggle)
monitoring-plugins-check-logfiles 4.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,992 kB
  • sloc: perl: 19,492; sh: 3,422; makefile: 72; awk: 41
file content (24 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
        $protocolsdir = "./var/tmp";
        $seekfilesdir = "./var/tmp";
        @searches = (
            {
              tag => "door",
              logfile => "./var/adm/messages",
              criticalpatterns => ["door open", "window open"],
              warningpatterns => ["door unlocked", "window unlocked"],
              okpatterns => ["door closed", "window closed"],
              options => "supersmartscript",
              script => sub {
                my $pattern = $CHECK_LOGFILES_PRIVATESTATE->{matchingpattern};
                printf "my pattern was (%s)
", $pattern;
                $pattern =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
                printf STDERR "encoded pattern is %s
", $pattern;
                $pattern =~ s/%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
                printf STDERR "decoded pattern is %s
", $pattern;
                return 2;
              }
            }
        );