Migrated check not showing performance data, but is fine in legacy Nagios

Hi,

I am seeing something strange where i had a check in Nagios/Naemon, and i migrated the check to CheckMK. The legacy platform PNP4Nagios shows the performance data perfectly fine, but in CheckMK it doesn’t. It is showing that it is collecting the data, as per below in the GUI, but its not plotting any data at all to the associated graphs, and they are completely blank. Not really sure why it won’t graph in CheckMK…stumped.

Any thoughts appreciated as not sure how CheckMK processes the perf data now i have migrated over…

Service performance data (source code) users=2180, vpns=2157

I think this is a 1.6 enterprise edition or?

You mean in the same site you go to “sitename/pnp4nagios/” and browse to your host and the graph is shown. If this is correct then it is really strange.
Can you post a small screenshot for the same time range from PNP and from the enterprise graphs?

Its 1.6.0p21.

What i mean is that on my old Nagios/Naemon platform, PNP4Nagios is plotting a graph, but now i have migrated the script over to CheckMK i am now not seeing anything in the graphs being plotted at all.

Well…I found the solution. Where i was passing performance data as “users=$RESULT,vpns=$VPNCOUNT”, i had to change and remove the comma to “users=$RESULT vpns=$VPNCOUNT”, and then it started working.

So, if like me, you wrote your scripts as per the guide for Nagios…you might also have put in a comma…

Plugin Performance Data

At a minimum, Nagios plugins must return a single line of human-readable text that indicates the status of some type of measurable data. For example, the check_ping plugin might return a line of text like the following:

PING ok - Packet loss = 0%, RTA = 0.80 ms

With this simple type of output, the entire line of text is available in the $HOSTOUTPUT$ or $SERVICEOUTPUT$ macros (depending on whether this plugin was used as a host check or service check).

Plugins can return optional performance data in their output by sending the normal, human-readable text string that they usually would, followed by a pipe character (|), and then a string containing one or more performance data metrics. Let’s take the check_ping plugin as an example and assume that it has been enhanced to return percent packet loss and average round trip time as performance data metrics. Sample output from the plugin might look like this:

PING ok - Packet loss = 0%, RTA = 0.80 ms | percent_packet_loss=0, rta=0.80

When Nagios sees this plugin output format it will split the output into two parts:

  1. Everything before the pipe character is considered to be the “normal” plugin output and will be stored in either the $HOSTOUTPUT$ or $SERVICEOUTPUT$ macro
  2. Everything after the pipe character is considered to be the plugin-specific performance data and will be stored in the $HOSTPERFDATA$ or $SERVICEPERFDATA$ macro

In the example above, the $HOSTOUTPUT$ or $SERVICEOUTPUT$ macro would contain “PING ok - Packet loss = 0%, RTA = 0.80 ms” (without quotes) and the $HOSTPERFDATA$ or $SERVICEPERFDATA$ macro would contain “percent_packet_loss=0, rta=0.80” (without quotes).

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.