Find the answer to your Linux question:
Results 1 to 5 of 5
I am looking for a bash script which will dispatch an email when a server goes down. This script would be placed on 2 separate servers and when one server ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    3

    Bash: Down Notification

    I am looking for a bash script which will dispatch an email when a server goes down. This script would be placed on 2 separate servers and when one server goes down (http, dns, or ping) then the other server would dispatch an email to the admins of that server.

    Any help would be appreciated...scripting is not my specialty.

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    I Googled for "notify when server goes down linux" (no quotes) and I found a program called Nagios:
    Nagios: Home

    A little tutorial (which I haven't read):
    Linux.com :: SysAdmin to SysAdmin: Service monitoring with Nagios

    Try Googling for solutions in the future, especially ones that are somewhat common.
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    3
    I spent about 15 minutes googling but did not find anything that met my needs. I'll take a look at that program you found and see how it will fit

  4. #4
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    If those two servers are redundant servers to each other, you can try heartbeat. I am using it to provide full auto-failover between two postfix email servers.

  5. #5
    Just Joined!
    Join Date
    Jul 2008
    Posts
    3
    I got nagios running now and it is exactly what I needed. As for heartbeat, currently they are not redundant servers. One is a development server which only backs up essential files and the other is a production server.

    At any rate - problem solved and thank you both for the help ^^

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...