Page 1 of 2

Error Message after applying a configchange

Posted: Thu Feb 06, 2014 6:39 am
by sikainfo
Dear supporters,

since i have updated the installation to Nagios XI 2012R2.8c, i see following problem.

After a configchange in CCM (eg. deleting a host) the "Apply Configuration" command does not succeed.
Looking for the config snapshot there's no one.
doing a verify config, no problem, no errors.
running write config and restart everything looks good.

Look for me some entries in the cfg files are not removed correctly and / or there are some old hosts-, service-cofig files around.

do you have any hints to get this running again the normal way, because i do not want to cleanup every time after a small change the files and th worst thing ist there are no sanpshots where i can find the problem which occurs.

THX

Andy

Re: Error Message after applying a configchange

Posted: Thu Feb 06, 2014 9:35 am
by sikainfo
for your info i found out that the file hosttemplate.cfg is getting empty when applying a configuration, thats the reason why the verify crashes !

Re: Error Message after applying a configchange

Posted: Thu Feb 06, 2014 9:39 am
by BanditBBS
You mention doing a write config and then restart works. Did you actually do a verify after doing the write config? If so, that verify passes?

Re: Error Message after applying a configchange

Posted: Thu Feb 06, 2014 12:00 pm
by lmiltchev
@sikainfo
BanditBBS is correct. You need to write configs before verifying. Are you getting any config errors, when you do this?

Re: Error Message after applying a configchange

Posted: Fri Feb 07, 2014 5:41 am
by sikainfo
Okay, I try to describe to way I do and the result step by step:

1. change (e.g. Threshold for diskcheck from W: 20% to W:10%) Parameter and save
2. click "Apply Configuration" getting after a while following Error:
2014-02-07 11-09-44_Nagios XI.png
3. checking the snapshot there is no snapshot
4. going to "ccm-Tools-Write config file" and clicking on write ... after a while screen comes back empty !
5. going to "ccm-Tools-Write config file" and clicking on verify ... everything looks fine !
6. clicking on restart
7. have a look on the check changes have been applied.

First: why does the "Apply Configuration" crash !!!
Second: Why is there no Snapshot !!!!
Third: why is there no message after step 4 ???
Forth: why sometimes the config files ( till now i found that two times: hosttemplates.cfg and servicetemplates.cfg) are getting size 0 !!!!! I could restore them.

I will be not reachable for the next week, I just told my peoples here not to change anything during this time.
It wold be nice if you could help me out here when I'll be back.

This is behavior is not so nice because no other (eg: Windows people) can change anymore things here and everything has to be made by hand.
Restoring and going back to pre-update is no option, we had to many config changes since then.

THX in advance

Andy

Re: Error Message after applying a configchange

Posted: Fri Feb 07, 2014 1:28 pm
by sreinhardt
I am thinking this might be a permissions issue. Could you respond with the output from:

Code: Select all

ll -lvad /usr/local/nagios/etc/
ll -lvad /usr/local/nagios/etc/hosts/
ll -lvad /usr/local/nagios/etc/services/
ll -lva /usr/local/nagios/etc/

Re: Error Message after applying a configchange

Posted: Tue Feb 18, 2014 2:38 am
by sikainfo
Sorry that this took so long I was in a Training last week ....

below you find the desired output:

Code: Select all

