Hi,
As part of redoing of a cheap DR solution I restore the primary backup to the failover host. This enables notifications and checks on the 02 host.
I need to globally disable notifications and active service checks via the shell on the failover. I assume these are in one of the xi_* tables but I haven't found it yet.
Can you give me a pointer to where these are set?
NXI 5.7.3 disable notifications and active service checks
Re: NXI 5.7.3 disable notifications and active service check
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:For one host only: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 the former, you could just shut down the monitoring engine, otherwise Nagios XI has an API that can do it:
Code: Select all
curl -XPOST "http://192.168.5.xx/nagiosxi/api/v1/system/corecommand?apikey=API_KEY" -d "cmd=DISABLE_NOTIFICATIONS"Code: Select all
curl -XPOST "http://192.168.5.xx/nagiosxi/api/v1/system/corecommand?apikey=API_KEY" -d "cmd=DISABLE_HOST_NOTIFICATIONS;<my_host_name>"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.
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.
Re: NXI 5.7.3 disable notifications and active service check
ALL notifications and ALL service checks.
The solution provided for setting the program URL was
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi -e "update xi_options set value = 'hostname/nagiosxi/' where name = 'url';"
And I'd prefer a similar direct to the DB solution for this rather than using the API.
The solution provided for setting the program URL was
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi -e "update xi_options set value = 'hostname/nagiosxi/' where name = 'url';"
And I'd prefer a similar direct to the DB solution for this rather than using the API.
Re: NXI 5.7.3 disable notifications and active service check
If you're set on using the command line, then command should stop all service and host checks and pause all notifications.
Code: Select all
service nagios stopIf 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.
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.
Re: NXI 5.7.3 disable notifications and active service check
I'm trying to disable the notifications and active checks much the same as I updated the program URL as shown above by updating the correct rows in a table. Please provide the table and row names the values are stored in. If you don't have the information, please go through your process of escalation or research the issue to provide a meaningful answer. Stopping the nagios service will cause an alert on the primary so it isn't a realistic solution.
Thanks
Thanks
Re: NXI 5.7.3 disable notifications and active service check
Since it does take a few seconds to actually apply the change maybe it isn't as simple as updating a table. If there isn't another way to do it, feel free to disallow my previous reply and close.
Re: NXI 5.7.3 disable notifications and active service check
The program responsible for sending the notifications is that running Nagios Core program, sometimes called the Monitoring Engine. The command to disable notifications has to be sent to the running instance of the program. Anything you do to the database won't affect whether Nagios Core disables notifications.
The curl API call I put above really is the simplest way to do this.
It's possible also to disable notifications using the Host Detail page under Advanced. This also sends the appropriate command to Nagios Core.
The curl API call I put above really is the simplest way to do this.
It's possible also to disable notifications using the Host Detail page under Advanced. This also sends the appropriate command to Nagios Core.
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.
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.