Page 1 of 1

I can't clone a host/service

Posted: Thu Jan 18, 2018 10:31 pm
by jtintegration
I usually able to clone a host/service but no longer able to. The error message does not tell me much. Please let me know how to fix, enclosed is a screenshot.

thanx

Re: I can't clone a host/service

Posted: Fri Jan 19, 2018 1:35 pm
by npolovenko
@jtintegration, You probably have other errors in your current configs. I'd recommend reverting to a good configuration snapshot.
You could also run the following command to check the current configs for errors:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Also, if you click on the "View Output" icon next to the failed config snapshot you will see more specific onformation on why it failed.
Untitled.png

Re: I can't clone a host/service

Posted: Mon Jan 22, 2018 2:25 pm
by jtintegration
Here is the config log for one of the failed event:

Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 490 services.
Checked 259 hosts.
Checked 1 host groups.
Checked 0 service groups.
Error: Contact 'test' has no service notification commands defined!
Error: Contact 'test' has no host notification commands defined!
Checked 4 contacts.
Checked 2 contact groups.
Checked 124 commands.
Checked 9 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 259 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 9 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 2

***> One or more problems was encountered while running the pre-flight check...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

Re: I can't clone a host/service

Posted: Mon Jan 22, 2018 5:15 pm
by npolovenko
@jtintegration, I see that you have 2 errors in your configs.

Code: Select all

Error: Contact 'test' has no service notification commands defined!
Error: Contact 'test' has no host notification commands defined!
To fix that please navigate to the Core Configurations Manager, then click on contacts in the left column. Find the 'test' contact in the list and open it. Open the tab that says "Alert Settings". In Manage Host Notification Commands select xi_host_notification_handler, and in Manage Service Notification Commands select xi_service_notifications_handler. Save the config. And then Apply Configuration.