wol nagios pluging

Here is yet another useful nagios pluging that check to see if a target is alive, by sending a continuous ping.
when the target is down the script send the magic packet frame to turn on the machine.
You can download it here

For installing the pluging follow the same step in openvpn nagios pluging article.

At last define the wol service like this

$ sudo cat >> /etc/nagios3/conf.d/services_nagios2.cfg

define service {
hostgroup_name wol
service_description Wake on LAN
check_command check_wol!host!broadcast!mac address!mode
use generic-service
notification_interval 0
}

replace “host” by the ip address or the hostname of your target, “broadcast” by the broadcast ip address, “mac address” by the mac address of your target and mode by “LAN” if your host reside in the local area and by “WAN” if it is in the other side of internet.

Example:

define service {
hostgroup_name wol
service_description Wake on LAN
check_command check_wol!192.168.0.1!192.168.0.255!00:19:db:d5:0d:2d!LAN
use generic-service
notification_interval 0
}

wol nagios pluging

One thought on “wol nagios pluging

  1. Graham says:

    you sir, rock! Up until now when we’d lose power at one of our warehouses (in a fairly rural area, power outages are unfortunately somewhat common there) our main server would reboot after power was restored, but our voip server and firewall would not. This meant that I’d have to drive for over 45 minutes just to bring systems back online. Now it’s automatic. This is remarkable!

    THANK YOU!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s