What is the Sensu Stack? For a detailed explanation, read this webpage. The Sensu stack has multiple components, which generally consist of the following.
- Sensu Client – This is the agent that collects data. Like Telegraf, the Sensu Client can be installed on both Linux and Windows.
- Sensu Server – This is where the data from the client is processed and then pushed to the data layer.
- Sensu API – Allows access to data from tools
- RabbitMQ – This is the transport layer, responsibly for the communication between Client\Server.
- Redis – Data persistence layer.
- Uchiwa – Dashboard for viewing data
Below are some helpful notes for getting the Sensu stack components setup and running.
Helpful Links
- https://sensuapp.org/docs/0.27/installation/
- http://blog.powerupcloud.com/2017/01/21/sensu-grafana-step-by-step/
- http://blog.estl.moe/2016/08/16/pilot-your-infra-like-a-boss.html
Sensu Configuration Loading Sequence
- Review the Sensu configuration property loading cadence here.
Redis Configuration File
- /etc/redis.conf (Update this file to change host\port\etc….)
- Default IP and Port = 127.0.0.1:6379
RabbitMQ-Server Configuration File and Management UI
- /etc/rabbitmq/rabbitmq.config (Update this file to change host\port\etc….)
- Default IP and Port = 127.0.0.1:5672
- Managment console
- Default URL = http://server_name:15672
- Default Username and Password = guest\guest
Sensu Server Configuration Files
- /etc/sensu/config.json (Main configuration file – Files below are specific and get merged with main configuration file)
- /etc/sensu/conf.d/api.json (Sensu server address, API bind address\port)
- /etc/sensu/conf.d/client.json (Contains client name, address, and subscriptions)
- /etc/sensu/conf.d/rabbitmq.json (Contains the host\port for the rabbitmq server instance)
- /etc/sensu/conf.d/transport.json (Contains the transport solution)
- /etc/sensu/conf.d/redis.json (Contains the host\port for the redis instance)
Sensu Client Configuration Files
- /etc/sensu/conf.d/client.json (Contains client name, address, and subscriptions)
- /etc/sensu/conf.d/rabbitmq.json (Contains the host\port for the rabbitmq server instance)
Uchiwa Configuration Files
- /etc/sensu/uchiwa.json
General Log File Locations
- Sensu Server = /var/log/sensu
- Sensu Client = /var/log/sensu
- RabbitMQ = /var/log/rabbitmq
- Redis = /var/log/redis
- Uchiwa = /var/log
Service Start\Stop Commands
- service sensu-client start
- service sensu-server start
- service sensu-api start
- service uchiwa start
Testing the Stack
- If you are unable to access Uchiwa on port 3000, you may need to disable your firewall or at a minimum open port 3000
- sudo firewall-cmd –zone=public –add-port=3000/tcp –permanent
- You should be able to target the Uchiwa instance via http”\\<server_name>:3000
- Example: http://<server_name>:3000/#/clients
- If everything is linked together properly you will get a nice gui like this!