0

I'm trying to set up new user who just watch a hostgroup:

I made that user like this:

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 contactgroup {
    contactgroup_name       somegroup
    members                 somedude
}

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


define hostgroup {
                hostgroup_name somehostgroup
                alias          somealias

        }

htpasswd /etc/nagios3/htpasswd.users somedude

And I can see the host in the option contact_groups ,but i can`t see host in the option hostgroup. I receive the error told me, i dont allow to see that (hostgroup)

Error:

It appears as though you do not have permission to view information for any of the hosts you requested... If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI and check the authorization options in your CGI configuration file.

How i configure that to see hostgroup?

Best regards

3
  • Does the hostgroup exist? I don't see it in your config. – Catherine MacInnes Nov 20 '15 at 1:35
  • Sorry i forgot add that line, now i edit and put @Catherine Maclnnes – user243380 Nov 20 '15 at 8:47
  • I tried with add one new template with contact_groups and hostgroups and put in the host, but the error is the same – user243380 Nov 20 '15 at 9:34
0

To view a hostgroup, the user must be have permission to view (e.g., be a contact) for every host in the hostgroup.

2
  • But, i dont know how to implement that solution, i can`t add contact to hostgroup @keith thank for your help – user243380 Nov 23 '15 at 8:26
  • Sorry, i understand now, I implement the contact_groups in every host of the hostgroup and works fine. thank you @keith – user243380 Nov 23 '15 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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