How to Setup Ping Response Time Monitoring

From SysAdminWiki

Jump to: navigation, search

Please note: There is now a plugin with this created. However this is still a good learning lesson to see how the Zenpack really works. Download and install the ZenPack from here


Using 2.1 :

  • 1. Navigate to Devices/Ping/Templates/Device.
  • 2. Edit the Description to suit, e.g. "Uses Nagios check_ping plugin to monitor an IP device", and click Save.
  • 3. From the Data Sources drop down select "Add DataSource...".
  • 4. Enter a name for the data source, e.g. "ipcheck", and set the type to "COMMAND".
  • 5. Set the Component, Event Class, Event Key, Severity and Cycle Time fields as required.
  • 6. Enter the following into the Command field:
check_ping -H $devname -w 180,100% -c 300,100% | sed -e 's# - Packet loss#|loss#;s#%,##;s#ms##;s# = #=#g'

Note: spaces are critical

  • 7. Click Save.
  • 8. From the DataPoints drop down select "Add DataPoint...".
  • 9. Add a data point for the round trip averages, e.g. "RTA".
  • 10. Click Save, and from the breadcrumb trail at the top go back to the DataSource, e.g. "ipcheck".
  • 11. Add another data point for the packet loss, e.g. "Loss".
  • 12. Click Save, and from the breadcrumb trail at the top go back to the DataSource, e.g. "ipcheck".
  • 13. >From the breadcrumb trail at the top, go back one level to the template "Device".
  • 14. From the Thresholds drop down select "Add Threshold...".
  • 15. Enter a name for the threshold, e.g. RTA Limit.
  • 16. Select the data source for the threshold, e.g. "ipcheck_RTA".
  • 17. Set Event Class, Severity, Escalate Count as required, then click Save.
  • 18. From the breadcrumb trail at the top, go back one level to the template "Device".
  • 19. From the Graph Definitions drop down select "Add Graph...".
  • 20. Enter a name for the graph, e.g. "RTA".
  • 21. From the Graph Points drop down, select "Add DataPoint...".
  • 22. Select the correct data point, e.g. "ipcheck_RTA", and click OK.
  • 23. Edit the Units field to read "mS", and click Save.
  • 24. From the breadcrumb trail at the top, go back one level to the template "Device".
  • 25. Repeat 19 - 24 for the Loss graph, setting the Units field to "Counts".

The template should now be set up, add a device with the "Ping" Device Class Path, setting the Discovery Protocol to None. Wait a while (5 mins or so depending on the Cycle Time you specified) and then select the Perf tab for the new device and you should see some graphs.

Notes.

  • 1. The parameters to the checkPing command may need to be adjusted for your requirements. Use check_ping --help to find out more.
  • 2. For some reason, on my system (Ubuntu 7.04, zenoss installed from a tarball), the default zproperty "zCommandPath" was set to "opt/zenoss/libexec", where it really needed to be "/usr/local/zenoss/libexec". This may be a bug in the build, I'm not sure. I fixed this by changing the zProperty at the top level "Device" template.
Advertisement