NOTE: This is an excerpt from an upcoming rewrite of the Sensu installation guide, so some references may be made to documentation contents that don't currently exist, but they are coming soonicorn.com.
Although Sensu’s architecture is one of its most compelling features, and the installation guide can help you get Sensu installed in a variety of configurations in any operating environment, you might not actually care about any of that until you can get Sensu up and running in a testing and/or development environment and try it out. This installation guide is intended to help you install Sensu in 5 minutes or less, or we'll give you your money back, guaranteed.
Install Sensu in 5 minutes or less, or we'll give you your money back, guaranteed.
After completing the steps in this guide, you will have a fully functional Sensu Core installation in a standalone configuration.
What will you need to complete the 5-minute Sensu install?
- A virtual machine, or physical computer running 64-bit Ubuntu 14.04 with a minimum of 2GB of memory (4GB recommended)
- Familiarity with a modern command-line interface
- 5 minutes (the amount of time it should take to complete this installation guide)
Ready? Let's get started!
The following installation steps will help you get Sensu Core installed in a standalone on a system running Ubuntu 14.04, only. For installation on other platforms, and/or alternative installation configurations, please consult the installation guide.
-
Install Redis (>= 1.3.14) from the distribution repository:
sudo apt-get update sudo apt-get -y install redis-server curl jq
-
Install the Redis init scripts using the
update-rc.d
utility, and start Redis:sudo update-rc.d redis-server defaults sudo /etc/init.d/redis-server start
-
Download and install Sensu using
wget
anddpkg
:wget https://core.sensuapp.com/apt/pool/sensu/main/s/sensu/sensu_0.22.1-1_amd64.deb sudo dpkg -i sensu_0.22.1-1_amd64.deb
Verify that Sensu is installed by running the following command:
/opt/sensu/bin/sensu-server --version
-
Configure Sensu by copying the following example configuration file contents to
/etc/sensu/config.json
:{ "redis": { "host": "localhost" }, "transport": { "name": "redis" }, "api": { "host": "localhost", "port": 4567 } }
-
Configure the Sensu client copying the following example configuration file contents to
/etc/sensu/conf.d/client.json
:{ "client": { "name": "test", "address": "localhost", "subscriptions": [ "test" ] } }
-
Make sure that the
sensu
user owns all of the Sensu configuration files:sudo chown -R sensu:sensu /etc/sensu
-
Start the Sensu services
sudo /etc/init.d/sensu-server start sudo /etc/init.d/sensu-api start sudo /etc/init.d/sensu-client start
-
Verify that your installation is ready to use by querying the Sensu API using the
curl
utility (and piping the result tojq
):curl http://localhost:4567/clients | jq .
If the Sensu API returns a JSON array of Sensu clients similar to this:
$ curl http://localhost:4567/clients | jq . % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 106 100 106 0 0 14026 0 --:--:-- --:--:-- --:--:-- 15142 [ { "timestamp": 1458593707, "version": "0.22.1", "subscriptions": [ "test" ], "address": "localhost", "name": "test" } ]
...you have successfully installed and configured Sensu!
Coming soon...
Remove uchiwa.json from conf.d. That's it. it works like charm