Notification if server unreachable?

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Notification if server unreachable?
# 1  
Notification if server unreachable?

Is it possible for a group of servers to monitor each other and then send an alert if one of them is no longer 'alive'?

Or if its easier have one server that monitors the other five and then sends an alert.

If so how would this be done?

# 2  

It sort of depends what you want to use to alert, how many alerts you will tollerate in the event of a problem, and how vital it is that you get the alert.

Having each server watch the other 4 will mean that it's very likely you will hear about it if one of them fails, but you will get 4 messages about one machine. If you have a network interruption, you might get 20 messages as each server tells you the other 4 are dead. This can get quite bad if you plan to scale this up.

Having just one server watch the other 4 means that if that one server fails, you won't know. Further more, if it fails then another goes, you won't hear about that either. On the up-side, if one server fails, you only get one message. If the network fails, you only get 4 messages.

You can pick something halfway between (eg have two server watch everything else, or have two servers watch each other and 1 or 2 other servers) to find the balance you need.

A quick framework of what you'd probably want to run:
while true
  for host in $HOSTLIST
    if ping $host
      echo "`date` $host ok" >> log
      echo "`date` $host NOT OK" >> log
      echo "Hi, `hostname` here to tell you that its all gone Pete Tong on $host" | mail_prog_of_your_choice
      echo "`hostname` says: $host has left the building" | your_favourite_pager_or_sms_gateway
  sleep $INTERVAL

# 3  
Server heartbeat

You can try to implement a tool that will not only solve this problem, but also has potential to address many other areas associated with building a high availability infrastructure. The tool I'm referring to is called "heartbeat".

Heartbeat is a publicly available package written by Alan Robertson. Heartbeat monitors system for certain event and can take actions based on those events. It can look to see if a particular service is running and if it isn't it can send an alert and/or automatically restart the service on a different machine. It also has the capability of transferring ownership of a shared IP address between nodes in a "heartbeat cluster".

Just do a google search for configuration details. It takes a bit to configure but it is a really cool solution for any HA environment.

# 4  

I'll have a look at this.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #215
Difficulty: Easy
Cisco IOS has a monolithic architecture.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Installadm - network in unreachable

Seems to wanboot ok but then fails to connect to server. What do I need to check? {0} ok boot net - install Boot device: /pci@300/pci@1/pci@0/pci@1/network@0 File and args: - install 1G link up <time unavailable> wanboot info: WAN boot messages->console <time unavailable>... (2 Replies)
Discussion started by: psychocandy
2 Replies

2. AIX

System p 9115-505: Server and HMC unreachable

Hi there I've bought a used System p 9115-505. When I attach the LAN cable to my router the HMC receives an IP address from my router, but the HMC is unreachable. There are no open ports. Does anybody know that problem? Any help greatly appreciated. Greetings from Italy! (2 Replies)
Discussion started by: mediaset23
2 Replies

3. Shell Programming and Scripting

Notification from another server need to receive.

I have two application server appserver1 and appserver 2. A script will run from appserver1 which main activity is 1. Connect with the apserver 2 and run a script which saved on appserver2 2. the saved script will in appserver 2 will complete its task and generate a log Problem i need to... (0 Replies)
Discussion started by: Imtiaz43
0 Replies

4. Shell Programming and Scripting

Samba server with notification emails

I'm creating a ubuntu samba server that sends out email notifications when a file a new file is created in the monitored directory. Currently im using inotifywait to monitor a directory and send out a email notification. Inotify wait works great but it gets triggered whenever any file including... (2 Replies)
Discussion started by: binary-ninja
2 Replies

5. UNIX for Advanced & Expert Users

Wether does it successful or unreachable?

Hi, all: How can I check what happen with my own NIC driver which response "successful" when local PC "ping" a remote linux PC but "unreachable" when it "ping" a remote windows XP PC? My writed driver runs in linux 3.0.4 kernel. thanks! li, kunlun (1 Reply)
Discussion started by: liklstar
1 Replies

6. UNIX for Dummies Questions & Answers

[Ubuntu] some contents unreachable

Hello, I'm using Ubuntu, and when I check "/"(root directory)'s properties. The window says "some contents unreachable". What is the "some contents"? (2 Replies)
Discussion started by: hz_i3
2 Replies

7. Post Here to Contact Site Administrators and Moderators

Image/JS hoster down or unreachable

Apparently (at least) 2 of the servers responsible for serving the static images and the JavaScript are down or otherwise unreachable. Affected are and, while is still up. A check on this website confirmed it. Checked as of 2010-06-16 08:11 UTC. (13 Replies)
Discussion started by: pludi
13 Replies

8. Solaris

How to get explorer from unreachable machine

Hi Guy. I have a Dummy question. I cant connect a T2000 machine to the network, We have netword card problems. But in this moment is mandatory to get the explorer from the machine. My question is What can I do?. Could I try write the explorer to the CD? (This is a option), or any... (6 Replies)
Discussion started by: aggadtech08
6 Replies

9. Linux

Linux Port Unreachable

All, I have to servers (NT and REL4). We can access the application on NT from Linux but we cannot access the applications on Linux when accessed from NT. The applicaiton is running on Linux with some IP:Port. When we try to access that application from NT, it says that the port is... (1 Reply)
Discussion started by: The One
1 Replies

10. Cybersecurity

Host unreachable

I have inherited a Sun Ultra-1, running sunOS 5.8 While on this machine, I cannot ping I cannot ping this machine from withing our lan. I do not have an static IP for this machine and used Iconfig hme0 auto-dhcp start. All is well, It seems to me that the previous owner,... (1 Reply)
Discussion started by: defense
1 Replies

Featured Tech Videos