Disable Notification using Command Line

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
elealyngarcia
Posts: 18
Joined: Sun Apr 28, 2019 6:09 pm

Disable Notification using Command Line

Post by elealyngarcia »

Hi,

We are creating a restoration test for our Nagios XI server, is it possible to disable the Notification using CLI instead of using the UI?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Disable Notification using Command Line

Post by dchurch »

Do you mean you want to disable all notifications for all hosts/services in XI? Or just for one host?

If the former, you could just shut down the monitoring engine, otherwise Nagios XI has an API that can do it:

Code: Select all

curl -X POST \
    -d "cmd=DISABLE_NOTIFICATIONS" \
    "http://192.168.5.xx/nagiosxi/api/v1/system/corecommand?apikey=API_KEY"
For one host only:

Code: Select all

curl -X POST \
    -d "cmd=DISABLE_HOST_NOTIFICATIONS;<my_host_name>" \
    "http://192.168.5.xx/nagiosxi/api/v1/system/corecommand?apikey=API_KEY"
Your API key can be found in your profile (click your user name top right corner of screen).

There are lots of external commands that you might find interesting.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked