User permissions

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

User permissions

Postby eFusion » Mon Jan 14, 2019 5:04 am

First of all - sorry for my english :D
I looked for the answer to this question on the forum but found nothing.
I have Nagios Core with big numbers of objects.
I need set user permissions to monitoring only a part of all objects.
I have 3 users:
    nagiosadmin - admin permissions
    user1 - admin permissions
    user2 - need not full access

I think that i need to create a new group of hosts and bind user2 to it. After that move in new group some objects.
I tried next:

In nagios/objects/contacts.cfg i create this blocks:
Code: Select all
define contact{
        contact_name             user2;
        use                             generic-contact;
        alias                           user2;
        email                         user2@domain.com;
        }
define contactgroup{
       contactgroup_name user2
       alias user2
       members user2
}


In nagios/objects/templates.cfg i create this block:

Code: Select all
define host{
        name generic-user2;
        use generic-switch >;
        contact_groups user2;
        hostgroups user2_switches;
        register 0;
}


In directives authorized_for_* i don't see restrictions for group of hosts.

I am totally confused.
What i'am forget to configure or modify.
Thanks for help
eFusion
 
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: User permissions

Postby scottwilkerson » Mon Jan 14, 2019 8:30 am

In your example the user2 contact would have access to the hosts that the generic-user2 template was applies as long as the contactgroup directive wasn't overwritten by another contactgroup directive in the host you applied the template to.

The authorized_for_* are only for broad access to everything
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12916
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: User permissions

Postby eFusion » Mon Jan 14, 2019 12:14 pm

Thank you for the answer.
How to bind generic-user2 template to the some host?
In nagiosQL on create/edit?
eFusion
 
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: User permissions

Postby scottwilkerson » Mon Jan 14, 2019 12:28 pm

If you are using nagiosql you would add generic-user2 as a template to the specific host

then write config files, verify and restart nagios
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12916
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: User permissions

Postby eFusion » Mon Jan 14, 2019 2:31 pm

I will try.
Thanks a lot
eFusion
 
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: User permissions

Postby scottwilkerson » Mon Jan 14, 2019 2:36 pm

eFusion wrote:I will try.
Thanks a lot


Sounds good. Let us know how it works out
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12916
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 6 guests