Page 1 of 1

multy-tenancy problem with contactgroups

Posted: Thu Jan 08, 2015 11:23 am
by morabanc
Hello,

We're migrating a nagios core to a new nagios XI, and we have a problem with multi-tenancy. Contacts that belongs to an specific contactgroup should see specific hosts and services, but users cant' see anything. But if I add a contact to the hosts instead of the complete contactgroup then this contact can see the host. It seems multi-tenancy is working using contacts, but not with contactgroups.

the server is a RedHat Linux with Nagios XI 2014R2.3

Regards

Re: multy-tenancy problem with contactgroups

Posted: Thu Jan 08, 2015 1:47 pm
by lmiltchev
I need to ask this first - have you verified that you added the desired contacts to the contactgroup? Can the user see hosts/services in Nagios Core? Do you have any mysql errors in the mysqld.log?

Code: Select all

tail -20 /var/log/mysqld.log
It is possible that you are missing the "importance" columns in the nagios_hosts, nagios_services, and nagios_contacts tables in the nagios database... Run the following command and show us the output:

Code: Select all

echo "use nagios;desc nagios_hosts;desc nagios_services;desc nagios_contacts;" | mysql -t -pnagiosxi

Re: multy-tenancy problem with contactgroups

Posted: Fri Jan 09, 2015 6:00 am
by morabanc
Hello,

Yes, the contacts are in the contact groups. And it seems mysql is working correctly.
You're right about the "importance" column. When I run the command this column is not appearing, curiously, we're using sql-front to manage the DB, and I can see the column in the object browser view. tables nagios_contacts and nagios_hosts are empty.

I attach the result of the command.

Re: multy-tenancy problem with contactgroups

Posted: Fri Jan 09, 2015 11:31 am
by lmiltchev
Well, hopefully this would be an easy fix. Run the following commands to add the missing columnts:

Code: Select all

mysql -pnagiosxi
use nagios;
alter table nagios_services add column importance int not null default 0;
alter table nagios_hosts add column importance int not null default 0;
alter table nagios_contacts add column minimum_importance int not null default 0;
\q
service mysqld restart
Let me know if this fixed your issue. Thanks!

Re: multy-tenancy problem with contactgroups

Posted: Mon Jan 12, 2015 4:24 am
by morabanc
Hello

It worked! the problem was with nagios_contacts table, field minimum_importance not existed.

Thanks for your support

Re: multy-tenancy problem with contactgroups

Posted: Mon Jan 12, 2015 10:10 am
by cmerchant
Great! We'll go ahead and close this thread. Thank you.