Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have Nagios Core 3.2.1 installed and my current task is to allow non-admin users access to the Nagios UI. Is that even possible? or would i need to install some add-on?

share|improve this question
1  
serverfault.com/a/421160/59925 –  quanta Oct 10 '12 at 15:32
    
Sure is and it's all covered by the documentation. I suggest you read it. –  John Gardeniers Oct 10 '12 at 16:49

2 Answers 2

up vote 2 down vote accepted

Is it possible to create “view only” users?

Sure, you can do it by using the authorized_for_read_only variable:

/usr/local/nagios/etc/cgi.cfg

# A comma-delimited list of usernames that have read-only rights in
# the CGIs. This will block any service or host commands normally shown
# on the extinfo CGI pages. It will also block comments from being shown
# to read-only users.

authorized_for_read_only=anonymous

and let them view only specific services/servers?

Create a contact definition with the same contact_name:

/usr/local/nagios/etc/objects/contacts.cfg

define contact{
        contact_name                    anonymous
        use                             generic-contact
        alias                           No Name
        service_notifications_enabled   1
        host_notifications_enabled      1
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    c,w,r
        host_notification_options       d,u,r
        email                           anonymous@domain.com
        }

(that's called a authenticated contact)

then make him is the contact of the hosts/services which you want to allow to view:

define host{
        use                     linux-server
        host_name               localhost
        address                 127.0.0.1
        contacts                anonymous
        contact_groups          admin
        }
share|improve this answer
    
I've edited the cgi.cfg and the contacts.cfg files but when i add the contacts contact_name in the services file i'm getting an error while trying to restart nagios service. –  Itai Ganot Oct 11 '12 at 10:08
    
How can we help without seeing the error. –  quanta Oct 11 '12 at 10:11
    
that's the error i received: Running configuration check... FAILED! Restart aborted. Check your Nagios configuration. –  Itai Ganot Oct 11 '12 at 10:24
    
nagios -v /path/to/the/nagios.cfg? –  quanta Oct 11 '12 at 10:26
    
That's the error: Error: Contact 'it' specified in service 'MS Terminal server' for host 'xp-ams-2' is not defined anywhere! even though i've added the user to the cgi.cfg and contacts.cfg.. define contact{ contact_name it alias IT host_notification_period 24x7 service_notification_period 24x7 host_notification_options d,r service_notification_options w,u,c,r host_notification_commands host-notify-by-email service_notification_commands notify-by-email –  Itai Ganot Oct 11 '12 at 10:50

yes, Simply create a user without any special privs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.