Hello,
This question is related to the following article:
https://support.nagios.com/forum/viewto ... 16&t=44399
When I run the query to see what hosts have notifications disabled I see a handful. When I go in XI UI I manually enable notifications for the host that have notifications disabled. All is good.
However when I run the query:
echo 'select host_name from tbl_host where notifications_enabled=0\G;' | mysql -uroot -pnagiosxi nagiosql
These hosts that were just enabled still show up in the query as still being disabled....
echo 'select host_name from tbl_host where notifications_enabled=0\G;' | mysql -uroot -pnagiosxi nagiosql (I still get same hosts disabled, any idea why?)
Brdr
Show Disabled Notifications Hosts and Services
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Show Disabled Notifications Hosts and Services
This is because what you are querying in the database is the config value. However there is also a runtime value that takes precedence over the config value.
Re: Show Disabled Notifications Hosts and Services
Hi Scott, thanks for the reply.
Is there a way to force runtime to be the config value? Or, another option to see present value after I have renabled the hosts and services that were previously disabled?
Is there a way to force runtime to be the config value? Or, another option to see present value after I have renabled the hosts and services that were previously disabled?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Show Disabled Notifications Hosts and Services
nobrdr wrote:Is there a way to force runtime to be the config value?
You can see the runtime values on the Status Detail Page -> Advanced Tab -> "Service Attributes" or "Host Attributes"brdr wrote:Or, another option to see present value after I have renabled the hosts and services that were previously disabled?
Re: Show Disabled Notifications Hosts and Services
okie. Let me ask the question a different way:
We have 2000+ plus hosts, and 20,000+ services across our prod/non-prod XI instances. Within this domain roughly 80 users. These users schedule downtime, and acknowledge alerts. Occasionally, they will disable notifications for hosts/services; sometimes by design, sometimes by accident.
As a Nagios administrator how can I query Nagios system to find out hosts/services that have notifications disabled?
Thx
We have 2000+ plus hosts, and 20,000+ services across our prod/non-prod XI instances. Within this domain roughly 80 users. These users schedule downtime, and acknowledge alerts. Occasionally, they will disable notifications for hosts/services; sometimes by design, sometimes by accident.
As a Nagios administrator how can I query Nagios system to find out hosts/services that have notifications disabled?
Thx
Re: Show Disabled Notifications Hosts and Services
The current running status for hosts and services are stored in the nagios database.
The status of the hosts are in the nagios_hoststatus table and services are in the nagios_servicestatus table.
I think the query you have ran before would work but the database and tables would have to be adjusted.
Then the output of that command would have to be linked to the nagios_hosts table in the nagios database.
The status of the hosts are in the nagios_hoststatus table and services are in the nagios_servicestatus table.
I think the query you have ran before would work but the database and tables would have to be adjusted.
Code: Select all
echo 'select host_object_id from nagios_hoststatus where notifications_enabled=0;' | mysql -uroot -pnagiosxi nagios Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Show Disabled Notifications Hosts and Services
That works. As always, thanks tgriep!
Please close.
Please close.