Page 1 of 2
Hide Services from Contact Group
Posted: Thu Apr 18, 2019 8:58 am
by nms
Hi,
I have a contact group called "NOC" in which it consists of 11 members. Each of these 11 members is set as Authorization level: User, but are able to control all objects. That is, they can force check and acknowledge problems. Below is a snapshot of how one of the users is configured:
User.png
First, I tried to remove the service/s by navigating to CCM -> BMT -> Remove Contact Group.
Then I selected the service to be hidden and applied config.
However, this did not work as the services remained visible for these users belonging in the 'NOC" group.
I then noticed that the host where these services belong had the Notification set to this user group, so I removed it. Here's a snapshot of the previous host notification tab.
Notification.png
After that, I noticed that the services were actually hidden, however any alarming related to this host and the rest of the visible services were not being uploaded into the Operations Centre, using the users belonging to the NOC group.
I tested the alarming via a false ping in which I could see the alerts when navigating to the host but not to the OpCentre.
Alarm.png
This is worrying as other services for this host needs to be alerted.
I'm not sure how to do a workaround for this, or if there is anything that' I'm missing.
Can you kindly shed some light?
Rgds,
Matthew
Re: Hide Services from Contact Group
Posted: Thu Apr 18, 2019 1:59 pm
by cdienger
I think I'm getting the idea, but just want to clarify:
1. You removed the NOC group from HostX and ServiceX but left them as a contact for ServiceY?
2. Now the NOC group cannot see HostX and ServiceY are no longer visible in the Operations Center?
What do you mean by you want to "hide" the service? What screens do you want to remove it from?
Is this correct? What version of XI is this? I've tested on a 5.5.11 build and don't see this behavior so it may have changed since the version you are on.
Re: Hide Services from Contact Group
Posted: Thu Apr 18, 2019 2:07 pm
by nms
Hi,
Correct. Service Y still has the contact group.
HostX is actually visible if you search for it, however, no alarms are then visible in the OpCentre. This I found strange (as it was tested).
What I am after is simply to hide the service completely from these users, that is, completely transparent as in not existent for these users. Thus no alarms will also be raised.
Apologies forgot to add the Nagios version. It's still on 5.4.13. However, looking at the release notes I did not see anything related.
Rgds,
Matthew
Re: Hide Services from Contact Group
Posted: Fri Apr 19, 2019 11:46 am
by cdienger
It sounds like there may be a problem with the database. Repair the databases by running /usr/local/nagiosxi/scripts/repair_databases.sh, and rewrite the configuration afterwards by going to Configure > Core Config Manager > Tools > Config File Management, and click:
Delete Files
Write Configs
Verify Files
Restart Nagios Core
Afterwards, re-apply the configuration and check the operations center again. If it still isn't showing services that should be visible, please PM me a profile(Admin > System Config > System Profile > Download Profile) and the username of the NOC user you're testing with.
Re: Hide Services from Contact Group
Posted: Mon Apr 22, 2019 10:52 am
by nms
Hi,
I repaired DB using the provided script then navigated to the CCM. When verifying the files (it took quite a bit of time to rewrite config and GUI wasn't even responding) I had this error and warnings:
errors.png
I solved all warnings, but can't understand the 2 errors. Due to this after solving all warnings I did run the repair DB again, deleted all and written config. Somehow this took too much time, and it seems all was hanged, so I couldn't wait much longer with a production downtime so eventually, I ending up in loading back from the backup (backup was only from a few hours ago).
Could it be possible to do the CCM Config File Management part from a cli to watch the progress?
I have sent also the profile via PM, just in case you can spot something odd from there
Rgds,
Matthew
Re: Hide Services from Contact Group
Posted: Mon Apr 22, 2019 1:57 pm
by cdienger
The profile shows mulitple nagios processes are running. Restart everything so that only one is running:
Code: Select all
service nagios stop
service ndo2db stop
service mysqld stop
service crond stop
service httpd stop
killall -9 nagios
killall -9 ndo2db
rm -f /usr/local/nagios/var/rw/nagios.cmd
rm -f /usr/local/nagios/var/nagios.lock
rm -f /usr/local/nagios/var/ndo.sock
rm -f /usr/local/nagios/var/ndo2db.lock
rm -f /usr/local/nagiosxi/var/reconfigure_nagios.lock
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
service mysqld start
service ndo2db start
service nagios start
service httpd start
service crond start
Re: Hide Services from Contact Group
Posted: Mon Apr 22, 2019 2:11 pm
by nms
Done. Re-attaching profile
Re: Hide Services from Contact Group
Posted: Tue Apr 23, 2019 11:24 am
by nms
Hi,
I've tested this on latest version 5.6.0.
I noticed the following:
1/ if the host does not contain the user or user group, then yes the service you want to hide is hidden, but when you click on the host you are not authorized to view it, hence if the host goes down there are no alarms on the OpCentre for the host (ping loss) which of course the user will not know that the host is out of service
2/ if the host does contain the user or user group, you cannot hide any service at all. This has been tried via the CCM -> BMT -> Remove Contact Group. After services were removed, they were still shown.
Re: Hide Services from Contact Group
Posted: Tue Apr 23, 2019 11:27 am
by cdienger
Not seeing any obvious errors - are you still seeing issues with verifying configuration or hiding services from users?
Re: Hide Services from Contact Group
Posted: Tue Apr 23, 2019 11:34 am
by cdienger
Looks like our last responses passed each other. Regarding the 5.6 testing and your first point - you'd like to still be able to see the host in the opcenter even if the user isn't a contact?