Ticket #364 (reopened defect)
Wrong Performance Data
| Reported by: | guenterg | Owned by: | mickem |
|---|---|---|---|
| Priority: | 1 | Milestone: | 0.3.8 |
| Component: | CheckSystem | Version: | 0.3.7 |
| Severity: | Bugs | Keywords: | |
| Cc: |
Description
I use NSClient 0.3.8.19 2010-02-28 and have problems with performance data. checkMem returns the following text:
OK: physical memory: 425M|'physical memory %'=41%;80;90; 'physical memory'=424.96M;818.82;921.18;0;1023.53;
The '%' in the label is not allowed in pnp4nagios. Please modify it to e.g. physical_memory_pct and check all other modules.
Thanks!
Change History
comment:1 Changed 2 years ago by mickem
- Status changed from new to closed
- Resolution set to invalid
- Milestone set to 0.3.7
comment:2 Changed 2 years ago by WolfgangN
- Status changed from closed to reopened
- Resolution invalid deleted
"The '%' in the label is not allowed in pnp4nagios. Please modify it to e.g. physical_memory_pct and check all other modules."
Well, no. The developer guidelines don't forbid a percent sign within the label. The problem seems to be the trailing semicolon after the max value so it would be sufficient to remove it from the line in CheckHelpers.hpp:
#define MAKE_PERFDATA_EX(alias, value, unit, warn, crit, xmin, xmax) _T("'") + alias + _T("'=") + value + unit + _T(";") + warn + _T(";") + crit + _T(";") + xmin + _T(";") + xmax
comment:3 Changed 2 years ago by mickem
Humm... Again I am hesitant:
http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201
states CAN not SHALL or MUST
warn, crit, min or max may be null (for example, if the threshold is not defined or min and max do not apply). Trailing unfilled semicolons can be dropped
So I again think it is a "problem" in pnp4nagios and not NSClient++. If I were to remove them I "might" break other clients and/or existing solutions which are relying on them so making such a change can have major impact on existing installations.
For the upcoming 0.4.x version I will probably allow more control over the performance data syntax.
Michael Medin
comment:4 Changed 2 years ago by WolfgangN
Looking at the documentation the format should be
'label'=value[UOM];[warn];[crit];[min];[max]
It doesn't show a semicolon after the max value so "trailing unfilled semicolons" doesn't seem to fit in this case.
But, on the other hand, it's your decision and so we might have to wait for the upcoming version ;-)
Wolfgang
comment:5 Changed 2 years ago by mickem
- Milestone changed from 0.3.7 to 0.3.8
Humm...
Interesting... In that case maybe it is something I can fix, let me look it up...
Michael Medin








According to the Nagios plugin guidelines: http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201
label can contain any characters
Michael Medin