joshbenner.sensu

Sensu

ビルドステータス

Sensu Core(コミュニティ版)をインストールして設定します。

ロール変数

利用可能な変数は以下にリストされています。デフォルトはdefaults/main.ymlを参照してください。

変数名 説明
sensu_install_repo カスタムのDebianリポジトリをインストールするかどうか。
sensu_debian_repo_key_url DebianリポジトリのGPG鍵のURL。
sensu_debian_repo_url 使用するDebianリポジトリのURL。
sensu_redhat_repo_url 使用するRedHatリポジトリのURL。
sensu_state Sensuのインストール状態(例:存在する/存在しない)。
sensu_version インストールするSensuの特定のバージョン。
sensu_user Sensuのユーザー。
sensu_group Sensuのグループ。
sensu_config_file メインのSensu設定ファイルのパス。
sensu_config_dir 追加のSensu設定ファイルが含まれるディレクトリのパス。
sensu_enable_server サーバーを実行するかどうか。
sensu_enable_api APIを実行するかどうか。
sensu_enable_client クライアントを実行するかどうか。
sensu_config メイン設定ファイルのための設定ツリー。特定の設定を上書きする。
sensu_transport_name Sensuが使用するトランスポート(rabbitmqまたはredis)。
sensu_rabbitmq_config RabbitMQ設定の範囲。
sensu_redis_config Redis設定の範囲。
sensu_api_config API設定の範囲。
sensu_client_config クライアント設定の範囲。
sensu_pin_version 特定のバージョンを固定するかどうか(sensu_versionに依存)。
sensu_install_yum_versionlock YUMバージョンロックプラグインをインストールするかどうか。必要な場合。

マージされた設定

このロールは、特定のサフィックスを持つ変数をマージして、複数のソースからのチェックのような設定をアセンブルします。Ansibleのマージを有効にする必要はありません。

例えば、group_vars/allに次のような変数があると仮定します:

base_sensu_checks:
  check_memory:
    command: check-memory-percent.rb -w 70 -c 80
    interval: 60
    standalone: true
  check_swap:
    command: check-swap-percent.rb -w 50 -c 80
    interval: 60
    standalone: true

そして、group_vars/rabbit-serversに次のような変数があるとします:

rabbitmq_sensu_checks:
  check_rabbitmq_alive:
    command: check-rabbitmq-amqp-alive.rb
    interval: 60
    standalone: true

すると、rabbit-serversグループのサーバーでは、チェックが結合されて次のような設定になります:

sensu_checks:
  check_memory:
    command: check-memory-percent.rb -w 70 -c 80
    interval: 60
    standalone: true
  check_swap:
    command: check-swap-percent.rb -w 50 -c 80
    interval: 60
    standalone: true
  check_rabbitmq_alive:
    command: check-rabbitmq-amqp-alive.rb
    interval: 60
    standalone: true

以下のサフィックスがSensu設定用にマージされます:

  • _sensu_checks - Sensuチェック定義

  • _sensu_handlers - Sensuハンドラ定義

  • _sensu_filters - Sensuフィルタ定義

  • _sensu_mutators - Sensuミューテータ定義

  • _sensu_plugins - インストールするSensuプラグイン、文字列名または詳細なオブジェクトとして:

    some_prefix__sensu_plugins:
      - name: pagerduty
        version: 3.0.1
    
  • _sensu_plugin_dependencies

  • _sensu_extensions - インストールする拡張機能とバージョン:

    some_prefix__sensu_extensions:
      some-extension: 1.2.3
      other-extension: absent
    

例のプレイブック

- hosts: all
  become: yes
  roles:
    - role: joshbenner.rabbitmq
    - role: DavidWittman.redis
    - role: joshbenner.sensu
      sensu_enable_server: yes
      sensu_enable_api: yes
      my_sensu_plugins:
        - cpu-checks
        - memory-checks
        - network-checks
        - rabbitmq
        - redis
      my_sensu_checks:
        check_cpu:
          command: check-cpu.rb -w 80 -c 95
          interval: 60
          standalone: true
        check_memory:
          command: check-memory-percent.rb -w 70 -c 80
          interval: 60
          standalone: true
        check_swap:
          command: check-swap-percent.rb -w 50 -c 80
          interval: 60
          standalone: true
        check_route:
          command: check-ping.rb -h {{ ansible_default_ipv4.gateway }} -W 90 -C 50
          interval: 60
          standalone: true
        check_rabbitmq_alive:
          command: check-rabbitmq-amqp-alive.rb
          interval: 60
          standalone: true
        check_redis_alive:
          command: check-redis-ping.rb
          interval: 60
          standalone: true

ライセンス

BSD

プロジェクトについて

Install and configure sensu core (OSS version).

インストール
ansible-galaxy install joshbenner.sensu
ライセンス
bsd-3-clause
ダウンロード
79
所有者