sensu / sensu-admin

An admin webui for Sensu
MIT License
86 stars 50 forks source link

Cron jobs depend on Ruby, but it is not installed in a recipe #91

Open carmstrong opened 11 years ago

carmstrong commented 11 years ago

On my machine running a base Chef role and sensu, sensu-dashboard, and sensu-admin, the cronjobs for sensu-admin fail:

carmstrong@monitoring:/var/log$ sudo -u sensu-admin crontab -l     Begin Whenever generated tasks for: /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26/config/schedule.rb 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '\''Downtime.process_downtimes'\'''

0,20,40 * * * * /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '\''Stash.clear_expired_stashes'\'''

End Whenever generated tasks for: /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26/config/schedule.rb

carmstrong@monitoring:/var/log$ sudo -u sensu-admin /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '\''Downtime.process_downtimes'\''' /usr/bin/env: ruby: No such file or directory

carmstrong@monitoring:/var/log$ sudo -u sensu-admin /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '\''Stash.clear_expired_stashes'\''' /usr/bin/env: ruby: No such file or directory

I'm willing to fix this by having the cookbook depend on ruby and then include it in default.rb, but I wanted to make sure that was the preferred method first.

joshpasqualetto commented 10 years ago

Hi @carmstrong

We are working on a finalized version of sensu admin being omnibus'd, so I think you can probably forgo doing the change right now but yes, that would be a good solution in the interim.