sensu / sensu-chef

Sensu Chef cookbook.
https://supermarket.chef.io/cookbooks/sensu
Apache License 2.0
221 stars 280 forks source link

Enable using Redis as the transport layer #489

Closed tmonk42 closed 8 years ago

tmonk42 commented 8 years ago

Currently this cookbook only supports configuring for RabbitMQ as the transport layer. The cookbook should also support Redis.

https://sensuapp.org/docs/latest/reference/transport.html#the-redis-transport

Expected Behavior

By setting attributes, you should be able to install/configure either RabbitMQ or Redis as the transport layer for Sensu.

Current Behavior

RabbitMQ is the only option for transport.

Context

It would be great to have Redis as an option when building Sensu via Chef. In order to do testing with that today, I have to install and configure server and clients by hand :-P

runningman84 commented 8 years ago

this is already possible with the current cookbook, you can check my wrapper cookbook which spupports rabbitmq, redis and snssqs: https://github.com/runningman84/chef-monitor

cwjohnston commented 8 years ago

Hi @tmonk42, thanks for opening this issue. As mentioned abve, this is already possible using the cookbook's existing facilities, e.g. using combination of the node["sensu"]["transport"]["name"] attribute and the sensu_snippet resource to override the default "rabbitmq" transport name and provide the appropriate transport configuration in the snippet.

Because RabbitMQ is the only transport recommended for production use with Sensu, I think it's unlikely that we'll be adding attributes for configuring other transports, but the above strategy of using a wrapper cookbook for overriding transport name and providing a json config snippet should remain viable.