multy-tenancy problem with contactgroups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

multy-tenancy problem with contactgroups

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: multy-tenancy problem with contactgroups

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: multy-tenancy problem with contactgroups

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: multy-tenancy problem with contactgroups

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: multy-tenancy problem with contactgroups

Post by morabanc »

Hello

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

Thanks for your support
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: multy-tenancy problem with contactgroups

Post by cmerchant »

Great! We'll go ahead and close this thread. Thank you.
Locked