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
Is a more user friendly nagios exit function needed or not?
It can be cumbersome to import all exit function or all nagsio tuple constants. a more easy to use wrapper can solve this.
defnagios_exit(state, message):
"""Print message according to state: supported states: - defined nagios constants NAGIOS_EXIT_ - string: OK,WARNING,CRITICAL and UNKNOWN - integer: 0,1,2,3 """nagios_states= [NAGIOS_EXIT_OK, NAGIOS_EXIT_WARNING, NAGIOS_EXIT_CRITICAL, NAGIOS_EXIT_UNKNOWN]
forxinnagios_states:
ifstate==xorstate==x[0] orstate==x[1]:
# this exits, no break or return needed_real_exit(message, x)
log.raiseException('Unsupported state %s.'% (state))
The text was updated successfully, but these errors were encountered:
itkovian
pushed a commit
to itkovian/vsc-utils
that referenced
this issue
Nov 14, 2013
Is a more user friendly nagios exit function needed or not?
It can be cumbersome to import all exit function or all nagsio tuple constants. a more easy to use wrapper can solve this.
The text was updated successfully, but these errors were encountered: