-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function AddPerfDatum - MIN:MAX defined as float64, range format not possible #15
Comments
Hi Ronator,
On 08.06.2017 14:04, ronator wrote:
Is there a chance this code will be improved in time?
Let me apologize for the bad quality of this plugin. The original author
is no longer with our company. I personally used this plugin for my
Nagios tutorial at
http://sensors.egnite.de/en/support-2/querx-tutorials/querx-and-nagios-4/
without too much trouble.
I'm neither a Go programmer nor an experienced implementer of monitoring
systems. Nevertheless, I'm aware that our company needs to provide a
solution as soon as possible.
As this is a public forum, I'd like to discuss further details via
private email. Can you please contact egnite directly, either by phone
or email.
Best regards,
Harald
|
Dear Harald, So we can't fix the perf data issue in check_querx until we can output the whole range. That's why I opened this issue here. I sent you a mail from my work account. |
Maybe I was wrong and the problem seems to be in check_querx: func main() {
var cUpper, cLower, wUpper, wLower, value float64 Let me check this in detail; I will come back and close this issue when I can confirm it is NOT a problem with nagiosplugin.go - sorry for the noise. |
Okay, so the problem is in perfdata.go: min *float64 This means I can't set a range for min and/or max, only float values. Using values like "20:40" - which is the range format for nagios plugins - is impossible. This is really my first day writing some Go code, so I am totally unsure if this can be fixed easily. What do you think @olorin? |
Apologies for the delayed response @ronator. You're right; the current version is incomplete and should support ranges. I'm not sure when I'll next have time to work on this myself, but I think the fix should be fairly simple and I'd be very happy to review changes. Only thing to be careful of is not making breaking changes to the interface at this point. |
Hi,
I am totally new to Go, just got my environment setup. I am trying to fix a problem in a nagios plugins written in Go that relies on nagiosplugin.go (@egnite). Now it seems to me this nagiosplugin.go does not support performance data output as it should. Let me explain:
The tutorial is refering to Nagios Plugin Developers Guideline that says format for perf data is
'label'=value[UOM];[warn];[crit];[min];[max]
but the function AddPerfDatum is changing position of MIN-MAX with CRIT-WARN
// Add some perfdata too (label, unit, value, min, max, warn, crit)
Anyway. But furthermore, I wonder why warn, crit, min and max are defined as float64 since 'warn' and 'crit' can of course be in the range format so it should be able to use "20:40" as a value : https://docs.icinga.com/latest/en/perfdata.html
This means neither can't I set the MIN to "20:28" nor can't I set the MAX to "18:30" which is quite important for monitoring ranges like temperature or process counters.
So logically, any plugin based on this repo cannot use the range format as standard plugins do. Any nagios plugin should be able to output the min:max range with a colon between them:
Is there a chance this code will be improved in time?
The text was updated successfully, but these errors were encountered: