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

ping_XOR

Rating
0 votes
Favoured:
0
Compatible With
  • Nagios 3.x
License
Other
Hits
12800
Files:
FileDescription
ping_xor.shping_xor.sh
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
This lightweight script ping two hosts, and return OK only if a host is up and the other down.

--------------------------------------------------------------------------------

THIS PLUGIN IS PROVIDED "AS IS", WITHOUT ANY WARRANTY, AND WITHOUT ANY SUPPORT.

--------------------------------------------------------------------------------

This lightweight script ping two hosts, and return OK only if a host is up and the other down.
Only one host must be online.

It make XOR with the two ping results. (truth table for the exclusive or)

Ping1 + Ping2 -> Plugin output
down + down -> CRITICAL
down + ok -> OK
ok + down -> OK
ok + ok -> CRITICAL

This check is write in bash (Linux).
Test with : CentOS 5

--------------------------------------------------------------------------------

USAGE :
./ping_xor.sh adress_ip1 adress_ip2

example :
./ping_xor.sh 192.168.1.10 192.168.2.33

--------------------------------------------------------------------------------

LICENCE : CC BY-SA 3.0
http://creativecommons.org/licenses/by-sa/3.0/

--------------------------------------------------------------------------------