-bash-4.1#     ll -lvad /usr/local/nagios/etc/
drwsrwsr-x 9 apache nagios 4096 Feb 17 08:56 /usr/local/nagios/etc/
-bash-4.1#     ll -lvad /usr/local/nagios/etc/hosts/
drwsrwsr-x 2 apache nagios 32768 Feb 17 08:49 /usr/local/nagios/etc/hosts/
-bash-4.1#     ll -lvad /usr/local/nagios/etc/services/
drwsrwsr-x 2 apache nagios 28672 Feb 17 09:01 /usr/local/nagios/etc/services/
-bash-4.1#     ll -lva /usr/local/nagios/etc/
total 440
drwsrwsr-x 9 apache nagios  4096 Feb 17 08:56 .
drwxr-xr-x 9 root   root    4096 Oct 15 16:26 ..
drwxrwS--- 3 apache nagios  4096 Apr 11  2012 .fr-28HQke
-rw-rw-r-- 1 apache nagios  6952 Apr  4  2012 background.pdf
-rw-rw-r-- 1 apache nagios  2681 Feb  4 08:54 cgi.cfg
-rw-rw-r-- 1 apache nagios   755 Apr  4  2012 check_nwstat.cfg-sample
-rw-rw-r-- 1 apache nagios 37858 Feb  6 16:11 commands.cfg
-rw-rw-r-- 1 apache nagios  3417 Apr  4  2012 config.php
-rw-rw-r-- 1 apache nagios  4058 Feb  6 16:11 contactgroups.cfg
-rw-rw-r-- 1 apache nagios 18012 Feb  6 16:11 contacts.cfg
-rw-rw-r-- 1 apache nagios  1730 Feb  6 16:11 contacttemplates.cfg
lrwxrwxrwx 1 apache nagios    34 Feb  5 16:14 dom_commands.cfg -> /usr/local/domino/dom_commands.cfg
lrwxrwxrwx 1 apache nagios    32 Feb  5 16:14 dom_config.cfg -> /usr/local/domino/dom_config.cfg
lrwxrwxrwx 1 apache nagios    31 Feb  5 16:14 dom_hosts.cfg -> /usr/local/domino/dom_hosts.cfg
lrwxrwxrwx 1 apache nagios    34 Feb  5 16:14 dom_services.cfg -> /usr/local/domino/dom_services.cfg
-rw-rw-r-- 1 apache nagios   642 Feb  6 16:11 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios   644 Feb  6 16:11 hostescalations.cfg
-rw-rw-r-- 1 apache nagios   662 Feb  6 16:11 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios 11596 Feb 17 08:56 hostgroups.cfg
drwsrwsr-x 2 apache nagios 32768 Feb 17 08:49 hosts
-rw-rw-r-- 1 apache nagios 30314 Feb 17 08:54 hosttemplates.cfg
drwsrwsr-x 2 apache nagios  4096 Feb 11 10:08 import
-rw-rw-r-- 1 apache nagios  3072 Apr 10  2012 localhost.cfg
-rwxrwxr-x 1 apache nagios  6211 Jan 29 12:41 nagios.cfg
-rwxrwxr-x 1 apache nagios  6048 Oct 16 11:22 nagios.cfg-sav
-rwxrwxr-x 1 apache nagios  2229 Apr  4  2012 ndo2db.cfg
-rwxrwxr-x 1 apache nagios  4729 Jan 22  2013 ndomod.cfg
-rw-rw-r-- 1 apache nagios  3090 Apr  4  2012 npcd.cfg
-rw-rw-r-- 1 apache nagios  4127 Apr  4  2012 npcd.cfg-sample
-rw-rw-r-- 1 apache nagios  9267 Jul 23  2013 nrpe.cfg
-rw-rw-r-- 1 apache nagios  9169 May 14  2012 nrpe.cfg.org
-rw-rw-r-- 1 apache nagios  2158 May 14  2012 nrpe.cfg_core
-rw-rw-r-- 1 apache nagios  1708 May 14  2012 nrpe_cmd.cfg
-rw-rw-r-- 1 apache nagios   734 May 14  2012 nrpe_disks.cfg
-rwxrwxr-x 1 apache nagios  5356 Oct 15  2012 nsca.cfg
drwxrwsr-x 4 apache nagios  4096 Feb  5 16:14 pnp
-rw-rw-r-- 1 apache nagios    63 Apr  4  2012 pnp4nagios_release
-rw-rw-r-- 1 apache nagios   793 Apr  4  2012 process_perfdata.cfg
-rw-rw-r-- 1 apache nagios   793 Apr  4  2012 process_perfdata.cfg-sample
-rw-rw-r-- 1 apache nagios     0 Apr 18  2012 recurringdowntime.cfg
-rwxrwxr-x 1 apache nagios   842 Jan 10  2013 resource.cfg
-rw-rw-r-- 1 apache nagios   524 Apr  4  2012 rra.cfg
-rw-rw-r-- 1 apache nagios   524 Apr  4  2012 rra.cfg-sample
-rwxrwxr-x 1 apache nagios  1627 Apr  4  2012 send_nsca.cfg
-rw-rw-r-- 1 apache nagios   648 Feb  6 16:11 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios   650 Feb  6 16:11 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios   668 Feb  6 16:11 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios  5204 Feb 11 10:09 servicegroups.cfg
drwsrwsr-x 2 apache nagios 28672 Feb 17 09:01 services
-rw-rw-r-- 1 apache nagios 53980 Feb  6 16:11 servicetemplates.cfg
drwsrwsr-x 2 apache nagios  4096 Feb  5 16:14 static
drwxrwsr-x 2 apache nagios  4096 Feb  6 15:48 templatessave
-rw-rw-r-- 1 apache nagios  3474 Feb  6 16:11 timeperiods.cfg
-rw-rw-r-- 1 apache nagios   324 Apr  4  2012 web_traffic.cfg-sample
-rwxrwxr-x 1 apache nagios  1162 Apr  4  2012 xiobjects.cfg
-rwxrwxr-x 1 apache nagios  4002 Apr  4  2012 xitemplates.cfg
-rwxrwxr-x 1 apache nagios     0 Apr  4  2012 xitest.cfg
Regards

Andy

Re: Error Message after applying a configchange

Posted: Tue Feb 18, 2014 11:08 am
by lmiltchev
The permissions look fine... Let's try the following - run the following commands:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh &> reconfig.txt
Then also run the following command to begin capturing log output:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> cmd.txt
Attempt to Apply Configuration from the web interface. After the browser has returned some output to the screen, press Ctrl+C to stop the log tail, and upload the cmd.txt file and the reconfig.txt that was generated by the above instructions.

Re: Error Message after applying a configchange

Posted: Wed Feb 19, 2014 3:37 am
by sikainfo
Hi there,
attached you'll find the outputfiles of the mentioned commands.

Small question besides of that my actual Version is Nagios XI 2012R2.8c, should I update or do we try to fix first the problem.

Regards

Andy

Re: Error Message after applying a configchange

Posted: Wed Feb 19, 2014 11:46 am
by abrist
Lets check the db logs to make sure you do not have any crashed tables:

Code: Select all

tail -25 /var/log/mysqld.log