Application to monitor servers?

Discussion in 'OT Technology' started by FLY-FAST, Jan 15, 2004.

  1. FLY-FAST

    FLY-FAST OT Supporter

    Joined:
    Sep 30, 2003
    Messages:
    8,713
    Likes Received:
    3
    Location:
    boston, MA
    Hi Guys:

    Does anyone know of an application that I can run somewhere on my network that will ping a list of static IP addresses, and let me know if one of my machines is down? Ideally something free!

    Thanks!!
     
  2. col_panic

    col_panic calm like a bomb Moderator

    Joined:
    Sep 19, 2003
    Messages:
    188,160
    Likes Received:
    0
    Location:
    winter haven, fl
    Last edited: Jan 15, 2004
  3. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    How bout a batch file? Can't get much freeer than that!
     
  4. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    yup, we do that at my full time gig, but we use wget to test our web servers as well. IIS crashes so often, that we need to know that it is down as well as the box itself. We run it from a linux box, so let me know if you want any of the source, it's pretty damn simple, but you might be using windows..
     
  5. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    What if the linux box crashes?












    :rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl:
     
  6. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    unpossible! :eek3:
     
  7. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Here's my code BTW:

    First stick all your IP's in a text file called IP.txt, one entry per line

    Then create a batchfile called PingServer.bat

    Code:
    @echo off
    ping %1 | find "Request timed out" > NUL
    if %errorlevel% equ 0 goto dead
    
    :live
    echo %1 still alive
    goto end
    
    :dead
    echo %1 dead
    
    :end
    And then create another batch file:

    Code:
    @for /f %%i in (ip.txt) do @call pingserver.bat %%i
    And run it.
     
  8. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    here is a *nix equivilent if you decide to go that route.....


    Code:
    #!/bin/sh
    
    logname=/var/log/checksites.log
    tmpMsg=/tmp/checksites.$$
    recipient=devalarm
    
    errors=0
    
    echo "Subject: PLEASE CHECK WEBSITE(S)!!!" >$tmpMsg
    echo "Unable to reach:" >> $tmpMsg
    echo "">>$tmpMsg
    
    for site in `cat /etc/checksites.conf`
    do
    
      /usr/bin/wget -t 10 --delete-after $site &>/dev/null
    
      if [ $? != 0 ]
      then
        date >> $logname
        echo "Failed to reach $site" >> $logname
        errors=1
        echo "       $site" >> $tmpMsg
      fi
    
    done
    
    if [ $errors -eq 1 ]
    then
      /usr/sbin/sendmail -F "Site Watcher" $recipient < $tmpMsg
    fi
    
    rm  $tmpMsg
    date >> $logname
    
    

    code should be pretty self explanitory, variable up top and the /etc/checksites.conf is just a file with 1 website per line
     

Share This Page