9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS 6.6にSensuインストール(クライアント側)

Last updated at Posted at 2015-01-19

以下はChef/Puppetを使わずにCentOS 6.6にインストールする手順。

下記手順をもとに進める。
http://sensuapp.org/docs/0.16/guide

Sensuインストール

リポジトリ設定ファイル作成

# vi /etc/yum.repos.d/sensu.repo
/etc/yum.repos.d/sensu.repo
[sensu]
name=sensu-main
baseurl=http://repos.sensuapp.org/yum/el/$releasever/$basearch/
gpgcheck=0
enabled=1

Sensuインストール

# yum install sensu

Sensu設定

Sensu用のSSL証明書ファイル配置ディレクトリ作成

# mkdir -p /etc/sensu/ssl

Sensuサーバで作成済みのSSL証明書ファイルを/etc/sensu/ssl配下にコピー

scpなり何なりでコピーする。

# scp user@192.168.xxx.xxx:/etc/sensu/ssl/*.pem /etc/sensu/ssl/

/etc/sensu/conf.d/rabbitmq.json作成

# vi /etc/sensu/conf.d/rabbitmq.json
/etc/sensu/conf.d/rabbitmq.json
{
  "rabbitmq": {
    "ssl": {
      "cert_chain_file": "/etc/sensu/ssl/cert.pem",
      "private_key_file": "/etc/sensu/ssl/key.pem"
    },
    "host": "192.168.xxx.xxx",
    "port": 5671,
    "vhost": "/sensu",
    "user": "sensu",
    "password": "rabbitmq-sensu-password"
  }
}

Sensu clients設定

/etc/sensu/conf.d/client.json作成

  • name -> Sensuクライアントのホスト名
  • address -> SensuクライアントのIPアドレス

※name/addressは適宜変更すること

# vi /etc/sensu/conf.d/client.json
/etc/sensu/conf.d/client.json
{
  "client": {
    "name": "Sensu-Client",
    "address": "192.168.xxx.xxx",
    "subscriptions": [ "all" ]
  }
}

Sensu Agent起動

# chkconfig sensu-client on
# service sensu-client start

登録確認

サーバ側に登録されていることを確認。(自動的に登録されているはず)
http://<Server IP>:3000/#/clients

9
10
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
9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?