Hi
We have enabled Notifications for all the services in a service group through Service group links provided in Service Summary. The notifications are flowing as expected. But the particular services, in CCM, are not showing them as "Notifications Enabled". Is this as expected or we need to any more for this to get reflected in CCM ?
Thank you.
External commands changes not reflecting in Nagios xi
-
- Posts: 18
- Joined: Mon Jun 04, 2018 7:58 am
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: External commands changes not reflecting in Nagios xi
It is expected.
The changes to the notifications/etc through the hostgroup/servicegroup commands (or through external commands) will only modify the runtime settings and are by default preserved across apply configs/nagios service restarts. If you want them reflected in the CCM you would need to make the changes in the CCM.
Please note that the runtime settings override the CCM settings if you make changes to them so it's always good to check the + (advanced) tab when viewing the host/service if you are having issues to see if the runtime settings have been modified.
- NOTE: That is also the case for Admin > Monitoring Engine Status changes and the associated /usr/local/nagios/etc/nagios.cfg settings
Thank you!
The changes to the notifications/etc through the hostgroup/servicegroup commands (or through external commands) will only modify the runtime settings and are by default preserved across apply configs/nagios service restarts. If you want them reflected in the CCM you would need to make the changes in the CCM.
Please note that the runtime settings override the CCM settings if you make changes to them so it's always good to check the + (advanced) tab when viewing the host/service if you are having issues to see if the runtime settings have been modified.
- NOTE: That is also the case for Admin > Monitoring Engine Status changes and the associated /usr/local/nagios/etc/nagios.cfg settings
Thank you!
-
- Posts: 18
- Joined: Mon Jun 04, 2018 7:58 am
Re: External commands changes not reflecting in Nagios xi
Hi
Is there a way to generate a report that can be generated with runtime settings, to get a list of all so that we can compare with that in CCM ?
Thank you.
Is there a way to generate a report that can be generated with runtime settings, to get a list of all so that we can compare with that in CCM ?
Thank you.
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: External commands changes not reflecting in Nagios xi
There isn't currently a report for it, you would need to look in your /usr/local/nagios/var/status.dat file or use the API to see them:
I have submitted a feature-request to development on your behalf with a link back to this post:
Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.
Thank you!
Code: Select all
http://YOURxiSERVER/nagiosxi/help/api-object-reference.php#objects-hoststatus
http://YOURxiSERVER/nagiosxi/help/api-object-reference.php#objects-servicestatus
http://YOURxiSERVER/nagiosxi/help/api-system-reference.php#system-status
Code: Select all
FR: xi - Add report to show running configuration settings for hosts/services/programstatus/etc and what they are in the nagios.cfg/configs and the ability to only show ones with differences from the configs
Thank you!
-
- Posts: 18
- Joined: Mon Jun 04, 2018 7:58 am
Re: External commands changes not reflecting in Nagios xi
Hi
"the ability to only show ones with differences from the configs"
Can we get this info from DB ?
We do have a script currently getting the below details from status.dat
host_name,service_description,check_interval,warning_threshold,critical_threshold,units_of_measure,notifications_enabled,check_command
Thank you.
"the ability to only show ones with differences from the configs"
Can we get this info from DB ?
We do have a script currently getting the below details from status.dat
host_name,service_description,check_interval,warning_threshold,critical_threshold,units_of_measure,notifications_enabled,check_command
Thank you.
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: External commands changes not reflecting in Nagios xi
You could probably get it from the databases but nothing is currently written to do it, I'll take a look and update shortly.
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: External commands changes not reflecting in Nagios xi
These should get you started:
Config vs Runtime settings for notifications_enabled for Hosts:
Config vs Runtime settings for notifications_enabled for Services:
The nagios.cfg settings are not stored in the database so I'm unable to compare those for the program status.
Config vs Runtime settings for notifications_enabled for Hosts:
Code: Select all
mysql -uroot -pnagiosxi nagios -e "SELECT nagios_objects.name1 AS HOST, 'notifications_enabled' AS ITEM, nagios_hosts.notifications_enabled AS CONFIG, nagios_hoststatus.notifications_enabled AS RUNTIME FROM nagios_objects LEFT JOIN nagios_hosts ON nagios_hosts.host_object_id = nagios_objects.object_id LEFT JOIN nagios_hoststatus on nagios_hoststatus.host_object_id = nagios_objects.object_id WHERE nagios_objects.is_active = 1 AND nagios_objects.objecttype_id = 1;"
Code: Select all
mysql -uroot -pnagiosxi nagios -e "SELECT nagios_objects.name1 AS HOST, nagios_objects.name2 AS SERVICE, 'notifications_enabled' AS ITEM, nagios_services.notifications_enabled AS CONFIG, nagios_servicestatus.notifications_enabled AS RUNTIME FROM nagios_objects LEFT JOIN nagios_services ON nagios_services.service_object_id = nagios_objects.object_id LEFT JOIN nagios_servicestatus on nagios_servicestatus.service_object_id = nagios_objects.object_id WHERE nagios_objects.is_active = 1 AND nagios_objects.objecttype_id = 2;"
-
- Posts: 18
- Joined: Mon Jun 04, 2018 7:58 am
Re: External commands changes not reflecting in Nagios xi
Hi
Thank you so much for all your support.
Will check using the shared query and get back to you.
Thank you.
Thank you so much for all your support.
Will check using the shared query and get back to you.
Thank you.
-
- Posts: 18
- Joined: Mon Jun 04, 2018 7:58 am
Re: External commands changes not reflecting in Nagios xi
Hi
Thank you for the SQL. It helped in getting the differences between the runtime and those displayed in CCM.
Please mark this as closed.
Thank you.
Thank you for the SQL. It helped in getting the differences between the runtime and those displayed in CCM.
Please mark this as closed.
Thank you.