Alerting and Monitoring with Sensu part 2

This is the second blog post about Sensu as an Alerting and Monitoring solution. If you did not read the first part I recommend you check it out here.

For this blog post, I will share a Vagrantfile so you have run sensu in your machine easily.  To play with Sensu you need to have some components like:
 * A sensu Client
 * A sensu Server
 * RabbitMQ
 * Uchiwa for Sensu Server

TLDR;  Check it out all file in my GitHub account.


This is the client configuration in Sensu. You should have one of this files per client. Most of time people do scripts to generate this file dynamically because often you just change the hostname and channels per client. 


This config is how sensu client communicates with the server. Via RabbitMQ sending and receiving messages in a pub/sub-arch model.


This is the Uchiwa(Sensu Server Dashboard) configuration. You can have one instance for all your datacenters if you like. This goes with the sensu-server box.

This is the bash script file used by vagrant to provision sensu client box.

This is the bash script file used by vagrant to provision sensu server box.


This is the Vagrantfile itself which uses other previous files. As you see there is an array with the configs so we can use them in the main vagrant construct instead of duplication code. 

Once you download all files you can place all the files in the same directory, run:

$ vagrant up
$ vagrant ssh sensu-server
$ vagrant ssh sensu-client

Go to Have Fun.

PS: If you have issues, do this:

vagrant ssh sensu-server
sudo /etc/init.d/sensu-server restart
sudo /etc/init.d/uchiwa restart

Diego Pacheco

Popular posts from this blog

Kafka Streams with Java 15

Rust and Java Interoperability

HMAC in Java