This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
juana
Posts: 44 Joined: Thu Nov 01, 2012 4:53 pm
Location: Monterey, CA
Post
by juana » Tue May 06, 2014 12:55 pm
Hello,
I would like to configure the following so that at 30 days Nagios can Warn me of SSL Cert experidation and at 15 days or less, it will send me a Critical alert:
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_http -H myhost.ext -C 14 -t 30
The above instead warns me 14 days before SSL Cert expiration. It goes critical once the cert has expired.
Thank you,
Juana
lmiltchev
Bugs find me
Posts: 13589 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Tue May 06, 2014 1:15 pm
Try:
Code: Select all
/usr/local/nagios/libexec/check_http -H myhost.ext -C 30,15
Be sure to check out our
Knowledgebase for helpful articles and solutions!
juana
Posts: 44 Joined: Thu Nov 01, 2012 4:53 pm
Location: Monterey, CA
Post
by juana » Tue May 06, 2014 1:53 pm
It did not like that:
Code: Select all
/usr/local/nagios/libexec/check_http -H myhost.ext -C 30,15
OUTPUT: check_http: Invalid certificate expiration period - 30,15
slansing
Posts: 7698 Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...
Post
by slansing » Tue May 06, 2014 3:15 pm
If you are using a valid host, you should see output similar to:
Code: Select all
OK - Certificate 'www.google.com' will expire on Tue 22 Jul 2014 01:00:00 AM CDT.
It almost appears as if you forgot to use the '-C' Try running that check against '
www.google.com '.
juana
Posts: 44 Joined: Thu Nov 01, 2012 4:53 pm
Location: Monterey, CA
Post
by juana » Tue May 06, 2014 3:36 pm
Code: Select all
[root@nagios user1]# /usr/local/nagios/libexec/check_http -H www.google.com -C 30,15
check_http: Invalid certificate expiration period - 30,15
Usage:
check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]
[-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-a auth]
[-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]
[-e <expect>] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]
[-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]
[-A string] [-k string] [-S] [--sni] [-C <age>] [-T <content-type>]
[-j method]
[root@nagios user1]#
Last edited by
juana on Tue May 06, 2014 3:41 pm, edited 1 time in total.
slansing
Posts: 7698 Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...
Post
by slansing » Tue May 06, 2014 3:39 pm
There is definitely seems to be something wrong with your check_http plugin, did you compile this one by hand? I would think that it just came down in the standard nagios plugins package with your XI install. Did you edit it at all? Or replace the plugin? It's almost as if it is stripping the 'C'. How about if you just run:
Code: Select all
/usr/local/nagios/libexec/check_http -H www.google.com
juana
Posts: 44 Joined: Thu Nov 01, 2012 4:53 pm
Location: Monterey, CA
Post
by juana » Tue May 06, 2014 3:43 pm
Code: Select all
[root@nagios user1]# /usr/local/nagios/libexec/check_http -H www.google.com
HTTP OK: HTTP/1.1 200 OK - 14531 bytes in 0.067 second response time |time=0.066683s;;;0.000000 size=14531B;;;0
[root@nagios user1]#
There are couple of us that manages the plugins. I believe this is the standard setup.
tmcdonald
Posts: 9117 Joined: Mon Sep 23, 2013 8:40 am
Post
by tmcdonald » Tue May 06, 2014 3:51 pm
What version is this?
Code: Select all
/usr/local/nagios/libexec/check_http --version
Former Nagios employee
juana
Posts: 44 Joined: Thu Nov 01, 2012 4:53 pm
Location: Monterey, CA
Post
by juana » Tue May 06, 2014 3:52 pm
check_http v1.4.15-3-g055b (nagios-plugins 1.4.15)
abrist
Red Shirt
Posts: 8334 Joined: Thu Nov 15, 2012 1:20 pm
Post
by abrist » Tue May 06, 2014 3:59 pm
The version of check_http (and the rest of the plugins in general) that you are running (v1.4.15-3-g055b) is a dirty github version number. There were a number of bugs fixed in the most recent versions (even a few check_http cert issues). You may want to update the plugins:
https://nagios-plugins.org/downloads/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the
Dark Side .