You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initial state of check.String() (which uses check.status) is OK while the initial check result is UNKNOWN. These should match.
// Initialize the check - this will return an UNKNOWN result// until more results are added.check:=nagiosplugin.NewCheck()
fmt.Printf("%s", check.String()) // returns: 'OK'check.Finish() // returns 'UNKNOWN: no check result specified'
The text was updated successfully, but these errors were encountered:
stevemeier
added a commit
to stevemeier/nagiosplugin
that referenced
this issue
Apr 5, 2021
As I understand the code, the Status is a uint which is initialized as 0, which maps to OK, according to Nagios standards.
I have changed this default value to be 3, which represents UNKNOWN.
I also had to change another piece of the code which seems to allow transition only "downwards":
OK -> WARNING -> ERROR -> UNKNOWN
With the new default being UNKNOWN, I changed this to allow transition from UNKNOWN to any other state.
The initial state of check.String() (which uses check.status) is OK while the initial check result is UNKNOWN. These should match.
The text was updated successfully, but these errors were encountered: