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.
client-config.json
sensu-client.json
PS: If you have issues, do this:
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.
client-config.json
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.
sensu-client.json
This config is how sensu client communicates with the server. Via RabbitMQ sending and receiving messages in a pub/sub-arch model.
uchiwa-config.json
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.
provision.client.sh
This is the bash script file used by vagrant to provision sensu client box.
provision-server.sh
This is the bash script file used by vagrant to provision sensu server box.
vagrantfile
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 http://10.10.99.60:3000/ 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
Cheers,
Diego Pacheco