Page 1 of 3

multi-tenancy on Nagios XI Trial

Posted: Wed Apr 05, 2017 2:49 pm
by ctretelea
I try the multi-tenancy option on Nagios XI trial version.
Created user can see all servers and hosts, but it supposed to see only some of them.
What can be the issue?

Re: multi-tenancy on Nagios XI Trial

Posted: Wed Apr 05, 2017 4:45 pm
by tgriep
Can you login to the XI GUI and go to the Admin > Manage users menu.
Edit the user's settings, screen capture the security settings and post that here?

Re: multi-tenancy on Nagios XI Trial

Posted: Thu Apr 06, 2017 11:39 am
by ctretelea
tgriep wrote:Can you login to the XI GUI and go to the Admin > Manage users menu.
Edit the user's settings, screen capture the security settings and post that here?
Hi tgriep,
Thank you for answer,
Here is my screenshot.

Re: multi-tenancy on Nagios XI Trial

Posted: Thu Apr 06, 2017 1:41 pm
by tgriep
I tried to recreate the issue you are having in XI version 5.4.3 and it worked for me like it is suppose to.
What version of Nagios XI are you running?
Can you verify that the user is not in a contact group that is applied to all of the hosts and that is how they are getting access to them?

One thing to try, lets restart the Nagios processes and see if that works.
Login to the Nagios server and run the following to do that.

Code: Select all

service nagios stop
killall -9 nagios
service httpd restart
service nagios start
Then, login to the XI GUI as that user and see if that fixes the issue.
Also, clear the browsers cache and see if that caused that helps.

Re: multi-tenancy on Nagios XI Trial

Posted: Thu Apr 06, 2017 2:53 pm
by ctretelea
Hi tgriep,
My XI version is 5.4.3.
I reboot the server and noting changed that user is able to see all hosts and services.
it is not part of any group.

Re: multi-tenancy on Nagios XI Trial

Posted: Thu Apr 06, 2017 4:09 pm
by tgriep
Can you post your System Profile or PM it to me so we can view the servers configurations and log files?
To post your system profile. login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and either post or PM it to me.

Re: multi-tenancy on Nagios XI Trial

Posted: Fri Apr 07, 2017 8:59 am
by tgriep
To fix the backend that is not running, you will need to delete a few files and then restart it. To do that, login as root to the Nagios Server and run the following commands.

Code: Select all

rm /usr/local/nagios/var/ndo2db.lock
rm /usr/local/nagios/var/ndo.sock
service ndo2db start
Wait a few minutes, then run the following commands and post the output.

Code: Select all

cd /usr/local/nagiosxi/scripts
su nagios
./reconfigure_nagios.sh
If the ndo2db process wasn't running when the user was created, that could be the cause of the issue.
Login to the XI GUI and go to that users account and re-save the settings and see if that works and sets up the permissions correctly.

Another question, is the server setup for SSL access?

Re: multi-tenancy on Nagios XI Trial

Posted: Fri Apr 07, 2017 9:38 am
by ctretelea
Hi tgriep,

Yes I browsed and I found that we can rm those 2 file (ndo2db.lock and ndo.sock) and restart the service. So that I did. Now service is up and running.
Thanks.

Do I need to run that script? (./reconfigure_nagios.sh)

Server it configured to use HTTPS.

Re: multi-tenancy on Nagios XI Trial

Posted: Fri Apr 07, 2017 12:17 pm
by tgriep
When the server was setup for SSL access, one of the settings was missed. To fix that, do the following.
Edit the file /usr/local/nagiosxi/html/config.inc.php and find the following line:

Code: Select all

$cfg['use_https']=false;
Change it to:

Code: Select all

$cfg['use_https']=true;
Save the changes.

Then run the ./reconfigure_nagios.sh script and post the output here so I can see if there are any errors.

If the user account is still showing too many host or services when they login, run the following commands and PM me the /tmp/users.txt file.

Code: Select all

echo 'select * from xi_users;' | mysql -u root -pnagiosxi nagiosxi -t >/tmp/users.txt
echo 'select * from xi_usermeta;' | mysql -u root -pnagiosxi nagiosxi -t >>/mp/users.txt

Re: multi-tenancy on Nagios XI Trial

Posted: Fri Apr 07, 2017 1:30 pm
by ctretelea
Hi tgriep,

I change as you mentioned and output is attached here.
I login with that user and he is able to see all hosts and services.

Thanks,