alerts only run once, scheduler seems not to work
Re: alerts only run once, scheduler seems not to work
The nagios part just tells it to run as the nagios user. A couple things, what happens if you run su nagios and execute the jobs / poller? What is the output of ls -al /home/nagios?
Former Nagios Employee
Re: alerts only run once, scheduler seems not to work
/home/nagios does not exist! but the command seems to run ok:
Code: Select all
[root@logdev01 ~]#
[root@logdev01 ~]# su - nagios
su: warning: cannot change directory to /home/nagios: No such file or directory
-bash-4.2$ id nagios
uid=1003(nagios) gid=100(users) groups=100(users),48(apache),1003(nagios)
-bash-4.2$ /usr/bin/php /var/www/html/nagioslogserver/www/index.php poller
Updating Cluster Hosts File
Updating Elasticsearch with instance...
Updating Cluster Hosts File
Updating Elasticsearch with instance...
Updating Cluster Hosts File
Updating Elasticsearch with instance...
Updating Cluster Hosts File
Updating Elasticsearch with instance...
Finished Polling.
-bash-4.2$
Re: alerts only run once, scheduler seems not to work
Code: Select all
-bash-4.2$ /usr/bin/php /var/www/html/nagioslogserver/www/index.php jobs
Running command do_backups with args ' ' for job id: backups
SUCCESS
Running command run_alerts with args ' ' for job id: run_all_alerts
SUCCESS
Running command update_check with args ' ' for job id: run_update_check
SUCCESS
Running command cleanup with args ' ' for job id: cleanup_cmdsubsys
SUCCESS
Running command create_backup with args ' ' for job id: AVhwPr8GDX5HuAnvUwof
sh: /tmp/backups.log: Permission denied
SUCCESS
Running command run_alerts with args ' ' for job id: run_all_alerts
SUCCESS
Running command run_alerts with args ' ' for job id: run_all_alerts
SUCCESS
Processed 1 node jobs.
Processed 6 global jobs.
-bash-4.2$
Re: alerts only run once, scheduler seems not to work
Thanks a lot. It seems the missing hoemedir is the issue indeed.
Create diot and alerts seem to run fine now!
Code: Select all
[root@logdev01 log]# tail -100 /var/log/cron|head
Nov 17 07:48:01 logdev01 CROND[8982]: (CRON) ERROR chdir failed (/home/nagios): No such file or directory
Nov 17 07:49:01 logdev01 CROND[9036]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php poller > /usr/local/nagioslogserver/var/poller.log 2>&1)
Nov 17 07:49:01 logdev01 CROND[9036]: (CRON) ERROR chdir failed (/home/nagios): No such file or directory
Nov 17 07:49:01 logdev01 CROND[9037]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php jobs > /usr/local/nagioslogserver/var/jobs.log 2>&1)
Nov 17 07:49:01 logdev01 CROND[9037]: (CRON) ERROR chdir failed (/home/nagios): No such file or directory
Re: alerts only run once, scheduler seems not to work
Awesome! Is it alright if we close this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: alerts only run once, scheduler seems not to work
Yup. Appreciate the help.
Re: alerts only run once, scheduler seems not to work
Will do - I saw something similar happen last week, glad that was it.
/closed
/closed
Former Nagios Employee