Page 1 of 1

check_smtp Monitor a TLS certificate

Posted: Fri Mar 07, 2014 5:11 pm
by ONB
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

Re: check_smtp Monitor a TLS certificate

Posted: Mon Mar 10, 2014 10:12 am
by sreinhardt
Could you please post the service definition and command definition that you are using, so that we can compare them.

Re: check_smtp Monitor a TLS certificate

Posted: Mon Mar 10, 2014 1:59 pm
by ONB
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
}

Re: check_smtp Monitor a TLS certificate

Posted: Mon Mar 10, 2014 2:11 pm
by sreinhardt
Could you also provide the command definition for check_smtp please.

Re: check_smtp Monitor a TLS certificate

Posted: Mon Mar 10, 2014 3:54 pm
by ONB
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.

Re: check_smtp Monitor a TLS certificate

Posted: Mon Mar 10, 2014 4:01 pm
by sreinhardt
You're welcome, glad that worked for you!