New upstream version 0.6.27
This commit is contained in:
25
contrib/fedora/logwatch/conf/logfiles/pnp4nagios.conf.in
Normal file
25
contrib/fedora/logwatch/conf/logfiles/pnp4nagios.conf.in
Normal file
@@ -0,0 +1,25 @@
|
||||
##########################################################################
|
||||
# $Id$
|
||||
##########################################################################
|
||||
|
||||
########################################################
|
||||
# This was written and is maintained by:
|
||||
# Chuck Lane <lane@dchooz.org>
|
||||
#
|
||||
########################################################
|
||||
|
||||
# What actual file? Defaults to LogPath if not absolute path....
|
||||
LogFile = @PERFDATA_LOG@
|
||||
Logfile = @logdir@/npcd.log
|
||||
|
||||
# If the archives are searched, here is one or more line
|
||||
# (optionally containing wildcards) that tell where they are...
|
||||
#If you use a "-" in naming add that as well -mgt
|
||||
Archive = @PERFDATA_LOG@?[0-9]+
|
||||
Archive = @PERFDATA_LOG@?[0-9]+.gz
|
||||
Archive = @logdir@/npcd.log.[0-9]+
|
||||
Archive = @logdir@/npcd.log.[0-9]+.gz
|
||||
|
||||
|
||||
*ApplyEuroDate =
|
||||
# vi: shiftwidth=3 tabstop=3 et
|
||||
21
contrib/fedora/logwatch/conf/services/pnp4nagios.conf
Normal file
21
contrib/fedora/logwatch/conf/services/pnp4nagios.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
# You can put comments anywhere you want to. They are effective for the
|
||||
# rest of the line.
|
||||
|
||||
# this is in the format of <name> = <value>. Whitespace at the beginning
|
||||
# and end of the lines is removed. Whitespace before and after the = sign
|
||||
# is removed. Everything is case *insensitive*.
|
||||
|
||||
# Yes = True = On = 1
|
||||
# No = False = Off = 0
|
||||
|
||||
Title = pnp4nagios-messages
|
||||
|
||||
# Which logfile group...
|
||||
LogFile = pnp4nagios
|
||||
|
||||
# *OnlyService = vsftpd
|
||||
#*RemoveHeaders =
|
||||
|
||||
|
||||
# vi: shiftwidth=3 tabstop=3 et
|
||||
71
contrib/fedora/logwatch/scripts/services/pnp4nagios.in
Normal file
71
contrib/fedora/logwatch/scripts/services/pnp4nagios.in
Normal file
@@ -0,0 +1,71 @@
|
||||
#!@PERL@
|
||||
##########################################################################
|
||||
# $Id: $
|
||||
##########################################################################
|
||||
# $Log: $
|
||||
# Rev for pnp4nagios 0.6.26 2022/10/23 lane@dchooz.org
|
||||
##########################################################################
|
||||
|
||||
use strict;
|
||||
use Logwatch ':all';
|
||||
|
||||
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
|
||||
my $DebugCounter = 0;
|
||||
|
||||
my @OtherList = ();
|
||||
|
||||
if ( $Debug >= 5 ) {
|
||||
print STDERR "\n\nDEBUG: Inside pnp4nagios Filter \n\n";
|
||||
$DebugCounter = 1;
|
||||
}
|
||||
|
||||
my $line = 0;
|
||||
#my $date = '\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d \[\d+\] \[\d+\]';
|
||||
while (defined(my $ThisLine = <STDIN>)) {
|
||||
if ( $Debug >= 5 ) {
|
||||
print STDERR "DEBUG($DebugCounter): $ThisLine";
|
||||
$DebugCounter++;
|
||||
}
|
||||
chomp($ThisLine);
|
||||
$ThisLine =~ s/^File truncated// if $line == 0;
|
||||
$line++;
|
||||
|
||||
if (
|
||||
($ThisLine =~ /Found Performance Data for/) or
|
||||
($ThisLine =~ /\d+ lines processed/) or
|
||||
($ThisLine =~ /\/var\/spool\/pnp4nagios\/service-perfdata\.\d+-PID-\d+ deleted/) or
|
||||
($ThisLine =~ /\/var\/spool\/pnp4nagios\/host-perfdata\.\d+-PID-\d+ deleted/) or
|
||||
($ThisLine =~ /PNP exiting \(runtime/) or
|
||||
($ThisLine =~ /process_perfdata.pl-[\.\d]+ starting in BULK Mode called by (NPCD|Nagios)/) or
|
||||
($ThisLine =~ /process_perfdata.pl-[\.\d]+ starting in SYNC Mode/) or
|
||||
($ThisLine =~ /process_perfdata.pl-[\.\d]+ starting in STDIN Mode/) or
|
||||
($ThisLine =~ /NPCD: Found \d+ files in/) or
|
||||
($ThisLine =~ /NPCD: ThreadCounter \d+\/\d+ File is/) or
|
||||
($ThisLine =~ /NPCD: Regular File: (host|service)-perfdata\.\d+/) or
|
||||
($ThisLine =~ /NPCD: A thread was started on thread_counter = \d+/) or
|
||||
($ThisLine =~ /NPCD: Processing file (host|service)-perfdata\.\d+ with ID \d+ - going to exec/) or
|
||||
($ThisLine =~ /NPCD: Have to wait: Filecounter = \d+ - thread_counter = \d+/) or
|
||||
($ThisLine =~ /NPCD: No more files to process\.\.\. waiting for \d+ seconds/) or
|
||||
0 # this line prevents blame-shifting as lines are added above
|
||||
)
|
||||
{
|
||||
if ( $Debug >= 6 ) {
|
||||
print STDERR "DEBUG($DebugCounter): line ignored\n";
|
||||
}
|
||||
} else
|
||||
{
|
||||
# Report any unmatched entries...
|
||||
push @OtherList, "$ThisLine\n";
|
||||
}
|
||||
}
|
||||
|
||||
###########################################################
|
||||
|
||||
if ($#OtherList >= 0) {
|
||||
print "\n**Unmatched Entries**\n";
|
||||
print @OtherList;
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
# vi: shiftwidth=3 tabstop=3 syntax=perl et
|
||||
Reference in New Issue
Block a user