Page 1 of 1

has no service notification commands defined

Posted: Tue Oct 16, 2018 9:18 am
by Bitflogger
Hello, I'm running v5.5.3 64-bit VM CentOS7

I'm getting the contact "has no service notification commands defined" for two contacts.

There very much do have notification commands defined. I tried the solution from case 48589, no luck.

There are over a hundred contacts that do not cause the error, I cannot find a difference between the problem and non-problem contacts.

We heavily use inheritance, the contact template for the problem contacts is the same as non-problem contacts.

Re: has no service notification commands defined

Posted: Tue Oct 16, 2018 9:59 am
by Bitflogger
Hello,

I removed one of the problem contacts from its contact groups, then set the contact to NOT active.

The contact still comes up in the configuration error report!

Re: has no service notification commands defined

Posted: Tue Oct 16, 2018 10:05 am
by lmiltchev
Can you PM me (or anyone else on the Nagios Tech Support team) your latest profile? We need to review the configs of these contacts, and the commands, and templates in use.

Admin > System Profile > Download Profile

Re: has no service notification commands defined

Posted: Tue Oct 16, 2018 10:14 am
by Bitflogger
Hello,

I tried reconfigure_nagios.sh ,based on https://support.nagios.com/kb/article.php?id=532

I found an error due to a file in the import directory, for a host I has set to inactive.

I removed the file from the import directory, then it compiles. Please lock if no further questions.

This is a good trouble-shooting method.

[nagios@winston ~]$ cd /usr/local/nagiosxi/scripts
[nagios@winston scripts]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6


128.104.144.176 winston.doit.wisc.edu winston
[nagios@winston scripts]$ ./reconfigure_nagios.sh

--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/granato.doit.wisc.edu.cfg .. PHP Notice: Undefined index: host_name
in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
ERROR
Duplicate entry '1' for key 'config_name'Entry host_name:: inside tbl_host could not be inserted: Duplicate entry '1' for key 'config_name'<br>Entry host_name:: inside tbl_host could not be inserted: Duplicate entry '1' for key 'config_name'<br>
--------------------------------------

Importing into the CCM failed!
[nagios@winston scripts]$ ./reconfigure_nagios.sh

--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
No files to import
--------------------------------------

--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
Finished writing out configuraton
--------------------------------------

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.4.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-08-16
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'w_service_automatic_and_disabled' on host 'ofr02.doit.wisc.edu' (config file '/usr/local/nagios/etc/services/w_service_automatic_and_disabled_2012.cfg', starting on line 16)
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 15271 services.
Checked 901 hosts.
Checked 85 host groups.
Checked 6 service groups.
Warning: Contact 'tczerwon' has no service notification time period defined!
Warning: Contact 'tczerwon' has no host notification time period defined!
Checked 365 contacts.
Checked 422 contact groups.
Checked 250 commands.
Checked 103 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 901 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 103 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 2
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
> Return Code: 0
--------------------------------------
[nagios@winston scripts]$

Re: has no service notification commands defined

Posted: Tue Oct 16, 2018 10:32 am
by lmiltchev
I removed the file from the import directory, then it compiles. Please lock if no further questions.
I am glad your issue has been resolved! I am locking this topic.