not show soft states

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

not show soft states

Post by WillemDH »

Is there some way to not show soft states in open service / host problems? We have a lot of instable hosts which keep popping up, I'm really trying to find a solution for them to not pollute our problem views. Any other suggestions?
Nagios XI 5.8.1
https://outsideit.net
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: not show soft states

Post by BanditBBS »

I can't think of anything, but that'd be a heck of a feature request to add to those screens and the birdseye, operations screen, operations center and all others like that!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: not show soft states

Post by Box293 »

I can tell you how to do it but it's a tad confusing.

Basically the URLs contain the key to it all. For example:

Code: Select all

http://xiproduction/nagiosxi/includes/components/xicore/status.php?show=services&servicestatustypes=28
This &servicestatustypes=28 makes the page display with the filters Service=Warning,Unknown,Critical.

If you look in this file /usr/local/nagiosxi/html/includes/constants.inc.php you'll find this:

Code: Select all

// PSEUDO-STATES (USED IN LINKS, ETC)
define("SERVICESTATE_PENDING", 1);
define("SERVICESTATE_OK", 2);
define("SERVICESTATE_WARNING", 4);
define("SERVICESTATE_UNKNOWN", 8);
define("SERVICESTATE_CRITICAL", 16);
define("SERVICESTATE_ANY", 31);
4 (Warning) + 8 (Unknown) + 16 (Critical) = 28

So it should be a matter of defining an extra filter to only display hard states. You'll see this in the file:

Code: Select all

define("SERVICESTATUSATTR_HARDSTATE", 262144);
So you should be able to add &serviceattr=262144 to any URL and it will only show you HARD states. However you still need the other filter, so it would be something like:

Code: Select all

http://xitest/nagiosxi/includes/components/xicore/status.php?show=services&servicestatustypes=28&serviceattr=262144
Which should show a filter like Service=Warning,Unknown,Critical,Hard State,Hard State

/usr/local/nagiosxi/html/includes/constants.inc.php is a handy file to go digging in :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: not show soft states

Post by WillemDH »

Troy,

Thanks for the nice as-always in-depth explanation. Imho this should be integrated ina future releaase of XI? If possible make it a changeable and saveable setting per user. I think there should be a global admin setting (like the sticky ack) which would set the default setting for all users, but it should be overridable with a small button like the 'hide/show handled' button on the Birdseye component?

Grtz
Nagios XI 5.8.1
https://outsideit.net
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: not show soft states

Post by Box293 »

Yes I think it would be a great feature as well. I've created TASK ID 6859 for this.

At least you have some way of making it work in the mean time by adding &serviceattr=262144 to any URLs.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: not show soft states

Post by WillemDH »

Thanks Troy,

This can be closed.
Nagios XI 5.8.1
https://outsideit.net
Locked