Definition of Host/Service States different than Nagios ones

Information and discussions relating to the Nagios V-Shell web interface.

Definition of Host/Service States different than Nagios ones

Postby eobiols » Wed Sep 04, 2013 4:11 am

Dear Sir,
Nagios Core defines the following Host States (3): Up, Down, Unreachable and the following Service States (4): OK, Warning, Unknown and Critical. These states do not match with the ones of our system which are the following ones (11)with the associated colour.
State Color
Idle Yellow
Ready Olive green
Active Green
Warning Light green
Test Purple
Unlaunched White
Alarm Red
Alarm Acknowledge Orange
Connection Lost Brown
Maintenance Dark Blue
Absent Cyan

Since the Nagios States (3+4) do appear in many Nagios configuration files, I assume that defining a new set of states is not feasible.
- Please, confirm.
Therefore, we were thinking about the feasibility of defining substates within the Nagios States. For example, defining the substate “IDLE” within the Nagios “OK” state. This is, OK.IDLE. At screen level, we would like to display only the substate information. For instance “IDLE” using our colour code (yellow for IDLE).
We initially thought about using the plugin text output (see nagioscore-3-en.pdf, page 333-334) to introduce this Nagios state plus the substate information.
- Could you please let us know if it is possible defining 11 states (idle,… absent) different than the Nagios one?. If so, how it can be done?.
- In case, the answer to the previous question is affirmative, please, clarify the mechanism to define the associated colours (yellow, …, cyan) at MMI level (Nagios V shell screen). Is it modifying the lines 112 to 120 of NAgios V shell CSS class file (“Style.css”)?

Best regards,
Enric Obiols
eobiols
 
Posts: 2
Joined: Wed Sep 04, 2013 1:52 am

Re: Definition of Host/Service States different than Nagios

Postby abrist » Wed Sep 04, 2013 10:30 am

Nagios only uses 3 host states and 4 service states. The only substates available in Nagios are HARD and SOFT. Any modification of this would require significantly altering the source code and subsequent checking logic. You can find the source at the following website: http://sourceforge.net/projects/nagios/

Best of luck!

eobiols wrote:- Could you please let us know if it is possible defining 11 states (idle,… absent) different than the Nagios one?. If so, how it can be done?.

Elegantly.
eobiols wrote:- In case, the answer to the previous question is affirmative, please, clarify the mechanism to define the associated colours (yellow, …, cyan) at MMI level (Nagios V shell screen). Is it modifying the lines 112 to 120 of NAgios V shell CSS class file (“Style.css”)?

Changing the CSS will definitely change the colors.

What is the purpose of this project?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Definition of Host/Service States different than Nagios

Postby eobiols » Thu Sep 05, 2013 2:13 am

Dear Sir,

Thanks for your answer. The purpose of the project is monitoring and control a satellite navigation system.

Best regards,

Enric Obiols
eobiols
 
Posts: 2
Joined: Wed Sep 04, 2013 1:52 am

Re: Definition of Host/Service States different than Nagios

Postby sreinhardt » Thu Sep 05, 2013 2:04 pm

That's a pretty cool usage. As abrist mentioned, it would require quite heavy modification of both the CSS for visualization and php. This would definitely be something out of the scope of normal support, however it could be done. Likely you would want to create a custom css generator for the colored areas that determines what check it is looking at, what status that check is in, and sets the color accordingly. This is not built in currently though. If you used vshell, this could also alleviate the need to alter the nagios core engine. I would suggest either digging into the php source of v-shell or contacting sales@nagios.com to see about us custom developing this for you.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
sreinhardt
-fno-stack-protector
 
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm


Return to Nagios V-Shell

Who is online

Users browsing this forum: No registered users and 1 guest