Unable to apply configuration: Invalid max_check_attempts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CrazyCat
Posts: 3
Joined: Wed Nov 07, 2018 5:41 am

Unable to apply configuration: Invalid max_check_attempts

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to apply configuration: Invalid max_check_attempt

Post 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
CrazyCat
Posts: 3
Joined: Wed Nov 07, 2018 5:41 am

Re: Unable to apply configuration: Invalid max_check_attempt

Post 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
CrazyCat
Posts: 3
Joined: Wed Nov 07, 2018 5:41 am

Re: Unable to apply configuration: Invalid max_check_attempt

Post by CrazyCat »

I deleted missing config files from inport directory - now all OK!
Thank You!!!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to apply configuration: Invalid max_check_attempt

Post by scottwilkerson »

CrazyCat wrote:I deleted missing config files from inport directory - now all OK!
Thank You!!!
Great! Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked