Page 1 of 1

Unable to apply configuration: Invalid max_check_attempts

Posted: Thu Nov 15, 2018 1:56 am
by CrazyCat
Good day!

Unable apply configuration:

Error: Invalid max_check_attempts value for host 'xxxx'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/xxxx.cfg', starting on line 16)

Host xxxx deleted previosly, cfg file absent.
Delete files/Write config from Config File Management do not solve problem.
Verify files show all OK, without any errors.

Re: Unable to apply configuration: Invalid max_check_attempt

Posted: Thu Nov 15, 2018 3:46 pm
by ssax
I know you already did the first part but please do it again so that it's clean when running the apply config.

Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Then run this tail command (and leave it running):

Code: Select all

tail -F /usr/local/nagiosxi/var/cmdsubsys.log
Then try to apply configuration and send us the full output from the tail command above after it fails.

Thank you

Re: Unable to apply configuration: Invalid max_check_attempt

Posted: Fri Nov 16, 2018 1:28 am
by CrazyCat

Code: Select all

PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
No entry for terminal type "unknown";
using dumb terminal settings.

--- 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
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
  - Importing: /usr/local/nagios/etc/import/cmowsccm4.cfg .. 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>
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
  - Importing: /usr/local/nagios/etc/import/cmowsccm5.cfg .. 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!
OUTPUT=Importing into the CCM failed!
RETURNCODE=2
PROCESSING COMMAND ID 29803...
PROCESS COMMAND: CMD=1150, DATA=remove
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall 
CMD: syncall
MSG: Unable to match string in config file.BPI configuration applied successfully! Unable to match string in config file.BPI configuration applied successfully!
OUTPUT=MSG: Unable to match string in config file.BPI configuration applied successfully! Unable to match string in config file.BPI configuration applied successfully!
RETURNCODE=2

Re: Unable to apply configuration: Invalid max_check_attempt

Posted: Fri Nov 16, 2018 1:31 am
by CrazyCat
I deleted missing config files from inport directory - now all OK!
Thank You!!!

Re: Unable to apply configuration: Invalid max_check_attempt

Posted: Fri Nov 16, 2018 8:05 am
by scottwilkerson
CrazyCat wrote:I deleted missing config files from inport directory - now all OK!
Thank You!!!
Great! Locking thread