Compare commits

..

2 Commits

Author SHA1 Message Date
Kameron Kenny c88b397a0c fix check ssl 2024-12-30 12:26:36 -05:00
Kameron Kenny 2ff689ae91 fix check ssl 2024-12-30 12:26:16 -05:00
3 changed files with 9 additions and 6 deletions

View File

@ -252,6 +252,8 @@ 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.6
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.7
networks:
infra_dev_net:
ipv4_address: 10.99.23.36

View File

@ -130,7 +130,6 @@ 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);
@ -153,17 +152,19 @@ if ($verbose) {
}
if ($daysLeft < 0) {
print "$PROGNAME: CRITICAL - $cn expired " . abs($daysLeft) . " day(s) ago.\n";
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";
} elsif ($daysLeft <= $critical) {
print "$PROGNAME: CRITICAL - only $daysLeft day(s) left for $cn.\n";
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";
exit $ERRORS{'CRITICAL'};
} elsif ($daysLeft <= $warning) {
print "$PROGNAME: WARNING - only $daysLeft day(s) left for $cn.\n";
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";
exit $ERRORS{'WARNING'};
} elsif ($verbose) {
print "$PROGNAME: $daysLeft day(s) left for $cn.\n";
print "$PROGNAME: $daysLeft day(s) left for $cn. m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
}
print "m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
exit $ERRORS{'OK'};
sub print_help {