When I manually run the command
./check_smtp -H email.example.com -S -D 60
I get
OK - Certificate will expire on 01/24/2016 23:59.
When I set it up to be monitored with
check_smtp! -H email.example.com -S -D 60
The result is
SMTP OK - 0.006 sec
How do I get nagios to display the same results and monitor the certificate that the manual check does?
Thanks,
Alex
Your previous post has been deleted, do not double post. -Slansing
check_smtp Monitor a TLS certificate
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_smtp Monitor a TLS certificate
Could you please post the service definition and command definition that you are using, so that we can compare them.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: check_smtp Monitor a TLS certificate
define service{
use generic-service
host_name email-gw1.onb.com
service_description email-gw1.onb.com
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups ssl-certificate-admins
notification_interval 120
notification_period ssl-cert-workhours
notification_options c,r
check_command check_smtp! -H email-gw1.onb.com -S -D 365
}
use generic-service
host_name email-gw1.onb.com
service_description email-gw1.onb.com
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups ssl-certificate-admins
notification_interval 120
notification_period ssl-cert-workhours
notification_options c,r
check_command check_smtp! -H email-gw1.onb.com -S -D 365
}
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_smtp Monitor a TLS certificate
Could you also provide the command definition for check_smtp please.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: check_smtp Monitor a TLS certificate
Thanks sreinhardt. Nagios was kind of dumped on us with little to no training. I did not know about the command definitions. Once I got that created for the check I was wanting to do everything worked as hopes. I appreciate the help.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_smtp Monitor a TLS certificate
You're welcome, glad that worked for you!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.