How to Monitor Packet Loss, Latency and Jitter Using Cacti’s Advanced Ping Template

How to Monitor Packet Loss, Latency and Jitter Using Cacti’s Advanced Ping Template

If you work in Telecom or ISP networks operations environment, these three KPIs; Packet Loss, Latency, and Jitter are something that you must deal with on a regular basis. And as a Network Engineer, it is your responsibility to always work to keep these numbers as low as possible (within SLA), but as the saying goes “You can’t improve what you don’t measure.”! Therefore, having an automated report measuring Packet Loss, Latency and Jitter is a valuable function that can be achieved using Cacti’s Advanced Ping monitoring and graphing tool. But first, let’s take a deeper look at each of these parameters before I show you how to build this report.

What is Packet Loss in IP Networks?

Packet loss in IP networks is a network issue that occurs when data packets being transmitted over a network (or between devices or across the Internet) get lost or dropped during transit and fail to reach their destination. Incomplete or delayed data transmission can impact network and application performance and affect the user experience. Packet loss can have various causes, such as network congestion, problems with network hardware, software bugs, software threats, etc. Packet loss can also have various effects, such as slow document download, frozen video, garbled voice or video call, jerky motion in games, network timeouts, or random disconnections.

What is Latency in IP Networks?

Latency in IP networks is the amount of time it takes for data or a request to go from the source to the destination. Latency in networks is measured in milliseconds. The closer your latency is to zero, the better. The most common signs of high latency include web pages taking long to load in a browser, blank web pages, slow response when using online applications, buffering or frozen video, dropped voice or video calls or random disconnections. Latency can have various causes, such as geographical distance, network congestion, problems with network hardware (e.g., high CPU utilization) etc.

What is Jitter in IP Networks?

Jitter in IP networks is the variation or deviation in time delay measured in milliseconds (ms). Deviation in statistical terms is a measure of the difference between the observed value of a variable and that variable’s mean (average value). Jitter and deviation are related concepts, as both indicate how much a variable deviates from an average value. Jitter in IP networks is usually measured by the standard deviation of the time delay (ms), which is the square root of the average of the squared deviations from the average value. Standard deviation is a common measure of statistical dispersion, which indicates how spread out the values are. A low standard deviation means that most of the values are close to the average, and therefore there is little variation or jitter. A high standard deviation means that the values are far from the average, and therefore there is a lot of variation or jitter. Jitter in IP networks is often caused by network congestion or poor hardware performance (CPU spikes in transmission equipment). Jitter can affect the quality and reliability of network applications and services, such as VoIP, video streaming, online gaming, etc. Lower jitter scores mean you have a reliable and consistent connection, whereas higher jitter is the result of an inconsistent connection.

Packet Loss, Latency and Jitter can be tested and measured using various tools and techniques, such as ping, traceroute, iperf, mtr, etc. As a Network Operations Engineer, your effort should be directed towards maintaining these KPIs within acceptable values (according to SLA). In this article we are going to focus on how we can make us of Cacti’s Advanced Ping function to automate Packet loss, Latency and Jitter monitoring and be able to generate a graphical report. But before we get into the procedure of achieving this report, let’s also take a closer look at PING.

What is Ping?

Ping in IP networks is a tool that allows you to test the connectivity between two devices or networks by sending packets of data and measuring the response time. Ping works by using the Internet Control Message Protocol (ICMP), which is a protocol that enables devices to send and receive error and control messages over IP networks.

Ping works as follows:

  1. You enter the ping command along with the IP address or domain name of the destination device or network that you want to ping. For example, ping 4.2.2.2 or ping www.techjunction.co
  2. Your device sends a series of ICMP echo request packets to the destination device or network and waits for a reply.
  3. The destination device or network receives the ICMP echo request packets and sends back ICMP echo reply packets to your device.
  4. Your device receives the ICMP echo reply packets and calculates the time it took for each packet to make the round trip. This time is called the round-trip time (RTT) or latency, and it is measured in milliseconds (ms).
  5. Your device displays the results of the ping, which include the number of packets sent and received, the percentage of packet loss, the minimum, maximum, and average RTT, and other statistics.

Ping can help you troubleshoot network issues by checking if a device or network is reachable, how fast or slow the connection is, and if there is any packet loss. Ping can also help you diagnose network congestion, routing problems, DNS issues, and other factors that affect network performance.

Now that we have developed a knowledge background of the important principles that are relevant to this exercise, it’s time to get into the steps on how to configure and setup this useful feature in Cacti called “Advanced Ping”. This will save you a lot of time that you would have otherwise spent running manual ping commands every day to test your network connection, especially if you are working in an ISP environment. If you missed our article on how to install and setup the Cacti monitoring tool, you can read it here. It’s important that you already have a working cacti monitoring tool before proceeding with this exercise.

How to configure and monitor IP endpoints using “Advanced Ping” in cacti?

1) Check to make sure that your cacti server can ping the IP endpoint.

To check this, login to your cacti server via the CLI and run a ping command to the IP endpoint that you wish to monitor. In this example, we are going to configure our cacti to monitor and graph statistics to 1.1.1.1 which is a public DNS resolver operated by Cloudflare.

As seen above, our cacti server has a connection to 1.1.1.1 and is able to ping this endpoint and get results.

2) Login to your Cacti web GUI to add the IP endpoint (Same way like when adding a device in cacti).

From your Cacti GUI, go to Console > Management > Devices

Click on the [+] icon in the top right-hand corner to add a Device

3) Add IP endpoint details and click on “Create”.

Adding the IP endpoint to be monitored using Advanced Ping Template

Description: [Give your endpoint a meaningful description e.g., “Cloudflare Public DNS Resolver”]
Hostname: [IP address of the monitored endpoint e.g., 1.1.1.1]
Location: [None]
Poller Association: [Main Poller]
Device Site Association: [None]
Device Template: [None]
Number of Collection Threads: [1 Thread]
SNMP Version: [Not in Use]
Downed Device Detection: [Ping]
Ping Method: [ICMP Ping]

4) Create the “Advanced Ping” graph for the endpoint.

After creating the device in step (3) above, you should get the “ICMP Ping Success” with the latency value (ms) as seen in the screenshot below:

At this stage, click on “Create Graphs for this Device” to generate the Advanced Ping graph.

Under the “New Graph Template”, select “PING – Advanced Ping” and click “Create”

The step above allows you to set the number of times to ping the host, and also to set the ping protocol, leave this as default (ICMP). Click “Create”.

5) You can view your “Advanced Ping” graph in your cacti web GUI by going to “Graphs” and searching by the graph name that you set in step (3):

6) You can also view the Real-Time Graphing of the “Advanced Ping” by clicking the real-time icon to the right of the graph.

In this article, we have successfully configured cacti to monitor % Packet Loss (Pkt Loss), Latency (ms) and Jitter or Dev (ms). These three parameters are critical KPIs for IP Network Engineers and should be kept withing acceptable values to ensure a smooth network experience for their clients. If this article has been helpful in your daily networking life, please share it with your fellow Network Engineers.

JoshuaProfile

About the Author

Joshua Makuru Nomwesigwa is a seasoned Telecommunications Engineer with vast experience in IP Technologies; he eats, drinks, and dreams IP packets. He is a passionate evangelist of the forth industrial revolution (4IR) a.k.a Industry 4.0 and all the technologies that it brings; 5G, Cloud Computing, BigData, Artificial Intelligence (AI), Machine Learning (ML), Internet of Things (IoT), Quantum Computing, etc. Basically, anything techie because a normal life is boring.

Spread the word: