Services: empty graphs. Unproper code


I got an issue with the graphing of performance data of a service check.

(I’m talking about the graphs which you can see in the “detail view” of a service, in case the check_plugin is creating performance data output)

My plugin is returning a label which contains spaces.

CPU Load 1% (5 min average) |   '5 min avg Load'=1%;90;95;0;100

This is valid according to the NAGIOS plugin develeopment guide: is highlighting this.

However in the “detail view” of my service I have 4 rows of graphs. The first row is labeled “5”, the next row is labeled “min”, next is “avg” and the last row labeled “load” is finally containing the graphs for my only value (all the graphs in the other rows are empty).

Currently I don’t have a means to change the label to something without spaces… but anyway, isn’t this a bug?

Thank you!

Best regards,

Spaces should be okay, but that output doesn’t look valid to me. From your link…

Status output (before the pipe):

Output should be in the format:

SERVICE STATUS: Information text

Perf output (after the pipe):

This is the expected format:


So you would expect to see something like:
OK: CPU Load 1% (5 min Avg) | '5 min Avg Load'=1%;90:95:0:100

Hi slashdoom,
thank you for your reply. You mean the “OK: missing” before the pipe?

Well, I agree that this is not good style. But in the end, it’s the return value of the plugin that marks something “OK, CRITICAL OR WARNING”… before the pipe is just text.

My issue happens after the pipe: I believe that something in the libre-code is not handing over the single quotes around the label, which would explain the issue.

Could somebody please confirm my observations?

I see what you’re saying. Sorry about that. The way the forum has highlighted parts of the before pipe text I thought you were saying you thought those were affecting the output.

I think I can confirm what you’re saying. See:

Line 235 splits the text first by the pipe, then the line 238 splits the perf string by space. It doesn’t look like there is currently logic built in for single quoted labels contain spaces.

Thank you for pointing this out!