Nagios XI - Copy Users to a new Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ssoliveira
Posts: 91
Joined: Wed Dec 07, 2016 6:02 pm

Nagios XI - Copy Users to a new Nagios XI

Post by ssoliveira »

Good afternoon;

I reinstalled Nagios XI on a new server; and we are working on reconfiguring the monitored services.

We have hundreds of users configured to authenticate via LDAPS (Active Directory);

Reconfiguring these users manually is taking a lot of work;

Are there any configuration files that have a list of each users that i can edit? Or even a table in MySQL that I can edit?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Nagios XI - Copy Users to a new Nagios XI

Post by mbellerue »

Probably the best route here is to use the API. If you go to Help -> System Reference, you will see a section there for Users. If you have a few users added already, you could use a GET call to grab the data on an existing user, and use that as a template for the building out the rest of the users.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ssoliveira
Posts: 91
Joined: Wed Dec 07, 2016 6:02 pm

Re: Nagios XI - Copy Users to a new Nagios XI

Post by ssoliveira »

Hi @mbellerue

The suggested method does not have associations with LDAP \ Active Directory

It will not help to just create users; I need to create and already associate with the Activie Directory;

Are there other ways?

Code: Select all

curl -XGET "https://aaaaaa/nagiosxi/api/v1/system/user?apikey=bbbbb&pretty=1"

{
    "records": xxx,
    "users": [
        {
            "user_id": "7",
            "username": "xxxxx",
            "name": "xxxxxxxx",
            "email": "xxxxxxxxx",
            "enabled": "1"
        },
        {
            "user_id": "6",
            "username": "nagiosreader",
            "name": "Nagios Reader",
            "email": "root@localhost",
            "enabled": "1"
        }
        ....
    ]
}
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Nagios XI - Copy Users to a new Nagios XI

Post by mbellerue »

Huh, I would have expected the GET to return all of the information on the user. Well, no matter, the POST will allow you to create an AD/LDAP associated user account. It just would have been really nice to have a template to work off of. Can you take a look at the POST system/user section, and see if that has everything you're looking for?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ssoliveira
Posts: 91
Joined: Wed Dec 07, 2016 6:02 pm

Re: Nagios XI - Copy Users to a new Nagios XI

Post by ssoliveira »

Hello,

I have several LDAPs mapped; I will have to do this in parts :-(

Another problem; I can't find which attribute I use to grant access to "Core Config Manager access: FULL" permission.

The "POST system/user" documentation contains information about:

can_see_all_hs integer 0 or 1
can_control_all_hs integer 0 or 1
can_reconfigure_hs integer 0 or 1
can_control_engine integer 0 or 1
can_use_advanced integer 0 or 1
read_only integer 0 or 1 (all others won't work)

But there is no way to provide access to Core Config;

I don't want to give Admin access to all users; they need to be ordinary users; with permission to create new monitoring; etc
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Nagios XI - Copy Users to a new Nagios XI

Post by mbellerue »

That is an unfortunate limitation in our API. I will see about adding a feature request for that.

Unfortunately that doesn't help you, right now. Which means the last, and personally my least favorite, course of action is diving into the database. This can be very tricky, as tables, fields, and sometimes even data are linked in various ways. However, you might be able to get away with copying the data from the ccm_access and ccm_access_list fields in the xi_usermeta table in the nagiosxi database.

Take it slowly, and test, test, test.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked