Nagios Notifications Disablement for One Particular Service

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
sudharzit
Posts: 4
Joined: Sun Aug 07, 2016 9:43 am

Nagios Notifications Disablement for One Particular Service

Post by sudharzit »

Hi Team,

I would like to know some possibilities in nagios that can be feasible to implement or not. For an instance if I want to permanently disable the one of the service in the service definition itself by using the directive notification_enabled=0. It was disabled temporarily not permanently. If I try to initiate the external command against the hostgroup , the particular services which I have disabled in the configs are enabled based on the external command issued. I want the solution that the service should not be enabled even though external command is issued. Do you know how we can implement it? If possible respond to my query. Thanks in advance!!

Regards
Sudharsan
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Notifications Disablement for One Particular Serv

Post by rkennedy »

It should just be notifications_enabled 0 on the service that you want to disable notifications for. Can you show us the complete service definition?
If I try to initiate the external command against the hostgroup , the particular services which I have disabled in the configs are enabled based on the external command issued. I want the solution that the service should not be enabled even though external command is issued
Can you show us a screenshot of what you're experiencing? I'm not sure what would be changing this. Does anything appear in /usr/local/nagios/var/nagios.log? Can you attach it for us to review?
Former Nagios Employee
sudharzit
Posts: 4
Joined: Sun Aug 07, 2016 9:43 am

Re: Nagios Notifications Disablement for One Particular Serv

Post by sudharzit »

Please find the service definition for the services which we disabled the notification permanently on the configs. But if the NOC team handles the enable or disable monitoring ticket, they try to enable/disable the services using the GUI. Even though we have set the configuration with notification_enabled = 0 , if you try to enable the service using the GUI. it will send the external command to enable the notification for the services. likewise if you tires do for the host group also the disabled services associated with the hostgroup will be enabled with notification.

# Service 'Vod Platform Status'
define service{
use active-services
hostgroup_name xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
service_description Vod Platform Status
check_command check_by_ssh!"/usr/local/ccdn/nrpe/check_vod_status.sh"
servicegroups xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
notifications_enabled 0
#contact_groups support
action_url https://XXXXXXXXXXXXXXXXXXXXXXXX/XXXXXXXXXXXXXXXXX
_SERVICEOWNER XXXXXXXXXXXXXXXXXXXXX
_SEV 4
}

Log :
if i try to disable the service in service level
[1424463832] EXTERNAL COMMAND: ENABLE_SVC_NOTIFICATIONS;host_namexxxx;Vod Platform Status
if i try to disable the hostgroup associated services
[1424463832] EXTERNAL COMMAND: ENABLE_HOSTGROUP_SVC_NOTIFICATIONS;hostgroupnamexxxx

Thanks,
Sudharsan
bwallace
Posts: 1146
Joined: Tue Nov 17, 2015 1:57 pm

Re: Nagios Notifications Disablement for One Particular Serv

Post by bwallace »

Have you considered restricting access for the NOC team so they can only view specific hosts/services? You could also configure Nagios so they cannot issue cmds from the UI for a specific host/service. This would be a good starting point:
https://assets.nagios.com/downloads/nag ... iauth.html
Be sure to check out the Knowledgebase for helpful articles and solutions!
sudharzit
Posts: 4
Joined: Sun Aug 07, 2016 9:43 am

Re: Nagios Notifications Disablement for One Particular Serv

Post by sudharzit »

Yeah that's great idea. But in our scenario, NOC should have full access to the execute the external commands because they are the major ticket executor of monitoring tasks. We can't restrict but we need to find a solution how we can overcome this issue. Service shouldn't override if we execute the external command. If we turned off the notifications on service definition level how it was enabled using external commands.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Notifications Disablement for One Particular Serv

Post by tgriep »

If the NOC group needs full Admin rights to the Nagios server, then there is no way to remove the ability for the NOC group to change specific settings for one service.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sudharzit
Posts: 4
Joined: Sun Aug 07, 2016 9:43 am

Re: Nagios Notifications Disablement for One Particular Serv

Post by sudharzit »

Can anyone help me how set up the restriction to execute the external commands for the specific services.

Thanks,
Sudharsan
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios Notifications Disablement for One Particular Serv

Post by Box293 »

Nagios does not allow that granular level of control.

All you can do is enable / disable that privilege (globally) for specific users.

https://assets.nagios.com/downloads/nag ... iauth.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked