Page 2 of 2
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Tue Oct 23, 2012 4:25 pm
by scottwilkerson
I have a feeling this could be caused by duplicate versions of a cronjob running in parrallel
Can you run the following
Not sure if we can catch it happening, but worth a try...
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Tue Oct 23, 2012 8:00 pm
by scobi
Code: Select all
# ps -ef |grep eventman
nagios 28838 28820 0 17:58 ? 00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios 28841 28828 0 17:58 ? 00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios 28853 28838 0 17:58 ? 00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
nagios 28856 28841 0 17:58 ? 00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
root 29173 29128 0 17:58 pts/4 00:00:00 grep eventman
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Wed Oct 24, 2012 7:09 am
by scottwilkerson
That is what I thought...
Can you post the following to see if we can track down why there are 2 of them running
Code: Select all
cat /etc/cron.d/nagiosxi
crontab -u nagios -l
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Wed Oct 24, 2012 3:49 pm
by scobi
Nice work Sherlock!
Code: Select all
cat /etc/cron.d/nagiosxi
# /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
crontab -u nagios -l
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php > /usr/local/nagiosxi/var/dbmaint.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
01 * * * * /usr/local/nagiosxi/cron/recurringdowntime.pl > /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Wed Oct 24, 2012 4:34 pm
by scottwilkerson
We have fixed this in the upgrade script, but to eliminate your problem I would remove the items from the nagios user crontab and keep the /etc/cron.d/nagiosxi file as this is what the system will expect.
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Wed Oct 24, 2012 7:41 pm
by scobi
Excellent! Minor issue but glad you found it!
Can I get a little more detail on what I need to do, which file and which lines to remove? I'm still Linux n00b (but with your help I'm getting better!)...
Thanks!
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Wed Oct 24, 2012 8:26 pm
by scottwilkerson
Sorry, you can run
Code: Select all
crontab -l -u nagios | grep -v /usr/local/nagiosxi/cron | crontab -u nagios -
Re: 2012R1.0 - Occasional duplicate notification...???
Posted: Thu Oct 25, 2012 9:43 am
by scobi
Thanks Scott, I appreciate the hand holding and expertise!
