Nagios Core - Display Filter
-
Master_Chief_Jon
- Posts: 23
- Joined: Fri Nov 19, 2010 1:31 pm
Nagios Core - Display Filter
I am currently using a Nagios URL that filters the Services display so that it shows me only services that are NOT OK. The URL for that is cgi-bin/status.cgi?host=all&type=detail&servicestatustypes=29&serviceprops=0
.
The problem is that this only shows when a service check fails, it doesn't show when a host check fails. If I add the filter for hoststatustypes to the URL above, it ANDS the host filter with the service filter, so you have to have the host check fail AND the service check fail before it shows up.
.
Is there a way to OR the host check / service check filter in one URL?
.
The problem is that this only shows when a service check fails, it doesn't show when a host check fails. If I add the filter for hoststatustypes to the URL above, it ANDS the host filter with the service filter, so you have to have the host check fail AND the service check fail before it shows up.
.
Is there a way to OR the host check / service check filter in one URL?
Re: Nagios Core - Display Filter
Master_Chief_Jon wrote:I am currently using a Nagios URL that filters the Services display so that it shows me only services that are NOT OK. The URL for that is cgi-bin/status.cgi?host=all&type=detail&servicestatustypes=29&serviceprops=0
.
The problem is that this only shows when a service check fails, it doesn't show when a host check fails. If I add the filter for hoststatustypes to the URL above, it ANDS the host filter with the service filter, so you have to have the host check fail AND the service check fail before it shows up.
.
Is there a way to OR the host check / service check filter in one URL?
I have the exact same challenge - any solution?
Re: Nagios Core - Display Filter
I may be misunderstanding the problem... but isn't that essentially what the root problem page in Nagios is doing? So if you were to use the URL:
"cgi-bin/status.cgi?host=all&servicestatustypes=28"
Does this do what you are after?
"cgi-bin/status.cgi?host=all&servicestatustypes=28"
Does this do what you are after?
Re: Nagios Core - Display Filter
I see now, that I was not accurate enough in my last post... The root problem page as well as your URL shows the same - what I am really after is just that, but with acknowledged problems filtered out. So I'd like to see only the unacknowledged host problems and the unacknowledged service problems in one page.jsmurphy wrote:I may be misunderstanding the problem... but isn't that essentially what the root problem page in Nagios is doing? So if you were to use the URL:
"cgi-bin/status.cgi?host=all&servicestatustypes=28"
Does this do what you are after?
Re: Nagios Core - Display Filter
Ohhh I see, I think if you use: "status.cgi?host=all&type=detail&servicestatustypes=28&serviceprops=10&hostprops=10" that will give you exactly what you want.
I think it's using bitwise operations to work out what to display, so basically add the numbers below together to display what you want:
#servicestatustypes=
Ok - 2
Warning - 4
Unknown - 8
Critical - 16
(28 is all except ok)
#hoststatustypes=
Up - 2
Down - 4
Unreachable - 8
#host/serviceprops= (This one has more but these are probably the two you care about)
No scheduled downtime - 2
Unacknowledged - 8
(10 is unknown problems)
I think it's using bitwise operations to work out what to display, so basically add the numbers below together to display what you want:
#servicestatustypes=
Ok - 2
Warning - 4
Unknown - 8
Critical - 16
(28 is all except ok)
#hoststatustypes=
Up - 2
Down - 4
Unreachable - 8
#host/serviceprops= (This one has more but these are probably the two you care about)
No scheduled downtime - 2
Unacknowledged - 8
(10 is unknown problems)
Re: Nagios Core - Display Filter
Ahhh, yes, this is exactly what I needed!jsmurphy wrote:Ohhh I see, I think if you use: "status.cgi?host=all&type=detail&servicestatustypes=28&serviceprops=10&hostprops=10" that will give you exactly what you want.
Are you able to supply me with a link to somewhere I can get an overview of all values for statustypes and props, and some information telling me if a given value is relevant as a prop or a statustype for a service or host? I have tried to find some good documentation for this on Uncle Google, and did find some values and their meaning, but nothing on in which context (hostprop, hoststatustype, serviceprop or servicestatustype) they were relevant...
Re: Nagios Core - Display Filter
I have seen this question asked a few times so when I saw it again yesterday I actually wrote a blog post detailing exactly that
: http://roshamboot.org/main/?p=74
-
Master_Chief_Jon
- Posts: 23
- Joined: Fri Nov 19, 2010 1:31 pm
Re: Nagios Core - Display Filter
jsmurphy - I am the original poster. Your solution works when there is a service check failure regardless of what the host status is (that's good); but if there is a host check failure and NOT a service check failure, then the error doesn't appear on the status.cgi screen.
That's because the two pieces (host=all and servicestatustypes=28) are AND-ed together. I'm asking is there a way to OR them together.
That's because the two pieces (host=all and servicestatustypes=28) are AND-ed together. I'm asking is there a way to OR them together.
Re: Nagios Core - Display Filter
jsmurphy already answered this:
http://roshamboot.org/main/?p=74Note: As far as I know there is no way to do an “OR” so you can’t do “I want it to display only the server if its down OR the critical services if it is not”.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios Core - Display Filter
Blog posting above displays white screen.
Need assistance on this also -- also need the ability to filter out services/hosts from specific groups.
Need assistance on this also -- also need the ability to filter out services/hosts from specific groups.