CGI user - specify host

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Sniper
Posts: 4
Joined: Wed Oct 17, 2012 4:07 am

CGI user - specify host

Post by Sniper »

Hello all,

I have one small problem.

I have created new user, and I know how to add him to see all host in CGI
authorized_for_all_hosts=nagiosadmin,user

but is there possibility to add this user to see only one server with services on this host?

for example I as nagios admin can see all hosts and services
and I would like User1, will see only
server1 with his services and could see map with all host but only see them and cant open or managed?

sorry for my bad english :-)

Thank you
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: CGI user - specify host

Post by jsmurphy »

I should bite the bullet and write a guide on this then put it on exchange, I spoke at the Nagios conference a few weeks ago on more or less this exact topic... unfortunately the video isn't up yet.

This is one of my favourite little known features of Nagios, first remove the user from the CGI config file. If the users login name matches a contact definition name, then that user will be able to only see the devices to which that contact definition is assigned. So I suggest creating two distinctly different types of contacts... one which contains an email/sms/ticketing/etc, this contact will receive notifications. The second type of contact is used purely to match a users login context and should never receive a notification ever.

You can find the slides here: http://www.slideshare.net/nagiosinc/nag ... tiondesign though I don't know how much you will get out of them without explanation... the configuration examples might help though :D
Sniper
Posts: 4
Joined: Wed Oct 17, 2012 4:07 am

Re: CGI user - specify host

Post by Sniper »

jsmurphy -> thanks for help, I will try it.
khpcom
Posts: 1
Joined: Mon Nov 12, 2012 11:05 am

Re: CGI user - specify host

Post by khpcom »

Thank you for posting solution jsmurth. I figure someone had similiar problem so I searched through threads and found this :D
Locked