2012 R1.6 : apply configuration doesn't work
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: 2012 R1.6 : apply configuration doesn't work
Hi,
I've got several files named cmdsubsys
cmdsubsys.log
cmdsubsys.log.1
cmdsubsys.log.2
cmdsubsys.log.3
cmdsubsys.log.4
I run "Apply configuration"
vi of first file : empty file
Other files :
...........................................................
PROCESSED 0 COMMANDS
I've got several files named cmdsubsys
cmdsubsys.log
cmdsubsys.log.1
cmdsubsys.log.2
cmdsubsys.log.3
cmdsubsys.log.4
I run "Apply configuration"
vi of first file : empty file
Other files :
...........................................................
PROCESSED 0 COMMANDS
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: 2012 R1.6 : apply configuration doesn't work
Lets see if these files are empty, run the following:
Keep in mind we asked to see the tail of the files, not what they show when opened in an editor, these can provide different results 
Code: Select all
ls -la /usr/local/nagiosxi/var/ | grep subsys-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: 2012 R1.6 : apply configuration doesn't work
Here it's
Code: Select all
-rw-r--r-- 1 nagios nagios 0 Mar 11 17:13 cmdsubsys.log
-rw-r--r-- 1 nagios nagios 82 Feb 24 04:03 cmdsubsys.log.1
-rw-r--r-- 1 nagios nagios 82 Feb 17 04:03 cmdsubsys.log.2
-rw-r--r-- 1 nagios nagios 81 Feb 10 04:03 cmdsubsys.log.3
-rw-r--r-- 1 nagios nagios 82 Feb 3 04:03 cmdsubsys.log.4
Re: 2012 R1.6 : apply configuration doesn't work
Is crond running? Do a running tail on /var/log/cron and then try killing all cron instances and restart it. Send the tail back.
Code: Select all
tail -f /var/log/cron
service crond stop
ps -aef | grep crond
killall crond
service crond startFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: 2012 R1.6 : apply configuration doesn't work
Do a running tail on /var/log/cron Send the tail back.
and then try killing all cron instances and restart it.
=> How can I do to kill all cron instances ?
Code: Select all
[root@nagiosxi var]# tail -f /var/log/cron
Mar 11 18:16:01 nagiosxi crond[3328]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1)
Mar 11 18:16:01 nagiosxi crond[3329]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1)
Mar 11 18:16:01 nagiosxi crond[3332]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1)
Mar 11 18:16:01 nagiosxi crond[3334]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Mar 11 18:16:01 nagiosxi crond[3336]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1)
Mar 11 18:16:01 nagiosxi crond[3337]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1)
Mar 11 18:16:01 nagiosxi crond[3338]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Mar 11 18:16:02 nagiosxi crond[3346]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1)
Mar 11 18:16:02 nagiosxi crond[3348]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/cmdsubsys.php > /usr/local/nagiosfusion/var/cmdsubsys.log 2>&1)
Mar 11 18:16:02 nagiosxi crond[3356]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/eventman.php > /usr/local/nagiosfusion/var/eventman.log 2>&1)
=> How can I do to kill all cron instances ?
Code: Select all
[root@nagiosxi var]# killall crond
crond: no process killed
Re: 2012 R1.6 : apply configuration doesn't work
If you stopped the crond service and the "killall" command "reports no process killed", this means that crond was functioning normally (no orphaned procs or multiple crond parent instances). Remember to restart crond:
After the crond restart, are things functioning normally?
Code: Select all
service crond startFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: 2012 R1.6 : apply configuration doesn't work
Unfortunately not
Aditional information : System status show many components off since the upgrade (see the attached file).
And when trying to restart nagios :
Rgds
Aditional information : System status show many components off since the upgrade (see the attached file).
And when trying to restart nagios :
Code: Select all
> service nagios restart
Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.
You do not have the required permissions to view the files attached to this post.
Re: 2012 R1.6 : apply configuration doesn't work
Can you post the contents of the following file?
/etc/cron.d/nagiosxi
And also run
/etc/cron.d/nagiosxi
And also run
Code: Select all
chown nagios.nagios /usr/local/nagiosxi/var/*.log
service crond restart-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: 2012 R1.6 : apply configuration doesn't work
Code: Select all
# /etc/cron.d/nagiosxi: crontab fragment for nagiosxi
# Backup MySQL & PostgreSQL Databases
0 7 * * * root /root/scripts/automysqlbackup
0 8 * * * root /root/scripts/autopostgresqlbackup
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php > /usr/local/nagiosxi/var/dbmaint.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
01 * * * * nagios /usr/local/nagiosxi/cron/recurringdowntime.pl > /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php > /usr/local/nagiosxi/var/deadpool.log 2>&1
Code: Select all
chown nagios.nagios /usr/local/nagiosxi/var/*.log
service crond restart
Re: 2012 R1.6 : apply configuration doesn't work
Can you post the output from the following command:
Code: Select all
su nagios -c '/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php'