Page 1 of 1

Notifications on email

Posted: Tue Dec 11, 2018 10:34 am
by user1234
Hello.
Its possible to turn off notification email only for some services/hosts?
I want monitor it but without email notification when nagios detected problem.

Re: Notifications on email

Posted: Tue Dec 11, 2018 5:15 pm
by ssax
Yes, you can either do them one by one by going to Home > Host Status OR Service Status > Click on the Host/Service > Click the + tab and then click the X next to notifications. You will need to do this on all the Hosts and all the Services that you want disabled if you go this route.

OR

You can go to Configure > Core Config Manager > Hosts OR Services:
- Edit the Host or Service
- Click the Alert Settings tab
- Set Notifications enabled to Off
- Save
- Do it to the rest of the hosts/services
- Apply Configuration

OR

If you have the enterprise license you can use Configure > Core Config Manager > Tools > Bulk Modifications Tool:
- Click Change a Single Config Option
- Select Notifications enabled from the dropdown
- Select the Off radio button below it
- Click the Select Hosts and Select Services buttons to select the hosts/services
- Click the Save Changes button
- Apply Configuration

OR

You can use the API, see here for the examples:

Code: Select all

http://YOURXISERVER/nagiosxi/help/api-system-reference.php#system-core-command
To disable notifications for the Host AND for all of the Host's services:

Code: Select all

curl -k -L -XPOST "http://YOURXISERVER/nagiosxi/api/v1/system/corecommand?apikey=YOURAPIKEY" -d "cmd=DISABLE_HOST_SVC_NOTIFICATIONS;localhost"
To disable notifications for only the Host (Services will still notify):

Code: Select all

curl -k -L -XPOST "http://YOURXISERVER/nagiosxi/api/v1/system/corecommand?apikey=YOURAPIKEY" -d "cmd=DISABLE_HOST_NOTIFICATIONS;localhost"
To disable notifications only for a specific Service:

Code: Select all

curl -k -L -XPOST "http://YOURXISERVER/nagiosxi/api/v1/system/corecommand?apikey=YOURAPIKEY" -d "cmd=DISABLE_SVC_NOTIFICATIONS;localhost;SSH"
To enable notifications for the Host AND for all of the Host's services:

Code: Select all

curl -k -L -XPOST "http://YOURXISERVER/nagiosxi/api/v1/system/corecommand?apikey=YOURAPIKEY" -d "cmd=ENABLE_HOST_SVC_NOTIFICATIONS;localhost"
To enable notifications for only the Host (Services will still notify):

Code: Select all

curl -k -L -XPOST "http://YOURXISERVER/nagiosxi/api/v1/system/corecommand?apikey=YOURAPIKEY" -d "cmd=ENABLE_HOST_NOTIFICATIONS;localhost"
To enable notifications only for a specific Service:

Code: Select all

curl -k -L -XPOST "http://YOURXISERVER/nagiosxi/api/v1/system/corecommand?apikey=YOURAPIKEY" -d "cmd=ENABLE_SVC_NOTIFICATIONS;localhost;SSH"