Page 1 of 1
Display one service check
Posted: Mon Jun 04, 2012 8:38 am
by pdstu25
Hello all,
I am trying to figure out a way to just display one service for a host group. I was trying to manipulate the status.cgi url to accomplish this but had no luck. I have a service check I created that uses netstat to tell me the connections to our servers. The check works fine and displays in the normal critical and warning page but I want to create my own page that only display crital or warning for this check. I hope this makes sense and any help would be appreciated.
Thanks
Re: Display one service check
Posted: Mon Jun 04, 2012 11:01 am
by agriffin
I don't really understand what you're asking for. Could you clarify somehow?
Re: Display one service check
Posted: Mon Aug 06, 2012 3:18 pm
by pdstu25
Thanks for getting back to me. Sorry for delayed response. I will try to explain this better.
So I have domain.com/nagios/cgi-bin/status.cgi?hoststatustypes=6&servicestatustypes=16&style=hostsummary&noheader=yes In my URl. This shows my hosts with critical status and all services for that host that are critical. What I want is it to show only one specific service if it's critical and ignore all other services.
For example this is my scenario. I have one installation of nagios that monitors about 500 servers and about 8 services per server. My fellow sysadmins and I need to see all the services if they are critical. The networking department only wants to see if one service that they wrote is critical and nothing else. I thought the best way would be changing the status.cgi query.
Any help is appreciated.
Re: Display one service check
Posted: Mon Aug 06, 2012 6:52 pm
by jsmurphy
Oh boy does this issue bring back memories.
I wrote an article on the full extent of the Nagios status CGI here:
http://roshamboot.org/main/?p=74. It will not help you.
You're actually barking up the wrong tree here, for some reason a little known fact about Nagios is that if a user login (http-context) matches a user contact definition then it will only give that user the ability to view the devices to which he/she is assigned... I think you see where I am going with this. LDAP/AD integrate your apache login then create "dummy contacts" that match the usernames but receive no alerts. Assign those users to contact groups based on the team they work for and then assign that to the relevant contact-group that sends notifications to that team and to the relevant host-templates. Bonus points for writing a script that handles it all auto-magically.
Now you have an AD integrated, user context aware Nagios! How cool is that.
Re: Display one service check
Posted: Tue Aug 07, 2012 7:10 am
by pdstu25
Thanks for the response and pointing me in the right direction. This makes since to me so I believe this will resolve my issue.
