Sensu, Chef and Vagrant

Hi,

From what I understand, I should use https://github.com/portertech/chef-monitor as a cookbook to install sensu server and client. However it is not entirely clear to me how I can define a sensu server and client configuration. To be more specific,

  1. how can I specify install handlers on the server?

  2. how can I define sensu-client check based on OS? (e.g. I want to check for A on Windows but a check for B on linux)

  3. Client needs to know the hostname or IP address of the sensu-server. In my situation I want to use sensu on a EC2 VPC. The IP/hostname of the sensu server can change over time. What is the best practice of specifying the sensu-server in client configuration?

Thanks, Tony

You will require a number of dependent cookbooks (sensu relies on uchiwa, redis, rabbitmq, erlang etc cookbooks), I just configured this recently and referenced chef-monitor but used my own monitor-server recipe and monitor-client recipe.

Use sensu-(provider) such as sensu-handler in the cookbook to define handlers, and you will also need to use sensu-community-plugins repo to add files more efficiently.

I use a dns entry in aws for the sensu server and have the dns entry migrate with the servers as they change.

Hope that provides some clairity…

···

On Tuesday, January 27, 2015 at 1:28:01 PM UTC-7, Anthony Kong wrote:

Hi,

From what I understand, I should use https://github.com/portertech/chef-monitor as a cookbook to install sensu server and client. However it is not entirely clear to me how I can define a sensu server and client configuration. To be more specific,

  1. how can I specify install handlers on the server?
  1. how can I define sensu-client check based on OS? (e.g. I want to check for A on Windows but a check for B on linux)
  1. Client needs to know the hostname or IP address of the sensu-server. In my situation I want to use sensu on a EC2 VPC. The IP/hostname of the sensu server can change over time. What is the best practice of specifying the sensu-server in client configuration?

Thanks, Tony

Thanks SH for the reply.

I wonder if there is any example out there? The sensu-chef is very bare bone and does not showcase how to set up handlers and checkers.

Cheers