extend service type and CRITICAL state#7
extend service type and CRITICAL state#7martialblog merged 2 commits intoNETWAYS:masterfrom chri2:chri2-patch
Conversation
#6 Returns the numerical status as text to icinga for service type 3 (PROCESS) of monit. When in monit state _initializing_ do not ignore the monitor, but return the monitor as _CRITICAL_ to icinga.
|
I opened an issue at monit asking for documentation for the xml content. I'm running this version on three systems now and it solved the problems I found, but I might have misinterpreted the numerical values and probably there are ways to extend this to make the text output more helpful. |
|
Good idea to open an issue, I'll keep an eye on it. Thanks for the PR |
martialblog
left a comment
There was a problem hiding this comment.
Just some fixes the linter suggested
|
Let's wait and see If we get some details on the status page, if there is no feedback we can still merge it I think |
|
Had a quick look at the monit source code: https://bitbucket.org/tildeslash/monit/src/master/src/monit.h Still not sure what the monitor and status tells me exactly, but the possible values are probably: typedef enum {
Monitor_Not = 0x0,
Monitor_Yes = 0x1,
Monitor_Init = 0x2,
Monitor_Waiting = 0x4
} Monitor_State;
typedef enum {
State_Succeeded = 0x0,
State_Failed = 0x1,
State_Changed = 0x2,
State_ChangedNot = 0x4,
State_Init = 0x8,
State_None = State_Init // Alias
} State_Type;
typedef enum {
Service_Filesystem = 0,
Service_Directory,
Service_File,
Service_Process,
Service_Host,
Service_System,
Service_Fifo,
Service_Program,
Service_Net,
Service_Last = Service_Net
} Service_Type; |
|
I'll merge this and then we can extend it when we have further feedback on the status page |
|
Thanks! |
#6
Returns the numerical status as text to icinga for service type 3 (PROCESS) of monit.
When in monit state initializing do not ignore the monitor, but return the monitor as CRITICAL to icinga.