Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

Kirk

Reviews(3)
byKirk, February 15, 2013
This is working great for me. I modified the output so that the number of days is always shown last, it makes it much easier to scan down the list for me.

I also created a dummy host that loops back to the nagius server (127.0.0.1) named "Domain-Expiration-Checks" then created a custom command and service checks for each domain. This requires quite a bit more typing and configuration but it keeps the domain checks under a host and not cluttering up my top level host view in Nagios.

I highly suggest that you limits on how often your whois services check to avoid whois rate control on your nagios server. I created a once daily time frame that only checks from midnight to 12:30 then used the following values in each service to get 1 check per day per domain.

normal_check_interval 30
max_check_attempts 1
check_period once-daily

I also added support for .ms and .us domains.

then
TYPE=ms
WHOIS_SERVER="whois.nic.ms"
elif [ ${DLTYPE} == 'us' ];
then
TYPE=us
WHOIS_SERVER="whois.nic.us"
else

# for .ms domains
elif [ $TYPE == 'ms' ];
then
day=`cat ${FILE} | awk '/Registry/' | cut -d ' ' -f4 | cut -d T -f1 | cut -d '-' -f3`
month=`cat ${FILE} | awk '/Registry/' | cut -d ' ' -f4 | cut -d T -f1 | cut -d '-' -f2`
getmonth()
{
case $month in
01) echo jan ;;
02) echo feb ;;
03) echo mar ;;
04) echo apr ;;
05) echo may ;;
06) echo jun ;;
07) echo jul ;;
08) echo aug ;;
09) echo sep ;;
10) echo oct ;;
11) echo nov ;;
12) echo dec ;;
*) echo 0 ;;
esac
}
year=`cat ${FILE} | awk '/Registry/' | cut -d ' ' -f4 | cut -d T -f1 | cut -d '-' -f1`
expiration=$day-$(getmonth ${2})-$year
# for .us domains
elif [ $TYPE == 'us' ];
then
day=`cat ${FILE} | awk '/Domain Expiration Date:/' | cut -d ' ' -f27`
month=`cat ${FILE} | awk '/Domain Expiration Date:/' | cut -d ' ' -f26`
year=`cat ${FILE} | awk '/Domain Expiration Date:/' | cut -d ' ' -f30`
expiration=$day-$month-$year


Great plugin, thanks for your efforts in writing it.
byKirk, February 15, 2013
To get this to work on CentOS I had to modify line 60 to this:

expiration=`whois communitect.com |grep "Expires"| awk -F":" '{print $2}'|cut -f 1`

The who is "Expires on" string varied from what the program is looking for.
byKirk, February 25, 2012
This memory check works and graphs in pnp4nagios. I am running Nagios on Centos 6 and monitoring remote OpenBSD servers with check_nrpe.

One issue I notice is it's showing MB values with KB next to them, so in my graph 66kb is actually 66MB. This check also does not include the OS cache for OpenBSD, not a huge issue if you just note what the overhead of your cache is.

Nice work. This is the only memory check I could find that works and graphs for remote OpenBSD 5 servers using check_nrpe.