not show soft states
not show soft states
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
https://outsideit.net
Re: not show soft states
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
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
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: not show soft states
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:
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:
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:
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:
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
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=28If 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);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);Code: Select all
http://xitest/nagiosxi/includes/components/xicore/status.php?show=services&servicestatustypes=28&serviceattr=262144/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.
Re: not show soft states
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
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
https://outsideit.net
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: not show soft states
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.
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.