Results 1 to 7 of 7

Thread: Need a server application to monitor ping times to clients

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Denmark
    Beans
    13
    Distro
    Ubuntu Development Release

    Need a server application to monitor ping times to clients

    Hi guys

    I have an embedded server running Ubuntu which is on a network with a lot of wireless AP's. The AP's doesn't support SNMP or anything else, so I monitor if they are up or down by simply pinging them continuously.

    My question is if there is anything I could install on the server that could provide me with a webpage where I could see the ping time to the AP's? So it just shows a list of the IP's I have told it to ping, and what their latest response time is. This is what I basically need, but if it were more advanced than that, and could give warnings if ping time were to high etc. that would also be nice.

    Regards

    Bjørn

  2. #2
    Join Date
    Apr 2008
    Location
    Far, far away
    Beans
    2,148
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Need a server application to monitor ping times to clients

    Why don't you just write a simple script to do it? There probably is some package that can do it but my guess is that it will be more work to setup and configure than to just do a script since the task is fairly simple.

    eg. pingstats
    Code:
    #!/bin/bash
    
    HTMLPATH="/var/www/site/stats.html"
    NODES=( 192.168.2.1 192.168.2.2 192.168.2.3 )
    
    while true; do
    
    TIMES=()
    for ip in ${NODES[@]}; do
      TIMES[${#TIMES[@]}]=$(ping -nc 1 ${ip}|grep "time="|awk -F= '{print $4}'|awk '{print $1}')
    done
    
    TS=`date`
    cat >$HTMLPATH <<-EOF
    <HTML><HEAD>...blah blah</HEAD>
    <BODY>
    This is my heading and stuff like that, whatever...
    Up to the table rows 
    ${TS}
    <TABLE>
    EOF
    
    for ((n=0; n < ${#NODES[@]}; n++)); do
      echo "<ROW><COL>${NODES[$n]}</COL><COL>${TIMES[$n]}</COL></ROW>" >> $HTMLPATH
    done
    
    cat >>$HTMLPATH <<-EOF
    </ROW></TABLE>
    Stuff after the table, whatever...
    <HTML>
    EOF
    
    sleep 10
    done
    This simply loops every 10 seconds doing the pings and writing a new html file. You plug in your IPs. You can alter the html to suit, and change the ping interval.

    Put it in your /etc/local.rc and it will start at boot.

    Run it in the background like this,

    pingstats &

    Anyway, I just threw that together in a few minutes as an example.
    This one works though - I just tested it.
    Last edited by BkkBonanza; September 11th, 2010 at 05:30 PM.
    Send tips to: 17raXAGM42vZX21Vcb5HDwq2GMLmVwN4qd

  3. #3
    Join Date
    Dec 2007
    Location
    Buenos Aires, Argentina
    Beans
    1,231
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Need a server application to monitor ping times to clients

    Don't know how hard is for you if something goes wrong with the devices you are monitoring, but, I believe you should really take a look at Nagios for the monitoring part of the deal; and you can use MRTG to graphic the ping latency, if for instance, you want to keep trends.
    Both of those are free, and they are on the repositories.
    Another very good package for monitoring/ trending is Zabbix, it is a bit more complex and has more dependencies than Nagios, but it looks impressive
    Live long and prosper.
    And use lotsa Linux, BSD, and Emacs.

  4. #4
    Join Date
    Jun 2007
    Beans
    1,941

    Re: Need a server application to monitor ping times to clients

    Yea, there are a TON of network monitoring tools. Zenoss is one of my faves, very customizable... which a good company behind it, but the enterprise product is very $$$... Their core product is completely free. It may be overkill for what you're needing tho.

  5. #5
    Join Date
    Apr 2005
    Location
    London, UK
    Beans
    153
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need a server application to monitor ping times to clients

    Maybe you are after something like PingPlotter (http://www.pingplotter.com/).

    In which case, try this http://sourceforge.net/projects/m-ping/

  6. #6
    Join Date
    Jan 2010
    Location
    Chicago, IL
    Beans
    173
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need a server application to monitor ping times to clients

    Quote Originally Posted by arrrghhh View Post
    Yea, there are a TON of network monitoring tools. Zenoss is one of my faves, very customizable... which a good company behind it, but the enterprise product is very $$$... Their core product is completely free. It may be overkill for what you're needing tho.
    I like Zenoss as well (aside from Core being DEAD slow without a ton of tweaking); It seems like overkill for this application, though.

    A quick script is the most straightforward way to do this. If you'd like to incorporate more monitoring than just these APs, look at Nagios.

  7. #7
    Join Date
    Nov 2007
    Location
    Coldwater, OH
    Beans
    524
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Need a server application to monitor ping times to clients

    i have a simple script that does single ping PM me if you want it?
    Tim's Computer Repair
    trpcrepair.com

Tags for this Thread

Bookmarks

Posting Permissions

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