LoginSignup
2
2

More than 5 years have passed since last update.

【Sensu】Ubuntu14.04にsensuをインストールする

Last updated at Posted at 2016-07-25

sensuを動かすのに必要なパッケージを全部いれる。

必要なもの

  • Redis
  • RabbitMQ
  • Sensu

Redis

sudo apt-get update
sudo apt-get -y install redis-server

Linux起動時にredisが動くようにする

sudo update-rc.d redis-server defaults
sudo update-rc.d redis-server disable

RabbitMQ

erlangをインストールする

sudo wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get -y install erlang-nox=1:18.2

RabbitMQをインストールする

RabbitMQ3.6.0をダウンロードする

sudo wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server_3.6.0-1_all.deb

RabbitMQをインストールする

sudo dpkg -i rabbitmq-server_3.6.0-1_all.deb

Linux起動時にRabbitMQも起動するようにする。

sudo update-rc.d rabbitmq-server defaults

RabbitMQで扱えるファイル制限数を変更する

Linuxの1つのプロセスで扱える最大ファイル数を1024から65536に変更する

By default, most Linux operating systems will limit the maximum number of file handles a single process is allowed to have open to 1024. RabbitMQ recommends adjusting this number to 65536 for production systems, and at least 4096 for development environments.

# This file is sourced by /etc/init.d/rabbitmq-server. Its primary
# reason for existing is to allow adjustment of system limits for the
# rabbitmq-server process.
#
# Maximum number of open file handles. This will need to be increased
# to handle many simultaneous connections. Refer to the system
# documentation for ulimit (in man bash) for more information.
#
ulimit -n 65536

起動時にRabbitMQが動くようにする

sudo rabbitmqctl status

Sensuをインストールする

wget -q http://sensu.global.ssl.fastly.net/apt/pubkey.gpg -O- | sudo apt-key add -
echo "deb     http://sensu.global.ssl.fastly.net/apt sensu main" | sudo tee /etc/apt/sources.list.d/sensu.list
sudo apt-get update
sudo apt-get install sensu

起動時にSensuが起動するようにする

sudo update-rc.d sensu-client defaults
sudo update-rc.d sensu-server defaults
sudo update-rc.d sensu-api defaults
sudo update-rc.d sensu-client disable
sudo update-rc.d sensu-server disable
sudo update-rc.d sensu-api disable

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2