Nope, it is not parsing the date correctly for the .us domains. (it is pulling it and sees that it most of a date, so it looks like my sed statements need love.)
If you are willing to post what your developer did, I will happily get this updated. I will poke at this when I get to work tonight as well, and see if I can find a better solution.. Grin, I did not even THINK about .us and the other smaller domain suffix'es... Sigh..
Message was edited by: guyverix On the plus side, both jwhois and whois pull the basic information needed, so it is closer to being ready for prime time. Grin
I'll post the updated script that has support for .us domains in a couple hours (once I get into work).
Again, thanks for all your work on this expanded functionality!
Here is the updated script. It honors nagios style returns, also now has support for second level domains (IE theregister.co.uk) New option flag is -n for nagios style return values. Missing manditory binary files also generate a Nagios class error (warn Retval 1) Threshold crossing is retval 1, Expired domains are retval 2.
Example:
GOOD threshold NOT crossed:
./check_domain.sh -x 30 -d theregister.co.uk -n
Status OK | theregister.co.uk Valid 14-Mar-2010 Days=135 NetNames Limited
BAD threshold crossed:
/check_domain.sh -x 300 -d theregister.co.uk -n
Status Warn Domain expire days=135 | Domain theregister.co.uk will expire in 300 -days or less. Days=135
I will be updating the zenpack with this new script, and updating the internal templates for it soon!
Since all of the other functions have been left intact (other than replacing someones email address with root@localhost as a default for expiring domains) I will attach the script here since the disclamer looks like it is open for anyone to use, and is so darn useful! Grin.
Here is the complete Zenpack. I have made some changes in the graphing as well as the events. There now is a legitamate threshold created for both domain expiration and SSL cert expiration for 2 days before they expire.
Currently the zenpack is configured to behave in this way:
1) 30 days before expiration, Yellow alarms (warnings).
2) 2 days before expiration it will cross the RRD threshold and you will ALSO start getting criticals for that threshold, as well as the Yellow warning alarms. 3) After expiration you will get both Nagios and Thresholds as critical events.
The SSL certs behave in the same fashion. Yellow alarms for 30 days, critical alarms at 2 days from threshold as well as yellows. Expiration when both go critical...
If a tech missess all of that, give up (grin).
As before, the RRD graphs are there for people who wish to look at an almost striaght line. (the graphs can be disabled, with no impact to the thresholds's)
Same as before, when you install the ZenPack, you are going to have to copy the check_certs_Nagios.sh and the check_domain.sh from inside the ZenPack directory to /usr/local/zenoss/common/libexec **
**I still have not figured out why the ZenPack refuses to do this (okay, I know why.. I am goofing something up... Heh)
** I have also re-enabled jwhois inside check_domain.sh since my production server is on Ubuntu. if you are using something else, just comment it out, and uncomment the whois text above it.
EDIT: Please disreguard (had to set scripts to executable)
Testing this Zenpack and script, but I'm having "RRD File not found" on the performance graphs.
Any ideas?
I can run everything fine manually and from the template (Test Against Device works also). My issue is on the perf graphs.
Hostname below changed for obvious reasons.
Missing RRD file: hostname.domain.com SSL_Check_Days
I moved my templates to /SSL Certs and /Domains and split the templates up in my setup.
That way I can put hosts (www.hostname.com) in SSL Certs and domains (hostname.com) into the Domains.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||