Permissions after migrating from Nagios 3 to 4

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Horst
Posts: 2
Joined: Fri Jul 07, 2017 6:53 am

Permissions after migrating from Nagios 3 to 4

Post by Horst »

Hi everybody,

I've recently noticed that after migrating my config from Nagios 3 to 4 on Debian I'm getting this error when trying to view 2 hosts:

Code: Select all

It appears as though you do not have permission to view information for this host...
I can't even see them in the hosts list. I can only get there by going through the services page and clicking the host.

After a while of digging I found that I had selected another host template for those. The goal was to get an sms for those instead of an email (makes sense for the mailserver in particular).

In the past I had solved my problem by creating duplicate users (with a suffix to the user name) that be able to set different values for
host_notification_commands
and
service_notification_commands

Those additional users are bundled in additional groups. The host-template then has different contact_groups. That's how I control through which channel a notification goes.

Now that worked fine for Nagios 3, but since going to 4 it looks like I cannot even view those hosts on the webpage anymore when being logged in. I assume that's because the host is assigned to a group which only has the user myUsername-sms instead of the one I'm logged in with: myUsername

In general: Is there a nicer principle to configure that?
If not - would you have any idea how to fix my problem?
Horst
Posts: 2
Joined: Fri Jul 07, 2017 6:53 am

Re: Permissions after migrating from Nagios 3 to 4

Post by Horst »

I wasn't able to solve my problem, but at least work around it.

In the host_templates_nagios2.cfg file I now have this for hosts where I want something other than an email:

Code: Select all

contact_groups                  admins-sms,admins
Through this I will still get an email, but also the intented channel (here: SMS). And additionally I can view those entries with my normal account on the webpage.
Locked