Skip to content

extend service type and CRITICAL state #7

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chri2
Copy link

@chri2 chri2 commented Jun 13, 2025

#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.

NETWAYS#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.
@chri2
Copy link
Author

chri2 commented Jun 13, 2025

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.

@martialblog
Copy link
Member

Good idea to open an issue, I'll keep an eye on it.

Thanks for the PR

Copy link
Member

@martialblog martialblog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some fixes the linter suggested

@martialblog
Copy link
Member

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

@martialblog
Copy link
Member

martialblog commented Jun 13, 2025

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants