ableton.prometheus_node_exporter
Ansibleロール ableton.prometheus_node_exporter
このロールは、指定されたホストにPrometheus node_exporter
をサービスとしてインストールします。ターゲットシステムにnode_exporter
パッケージを持つパッケージマネージャーがある場合、このロールはその方法でソフトウェアをインストールします。それ以外の場合、ソフトウェアはソースからビルドされます。
Windowsの場合、このロールはwindows_exporter
をインストールします。
要件
Ansible >= 2.10が必要です。このロールは次のOSタイプでのパッケージベースのインストールをサポートしています:
- Debian Linux(
apt
モジュール経由) - macOS(
homebrew
モジュール経由) - Windows(
win_chocolatey
モジュール経由)
他のプラットフォームでは、ソースベースのインストールが実行されます。パッケージベースのインストールが利用できないシステムでは、次のソフトウェアが必要です:
- Go(golang)
- GNU Make
このロールはホストに上記のソフトウェアをインストールしません。適用する前にこれらを準備してください。
ロール変数
次のロール変数はnode_exporter
のサービス設定に使用されます:
node_exporter_args
:node_exporter
サービスに渡す引数のリスト、一つの引数がリストの各項目として含まれます。node_exporter_create_user
:true
の場合、node_exporter_user
ユーザーと対応するnode_exporter_group
を作成します(Unixプラットフォームのみで使用、デフォルトはtrue
)。node_exporter_group
:node_exporter_user
ユーザーのグループ(Unixプラットフォームのみで使用)。node_exporter_port
: メトリクスを公開するポート。node_exporter_user
:node_exporter
を実行するユーザー(Unixプラットフォームのみで使用)。
次の変数はソースからnode_exporter
をビルドする際に使用されます。
node_exporter_install_from_binary
:true
の場合、node_exporter
はバイナリのダウンロードからインストールされ、パッケージマネージャーを通じてはインストールされません。このオプションはすべてのシステムタイプでサポートされているわけではありません(上記の「要件」セクションを参照)。node_exporter_binary_arch
:node_exporter
バイナリのダウンロード時に取得するバイナリアーキテクチャ。node_exporter_version
: ソースからインストールするnode_exporterのバージョン。
Windowsで使用される変数:
windows_exporter_version
: Chocolateyを使用してインストールするwindows_exporterのバージョン。
必要なロール変数とオプションの詳細はdefaults/main.yml
ファイルを参照してください。
例プレイブック
---
- name: ホストにnode_exporterをインストール
hosts: "all"
vars:
node_exporter_port: 9100
node_exporter_binary_arch: "amd64"
node_exporter_group: "{{ ansible_user }}"
node_exporter_user: "{{ ansible_user }}"
node_exporter_version: "0.18.1"
pre_tasks:
- name: macOSホストに特定のバージョンを使用するためにソースからインストールさせる
set_fact:
node_exporter_install_from_binary: true
when: ansible_os_family == "Darwin"
- name: macOSホストのための必須ソフトウェアをインストール
homebrew:
name: golang
state: present
roles:
- ableton.prometheus_node_exporter
ライセンス
MIT
メンテナー
このプロジェクトは以下のGitHubユーザーによって維持されています:
インストール
ansible-galaxy install ableton.prometheus_node_exporter
ライセンス
mit
ダウンロード
38.5k
所有者
Ableton makes Live, Push and Link — unique software and hardware for music creation and performance.