Hide options from users
Hide options from users
We have several users that go in and disable all notifications on their servers. We are working to stop the users from doing this, but in the mean time, we are hoping to get rid of the options "Disable Notifications on all Services on this host" and "Enable Notifications for all Services on this host".
Is there a way to do that in the code?
Running Nagios XI 5.6.0 on 64bit Red Hat 7.6 VM's.
Is there a way to do that in the code?
Running Nagios XI 5.6.0 on 64bit Red Hat 7.6 VM's.
Re: Hide options from users
I don't believe hiding a couple of links inthe web UI is a good solution. It will not guarantee that users won't find a "workaround", e.g. using the REST API, disabling/enabling notifications one-by-one, using the "Quick Actions" links, etc. In addition to this, you can't remove these links for specific users only. No one is going to be able to see the links if removed... You will be better off making these users "read-only" if you don't trust them.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Hide options from users
Unfortunately, making the users read only is not an option.
Removing the links from everyone is an option. I was hoping there was something similar to https://support.nagios.com/forum/viewto ... 36#p210071, but I cannot seem to find the correct lines to comment out.
Removing the links from everyone is an option. I was hoping there was something similar to https://support.nagios.com/forum/viewto ... 36#p210071, but I cannot seem to find the correct lines to comment out.
Re: Hide options from users
If I am not mistaken, these link are displayed under the Nagios Core interface. Correct me if I am wrong.
Home > Details > Host Status > <any host> > Advanced > View in Nagios Core > Disable/Enable notifications for all services on this host
If this is the case, removing these links would be impossible without recompiling your own version of Nagios Core (without the links). This is out of scope of Nagios support.
Home > Details > Host Status > <any host> > Advanced > View in Nagios Core > Disable/Enable notifications for all services on this host
If this is the case, removing these links would be impossible without recompiling your own version of Nagios Core (without the links). This is out of scope of Nagios support.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Hide options from users
Is there a way to alert when this command happens in the Audit Logs automatically?
Re: Hide options from users
There are some 3rd party plugins on the Nagios Exchange for monitoring files/logs that you could probably use. Here's an example of one plugin that can probably do the job for you:
https://github.com/pmcaulay/nagios-plug ... ck_log3.pl
1. Download the plugin and drop it into /usr/local/nagios/libexec directory.
2. Create a command, for example:
3. Create a service (I placed mine under localhost):
The plugin will give you a CRITICAL if the "DISABLE_HOST_SVC_NOTIFICATIONS" pattern is found in the auditlog.log. The "max_check_attempts" value should be set to 1 as the plugin will return OK after the second check, UNLESS a new string is found (new log entry).
Note: This check will notify you if any user has disabled notifications on all services of a host, provided the "Write Audit Log to file" check-box has been selected under the "System Settings" page.
https://github.com/pmcaulay/nagios-plug ... ck_log3.pl
1. Download the plugin and drop it into /usr/local/nagios/libexec directory.
2. Create a command, for example:
Code: Select all
define command {
command_name check_log3
command_line $USER1$/check_log3.pl $ARG1$ $ARG2$ $ARG3$
}Code: Select all
define service {
host_name localhost
service_description Audit Log - DISABLE_HOST_SVC_NOTIFICATIONS
use xiwizard_generic_service
check_command check_log3!-l /usr/local/nagiosxi/var/components/auditlog.log!-p DISABLE_HOST_SVC_NOTIFICATIONS!-c 1!!!!!
max_check_attempts 1
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
first_notification_delay 0
notification_period 24x7
notification_options w,c,u,r,f,
notifications_enabled 1
contacts nagiosadmin
register 1
}Note: This check will notify you if any user has disabled notifications on all services of a host, provided the "Write Audit Log to file" check-box has been selected under the "System Settings" page.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Hide options from users
The ones I am concerned about are displayed in the Service Details page under Quick Links.lmiltchev wrote:If I am not mistaken, these link are displayed under the Nagios Core interface. Correct me if I am wrong.
Home > Details > Host Status > <any host> > Advanced > View in Nagios Core > Disable/Enable notifications for all services on this host
If this is the case, removing these links would be impossible without recompiling your own version of Nagios Core (without the links). This is out of scope of Nagios support.
You do not have the required permissions to view the files attached to this post.
Re: Hide options from users
Oh, I see. These links have been added (by the look of them) under the Actions component (Admin > System Extensions > Manage Components). You can configure the permissions under the Actions page by clicking on the "Permissions" drop-down menu, selecting "Custom", selecting your contacts, and clicking on "Apply Settings".
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Hide options from users
That worked. When I deleted the custom actions, it got rid of the items.
Thank you
Henry
Thank you
Henry
Re: Hide options from users
I am glad I could help! 
I am closing this topic now. If you have any further questions, please start a new thread.
I am closing this topic now. If you have any further questions, please start a new thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!