Details
Description
Hello Observium Team,
I would like to report a bug in the Nagios performance data parser used by the Probes functionality in Observium Professional.
Problem description
When configuring an ICMP probe using the check_icmp plugin, Observium incorrectly parses some of the performance metrics returned by the plugin.
For example, the plugin produces the following valid Nagios PerfData output:
rta=1.522ms;100.000;200.000;0; pl=0%;5;20;; rtmax=2.812ms;;;; rtmin=1.345ms;;;;
Instead of identifying the four individual metrics (rta, pl, rtmax, and rtmin), Observium incorrectly creates a metric named:
;5;20;; rtmax
As a result, packet loss (pl) and minimum RTT (rtmin) are not properly detected or graphed.
Root cause
I traced the issue to the parse_nagios_perfdata() function in:
includes/entities/probe.inc.php
The existing regular expression allows whitespace and portions of subsequent metrics to be consumed as part of the preceding metric's optional fields.
Proposed fix
I modified the parser to correctly separate metrics at whitespace boundaries while preserving support for quoted metric labels, optional threshold fields, and GAUGE/COUNTER types.
After applying the patch locally, Observium successfully detects and displays all four metrics independently:
- rta – Round Trip Average
- pl – Packet Loss
- rtmax – Round Trip Maximum
- rtmin – Round Trip Minimum
I have verified that all four metrics are being stored in RRD files and displayed correctly in the web interface over multiple polling cycles.
Attached: observium-probe-perfdata-fix.patch
The patch contains the changes to parse_nagios_perfdata() relative to SVN revision 15424.
The fix has been successfully tested with check_icmp, although I have not tested it against every possible Nagios PerfData format.
Could you please review the attached patch and consider incorporating a fix into an upcoming Observium release?
Thank you.