Skip to content

Commit

Permalink
add option randomdevno to searches, fix issue #65
Browse files Browse the repository at this point in the history
  • Loading branch information
lausser committed Jan 29, 2022
1 parent a6dbabe commit c29c3d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* 4.0.1.3 2022-01-29
add option randomdevno to searches, fix issue #65
* 4.0.1.2 2021-10-06
reenable sys/resource.ph
* 4.0.1.1 2021-09-28
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_REVISION ($Revision: 1.150 $)
AC_PREREQ(2.58)
AC_INIT(check_logfiles,4.0.1.2)
AC_INIT(check_logfiles,4.0.1.3)
AM_MAINTAINER_MODE([disable])
AM_INIT_AUTOMAKE
AC_CANONICAL_HOST
Expand Down
6 changes: 5 additions & 1 deletion plugins-scripts/Nagios/CheckLogfiles.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,10 @@ sub getfilefingerprint {
# aber als mahnmal fuer schlamperei und wegen des schoenen
# beispiel-mounts bleibt das stehen.
} @nfsmounts;
if (scalar(@mountpoints) && substr($mountpoints[0][2], 0, 3) eq "nfs") {
if ($self->get_option('randomdevno')) {
# issue #65, xfs and lvm and a kvm disk, device number changes on reboot
return sprintf "%d", (stat $file)[1];
} elsif (scalar(@mountpoints) && substr($mountpoints[0][2], 0, 3) eq "nfs") {
# At least under RedHat 5 we saw a strange phenomenon:
# The device number of an nfs-mounted volume changed from time
# to time, and so did the logfile fingerprint.
Expand Down Expand Up @@ -2137,6 +2140,7 @@ sub init {
perfdata => 1, case => 1, sticky => 0, syslogclient => 0,
savethresholdcount => 1, thresholdexpiry => 0, encoding => 0, maxlength => 0,
lookback => 0, context => 0, allyoucaneat => 0, randominode => 0,
randomdevno => 0,
preferredlevel => 0,
warningthreshold => 0, criticalthreshold => 0, unknownthreshold => 0,
report => 'short',
Expand Down

0 comments on commit c29c3d4

Please sign in to comment.