Compare commits

..

No commits in common. "c88b397a0c1d82b9001b5d94bde46d5c165a44f0" and "c994264033de6091d3ed7d81cda2d67192addc56" have entirely different histories.

3 changed files with 6 additions and 9 deletions

View File

@ -252,8 +252,6 @@ RUN cd /opt/nagios/etc/objects && \
RUN sed -i 's,/bin/mail,/usr/bin/mail,' ${NAGIOS_HOME}/etc/objects/000-commands.cfg && \
sed -i 's,/usr/usr,/usr,' ${NAGIOS_HOME}/etc/objects/000-commands.cfg
RUN cp /opt/nagios/libexec/utils.pm /usr/lib/aarch64-linux-gnu/perl-base/
#VOLUME "${NAGIOS_HOME}/var" "${NAGIOS_HOME}/etc" "/var/log/apache2" "/opt/Custom-Nagios-Plugins" "/opt/nagiosgraph/var" "/opt/nagiosgraph/etc"
CMD [ "/usr/local/bin/start_nagios" ]

View File

@ -12,7 +12,7 @@ services:
build:
dockerfile: Dockerfile
container_name: nagios
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.7
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.6
networks:
infra_dev_net:
ipv4_address: 10.99.23.36

View File

@ -130,6 +130,7 @@ close(OPENSSL);
$date =~ s/ +/ /g;
my ($month, $day, $hour, $min, $sec, $year, $tz) = split(/[\s+|:]/, $date);
print "m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
my $daysLeft = int((timegm($sec, $min, $hour, $day, $months{$month}, $year - 1900) - time()) / 86400);
@ -152,19 +153,17 @@ if ($verbose) {
}
if ($daysLeft < 0) {
print "$PROGNAME: CRITICAL - $cn expired " . abs($daysLeft) . " day(s) ago. m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
print "$PROGNAME: CRITICAL - $cn expired " . abs($daysLeft) . " day(s) ago.\n";
} elsif ($daysLeft <= $critical) {
print "$PROGNAME: CRITICAL - only $daysLeft day(s) left for $cn. m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
print "$PROGNAME: CRITICAL - only $daysLeft day(s) left for $cn.\n";
exit $ERRORS{'CRITICAL'};
} elsif ($daysLeft <= $warning) {
print "$PROGNAME: WARNING - only $daysLeft day(s) left for $cn. m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
print "$PROGNAME: WARNING - only $daysLeft day(s) left for $cn.\n";
exit $ERRORS{'WARNING'};
} elsif ($verbose) {
print "$PROGNAME: $daysLeft day(s) left for $cn. m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
print "$PROGNAME: $daysLeft day(s) left for $cn.\n";
}
print "m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
exit $ERRORS{'OK'};
sub print_help {