rcbops / chef-cookbooks

RCB OPS - Chef Cookbooks
Other
118 stars 102 forks source link

[openstack-monitoring] no-op for monitoring of rabbitmq-server by monit is incorrect #860

Open breu opened 10 years ago

breu commented 10 years ago

This was brought in with https://github.com/rcbops-cookbooks/openstack-monitoring/pull/31

https://github.com/claco/openstack-monitoring/blob/5cb9b0229b4f66e3f2424ff1a6d0cb99005cbc64/recipes/rabbitmq-server.rb#L25-L26

This actually drops down a config that looks like this:

# This file autogenerated by Chef
# Do not edit, changes will be overwritten
check process rabbitmq-server matching "/etc/rabbitmq/rabbitmq"
  start program = "/sbin/service rabbitmq-server /bin/true"
  stop program = "/sbin/service rabbitmq-server /bin/true"
  if 5 restarts within 5 cycles then timeout

If we wanted to make this a real no-op then we should just remove it like I originally had done in https://github.com/rcbops-cookbooks/openstack-monitoring/commit/bca20d1c87eb7ed7c0832bf809e6fb82e6f7330e

claco commented 10 years ago

@rackerjoe Removing it removes monitoring by monit entirely. The intent was the simply keep monit from performing any stop/start actions but still notifying of issues.

Aside from that, not sure why the config is bogons, since it's clearly not what's in the code calling the provider.

claco commented 10 years ago

Template issue: https://github.com/rcbops-cookbooks/monit/blob/master/templates/default/procmon.erb#L11

The command is append to the service name and service bin, which was unexpected.

Should just tweak this hole thing to enable/disable start/stop aside from the actual monitoring.

breu commented 10 years ago

changing this from start_cmd and stop_cmd to service_bin should do what you are trying to do. https://github.com/rcbops-cookbooks/openstack-monitoring/blob/master/recipes/rabbitmq-server.rb#L25-L26

claco commented 10 years ago

Hack. Have to set service_bin, unset start/stop_cmd and script_name. Probably best to just fix it for real to not even drop those two lines.