Opened 3 years ago
Closed 16 months ago
#364 closed defect (fixed)
Wrong Performance Data
| Reported by: | guenterg | Owned by: | mickem |
|---|---|---|---|
| Priority: | 1 | Milestone: | 0.3.9 |
| 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 (8)
comment:1 Changed 3 years ago by mickem
- Milestone set to 0.3.7
- Resolution set to invalid
- Status changed from new to closed
comment:2 Changed 3 years ago by WolfgangN
- Resolution invalid deleted
- Status changed from closed to reopened
"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 3 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 3 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 3 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
comment:6 Changed 3 years ago by pitchfork
Hi Michael,
we will strip the "trailing unfilled semicolons" on our side.
PNP4Nagios-0.6.3 will contain the fix.
But keep in mind to fix this in nsclient too.
Joerg
comment:7 Changed 3 years ago by guenterg
Hi Michael,
Joerg changed PNP4Nagios, it's working for me. So it's not urgent any more.
Guenter
comment:8 Changed 16 months ago by mickem
- Milestone changed from 0.3.8 to 0.3.9
- Resolution set to fixed
- Status changed from reopened to closed
This was fixed in 0.3.9 as well as 0.4.0









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