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

I want to create some user accounts, each user has its own hostgroup. When they login to their account, they can only view and manage the hosts in their group. How do I do this? Is there a tool to easily mange? I am new to Nagios. Thank you.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

define a contact

define contact{
    contact_name                    somedude
    alias                           somedude
    service_notification_period     24x7
    host_notification_period        24x7
    service_notification_options    w,u,c,r
    host_notification_options       d,r
    service_notification_commands   notify-service-by-email
    host_notification_commands      notify-host-by-email
    email                           somedude@example.org
}

define a group containing the contact

define contactgroup {
    contactgroup_name       somegroup
    members                 somedude
}

when you define a host, include the contact_group

define host {
    host_name       someserver.example.org
    contact_groups  somegroup
    address         1.2.3.4
    use             generic-host
    notifications_enabled           1
}

create a password for this user:

htpasswd /etc/nagios3/htpasswd.users somedude

(/etc/nagios3 might not be the right directory depending on your install)

share|improve this answer
    
Thanks. It works. –  garconcn Jan 21 '12 at 21:26
add comment

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.