Website uptime monitoring

Discussion in 'PHP' started by yutewa00, Nov 5, 2006.

  1. #1
    I would need website uptime monitoring script. I know some php but not much. If someone knows any script that is capable of doing someting similar like http://www.siteuptime.com please let me know.

    For starters I would need this features:
    - http, smtp, ftp, pop3, ping, dns check
    - check every 5 minutes

    In second stage I would need to check from multiple locations too... atleast 3

    It doesn't need to be fancy (and expencive) script because I will integrate it in my website. I prefer free scripts so that I can look the source and change it. It won't be service like site-uptime.com. I need this for personal use. If anyone knows server requirements for 100 hosts please share the knowledge.
     
    yutewa00, Nov 5, 2006 IP
  2. RRWH

    RRWH Active Member

    Messages:
    821
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    70
    #2
    I have just finished writing a couple of scripts to monitor servers in my day job.

    Sorry - I cannot share the code, but can offer you this. I couldn't use PHP and I had available was snmp. In around 200 lines of shell script you can easily write a polling/pinging solution and log to a local file. Then you can parse that file to alert you whenever you cannot access something.

    Now, to poll 100 boxes is pretty trivial, and you don't need much of a box for that at all. Do you have a spare 386 machine still working? it would easily manage to poll/monitor upwards of a coulpe of hundred servers in this manner. We just have a low end sun box, and it only needs to poll about 150 servers, we know it could scale to handle at least a thousand without any tuning at all.

    If you are looking to actually do transaction monitoring by connecting to each server using each protocol and looking for a particular response then your hardware requirements might be a little more.

    As you have nothing at the moment, and are wanting to monitor the 100+ servers I would suggest by starting to do a search at sourceforge and seeing what you can find. Writing a system from scratch, while rewarding, is probably not required here when there are quite a few that may be suitable already written. start by looking at http://sourceforge.net/softwaremap/trove_list.php?form_cat=152 - there are literally hundreds of apps already that might be a good start.
     
    RRWH, Nov 5, 2006 IP
  3. yutewa00

    yutewa00 Peon

    Messages:
    245
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    first thank you for writing so long post :)

    I thought that this kind of scripts uses more system resources and even if it would server is not a problem :) I have AMD Athlon 64 3700+ + 1 Gig ram dedicated and will upgrade to AMD Athlon 64 X2 4200+ Dual Core + 2 gig ram

    I will probaby write this by myself. Only because I want to learn php more and because I'm dying to test those neat php frameworks with ajax. If I come up with something usefull I will share here on DP
     
    yutewa00, Nov 5, 2006 IP
  4. hanji

    hanji Peon

    Messages:
    612
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you have a linux system some where. .monitor with mon or nagios. Mon is simple and small. I have it monitoring three web servers right now. It'll ping every few minutes, and on failure (failure to reach host for a total of 15 minutes) I'll get an email and text on the phone. I do the 15 minute gap to prevent alerts being sent to me if there is a small network drop out, etc.

    Nagios is more robust, and you can run agents on the client end of things.. for example you can test to see if the web server is 'up', if it isn't and the server is still running, it'll try to restart the web server, etc. Obviously this much more work to configure.. but might be cool.

    Both are free.

    hanji
     
    hanji, Nov 5, 2006 IP