Apply Configuration Failure
Posted: Tue Apr 03, 2018 9:45 am
Hi Team,
When ever i am trying to run " apply configuration" button after any change it takes a long time and at the end will show an error message.
Currently i am doing the apply configuration manually.
I tried to verify any errors in the config files.
also i have doubt related to the file permissions as well.
I have restarted and also verified for db error as well.
please find my current file permissions
/usr/local/nagios
drwxrwxr-x 2 nagios nagios 4096 Apr 3 03:44 bin
drwsrwsr-x 7 apache nagios 4096 Apr 3 03:46 etc
drwxr-xr-x 2 root root 4096 May 16 2017 include
drwxrwsr-x 2 apache nagios 4096 Mar 29 05:45 libexec
drwxrwxr-x 2 nagios nagios 4096 May 16 2017 sbin
drwxrwxr-x 18 nagios nagios 4096 May 16 2017 share
drwxrwxr-x 6 nagios nagios 4096 Apr 3 07:25 var
/usr/local/nagiosxi
drwxr-xr-x 2 nagios nagios 4096 Jun 9 2017 cron
drwxr-xr-x 3 nagios nagios 4096 May 16 2017 etc
drwxr-xr-x 19 nagios nagios 4096 May 16 2017 html
drwxr-xr-x 3 nagios nagios 4096 May 16 2017 nom
drwxr-xr-x 2 nagios nagios 4096 Apr 3 04:14 scripts
drwsrwsr-x 2 apache nagios 4096 Feb 23 02:55 tmp
-rw-r----- 1 root root 16935 Oct 30 22:39 tmp_xi_vars.cfg
drwxr-xr-x 2 nagios nagios 4096 May 16 2017 tools
drwxr-xr-x 5 nagios nagios 4096 Apr 3 07:29 var
/usr/local/nagios/etc
-rw-r--r-- 1 nagios nagios 860 Dec 25 21:44 cgi.cfg
-rw-rw-r-- 1 nagios nagios 29745 Apr 3 06:39 commands.cfg
-rw-rw-r-- 1 nagios nagios 1566 Apr 3 06:39 contactgroups.cfg
-rw-rw-r-- 1 nagios nagios 6961 Apr 3 06:39 contacts.cfg
-rw-rw-r-- 1 nagios nagios 1675 Apr 3 06:39 contacttemplates.cfg
-rw-rw-r-- 1 nagios nagios 817 Apr 3 06:39 hostdependencies.cfg
-rw-rw-r-- 1 nagios nagios 819 Apr 3 06:39 hostescalations.cfg
-rw-rw-r-- 1 nagios nagios 837 Apr 3 06:39 hostextinfo.cfg
-rw-rw-r-- 1 nagios nagios 3266 Apr 3 06:39 hostgroups.cfg
drwsrwsr-x 2 apache nagios 12288 Apr 3 06:30 hosts
-rw-rw-r-- 1 nagios nagios 16082 Apr 3 06:39 hosttemplates.cfg
drwsrwsr-x 2 apache nagios 4096 Apr 3 06:30 import
-rwxrwxr-x 1 nagios nagios 5828 Apr 2 11:48 nagios.cfg
-rw-rw-r-- 1 nagios nagios 2229 May 16 2017 ndo2db.cfg
-rw-rw-r-- 1 nagios nagios 4827 May 16 2017 ndomod.cfg
-rw-rw-r-- 1 nagios nagios 8133 Sep 20 2017 nrpe.cfg
-rw-rw-r-- 1 nagios nagios 5345 May 16 2017 nsca.cfg
drwxrwsr-x 4 apache nagios 4096 Apr 2 23:48 pnp
-rw-rw-r-- 1 nagios nagios 0 May 24 2017 recurringdowntime.cfg
-rwxrwxr-x 1 nagios nagios 210 May 16 2017 resource.cfg
-rwxrwxr-x 1 nagios nagios 264 Sep 20 2017 rundeck.sh
-rw-rw-r-- 1 nagios nagios 1627 May 16 2017 send_nsca.cfg
-rw-rw-r-- 1 nagios nagios 823 Apr 3 06:39 servicedependencies.cfg
-rw-rw-r-- 1 nagios nagios 825 Apr 3 06:39 serviceescalations.cfg
-rw-rw-r-- 1 nagios nagios 843 Apr 3 06:39 serviceextinfo.cfg
-rw-rw-r-- 1 nagios nagios 18594 Apr 3 06:39 servicegroups.cfg
-rw-r--r-- 1 nagios nagios 813 Jul 21 2017 servicegroups.cfg.org
drwsrwsr-x 2 apache nagios 12288 Apr 3 06:39 services
-rw-rw-r-- 1 nagios nagios 24852 Apr 3 06:39 servicetemplates.cfg
drwsrwsr-x 2 apache nagios 4096 Mar 5 06:00 static
-rw-rw-r-- 1 nagios nagios 9123 Apr 3 06:39 timeperiods.cfg
-rw-rw---- 1 nagios nagios 50805 Mar 5 06:40 tmp_xi_vars.cfg
Any suggestions to start the troubleshooting.
I already did repair_databases
i tried to identify the error by runinng the nagios -v command and getting the similar error for any files (Line 16 (NULL value) )
[root@va10xxx bin]# nagios -v /usr/local/nagios/etc/contactgroups.cfg
Nagios Core 4.2.4
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/contactgroups.cfg' - Line 16 (NULL value)
Error processing main config file!
[root@vxxxx bin]# nagios -v /usr/local/nagios/etc/servicegroups.cfg
Nagios Core 4.2.4
Website: https://www.nagios.org
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/servicegroups.cfg' - Line 16 (NULL value)
Error processing main config file!
When ever i am trying to run " apply configuration" button after any change it takes a long time and at the end will show an error message.
Currently i am doing the apply configuration manually.
I tried to verify any errors in the config files.
also i have doubt related to the file permissions as well.
I have restarted and also verified for db error as well.
please find my current file permissions
/usr/local/nagios
drwxrwxr-x 2 nagios nagios 4096 Apr 3 03:44 bin
drwsrwsr-x 7 apache nagios 4096 Apr 3 03:46 etc
drwxr-xr-x 2 root root 4096 May 16 2017 include
drwxrwsr-x 2 apache nagios 4096 Mar 29 05:45 libexec
drwxrwxr-x 2 nagios nagios 4096 May 16 2017 sbin
drwxrwxr-x 18 nagios nagios 4096 May 16 2017 share
drwxrwxr-x 6 nagios nagios 4096 Apr 3 07:25 var
/usr/local/nagiosxi
drwxr-xr-x 2 nagios nagios 4096 Jun 9 2017 cron
drwxr-xr-x 3 nagios nagios 4096 May 16 2017 etc
drwxr-xr-x 19 nagios nagios 4096 May 16 2017 html
drwxr-xr-x 3 nagios nagios 4096 May 16 2017 nom
drwxr-xr-x 2 nagios nagios 4096 Apr 3 04:14 scripts
drwsrwsr-x 2 apache nagios 4096 Feb 23 02:55 tmp
-rw-r----- 1 root root 16935 Oct 30 22:39 tmp_xi_vars.cfg
drwxr-xr-x 2 nagios nagios 4096 May 16 2017 tools
drwxr-xr-x 5 nagios nagios 4096 Apr 3 07:29 var
/usr/local/nagios/etc
-rw-r--r-- 1 nagios nagios 860 Dec 25 21:44 cgi.cfg
-rw-rw-r-- 1 nagios nagios 29745 Apr 3 06:39 commands.cfg
-rw-rw-r-- 1 nagios nagios 1566 Apr 3 06:39 contactgroups.cfg
-rw-rw-r-- 1 nagios nagios 6961 Apr 3 06:39 contacts.cfg
-rw-rw-r-- 1 nagios nagios 1675 Apr 3 06:39 contacttemplates.cfg
-rw-rw-r-- 1 nagios nagios 817 Apr 3 06:39 hostdependencies.cfg
-rw-rw-r-- 1 nagios nagios 819 Apr 3 06:39 hostescalations.cfg
-rw-rw-r-- 1 nagios nagios 837 Apr 3 06:39 hostextinfo.cfg
-rw-rw-r-- 1 nagios nagios 3266 Apr 3 06:39 hostgroups.cfg
drwsrwsr-x 2 apache nagios 12288 Apr 3 06:30 hosts
-rw-rw-r-- 1 nagios nagios 16082 Apr 3 06:39 hosttemplates.cfg
drwsrwsr-x 2 apache nagios 4096 Apr 3 06:30 import
-rwxrwxr-x 1 nagios nagios 5828 Apr 2 11:48 nagios.cfg
-rw-rw-r-- 1 nagios nagios 2229 May 16 2017 ndo2db.cfg
-rw-rw-r-- 1 nagios nagios 4827 May 16 2017 ndomod.cfg
-rw-rw-r-- 1 nagios nagios 8133 Sep 20 2017 nrpe.cfg
-rw-rw-r-- 1 nagios nagios 5345 May 16 2017 nsca.cfg
drwxrwsr-x 4 apache nagios 4096 Apr 2 23:48 pnp
-rw-rw-r-- 1 nagios nagios 0 May 24 2017 recurringdowntime.cfg
-rwxrwxr-x 1 nagios nagios 210 May 16 2017 resource.cfg
-rwxrwxr-x 1 nagios nagios 264 Sep 20 2017 rundeck.sh
-rw-rw-r-- 1 nagios nagios 1627 May 16 2017 send_nsca.cfg
-rw-rw-r-- 1 nagios nagios 823 Apr 3 06:39 servicedependencies.cfg
-rw-rw-r-- 1 nagios nagios 825 Apr 3 06:39 serviceescalations.cfg
-rw-rw-r-- 1 nagios nagios 843 Apr 3 06:39 serviceextinfo.cfg
-rw-rw-r-- 1 nagios nagios 18594 Apr 3 06:39 servicegroups.cfg
-rw-r--r-- 1 nagios nagios 813 Jul 21 2017 servicegroups.cfg.org
drwsrwsr-x 2 apache nagios 12288 Apr 3 06:39 services
-rw-rw-r-- 1 nagios nagios 24852 Apr 3 06:39 servicetemplates.cfg
drwsrwsr-x 2 apache nagios 4096 Mar 5 06:00 static
-rw-rw-r-- 1 nagios nagios 9123 Apr 3 06:39 timeperiods.cfg
-rw-rw---- 1 nagios nagios 50805 Mar 5 06:40 tmp_xi_vars.cfg
Any suggestions to start the troubleshooting.
I already did repair_databases
i tried to identify the error by runinng the nagios -v command and getting the similar error for any files (Line 16 (NULL value) )
[root@va10xxx bin]# nagios -v /usr/local/nagios/etc/contactgroups.cfg
Nagios Core 4.2.4
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/contactgroups.cfg' - Line 16 (NULL value)
Error processing main config file!
[root@vxxxx bin]# nagios -v /usr/local/nagios/etc/servicegroups.cfg
Nagios Core 4.2.4
Website: https://www.nagios.org
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/servicegroups.cfg' - Line 16 (NULL value)
Error processing main config file!