If you are managing and monitoring a network you will probably be interested to keep an eye on the latency of your network links. Especially for those links which are connected with a dedicated internet connection and a IPSec VPN tunnel to the datacenter. Latency is predictable but for non private IP VPN links without reserved bandwidth and QoS/CoS it sometimes may help solve some problems or rethink and discuss high latency with the service provider. With dedicated Framerelay/Leased Line/IP VPN network links you can agree with the service provider on the different latency values and have SLA’s in place.
Latency in a packet-switched network is measured either one-way (the time from the source sending a packet to the destination receiving it), or round-trip (the one-way latency from source to destination plus the one-way latency from the destination back to the source). Round-trip latency is more often quoted, because it can be measured from a single point. Note that round trip latency excludes the amount of time that a destination system spends processing the packet. Many software platforms provide a service called ping that can be used to measure round-trip latency. Ping performs no packet processing; it merely sends a response back when it receives a packet (i.e. performs a no-op), thus it is a relatively accurate way of measuring latency.
I am using CactiEZ v0.3 to address this issue and monitor the ping latency. Those hosts may or may not be a SNMP enabled device. If the router is service provider managed than you probably won’t be able to get any access to SNMP, but for this we don’t need it.
a) Create new device in Cacti Management console. See example for www.networknet.nl
b) Choose for Availability “Ping” and use “ICMP” ping as method. Click Add and reopen the device.
c) Locate Associated Graph Templates and choose “Unix-Ping Latency” in the Graph Templates. Click Add.
d) Click “*Create Graphs for this Host”
e) Select “Create: Unix – Ping Latency” graph template and click Create.
f) Choose Red as legend color and click Create. + Created graph: www.networknet.nl – Ping Latency is now created.
i) Create new Graph Tree and add the new created graph for the network latency. See my example.
The result:

Hasmezi
i want to monitor smtp server latency. the smtp service is up and running but i cannot ping the server’s IP address. can u pls help me on the configuration to enable me to generate the latency graph for this particular server. i got few others smtp servers that i can generate the latency graph.
Bruno Oliveira
Great guide! Thanks
Mina
It’s not working , graph doesn’t appear !
Ali
GREAT JOB BRO THANKS A MIL
Ali
maybe u can ping the nearest pingable network element to it. One that you are sure is on the same lan, otherwise u need to go with SNMP
Sarmed
I have already generated graphs, but nothing is being plotted. When I go to ‘Device’ I can see that cacti can ping the device. Dunno what’s wrong?
Eli
If your graph isn’t being plotted you may have the same problem I had. Not having ICMP as the ping type for step “b”. I had UDP. Switching it to ICMP got it working.
Sarmed
Well, there was a bug in the cacti ping.pl script….i was doing grep for ‘icmp_seq’ to measure latency whereas my Debian host generates ‘icmp_req’ instead. That’s why I was unable to plot graphs. After tweaking the script, latency graph worked like a charm.
Olivier
Sarmed,
you re great ! now it works on my Debiantoo
thx
#open(PROCESS, “ping -c 1 $host | grep icmp_seq | grep time |”);
open(PROCESS, “ping -c 1 $host | grep icmp_req | grep time |”);