# Prometheus モニタリング

EMQX プラットフォームは、EMQX プラットフォームの主要なメトリクスを簡単に監視できる Prometheus API を提供しています。本ページでは、Prometheus サービスの設定方法、EMQX プラットフォーム API からの主要メトリクスの取得方法、および Grafana テンプレートを使用したメトリクスの可視化方法について紹介します。

::: tip 注意事項

この機能は EMQX Dedicated エディションでのみ利用可能です。

:::

## API 設定

API アドレスを取得するには、デプロイメントの **Overview** ページで **Deployment API Key** を確認してください。**+ New Application** をクリックすると、APP ID と APP Secret を取得できます。

![prometheus_en_api](./_assets/prometheus_en_api.png)

### デプロイメントメトリクス URI

GET /deployment_metrics

Prometheus 収集用のクラスターのメトリクスを返します。

**クエリパラメータ:**

なし

#### リクエストメッセージ

なし

#### リクエスト例

```bash
curl -u app_id:app_secret -X GET {api}/deployment_metrics
```

#### レスポンス

| メトリクス                                                  | 説明                                                        | タイプ    |
| ----------------------------------------------------------- | ----------------------------------------------------------- | --------- |
| deployment_emqx_sessions_count                              | クラスター内の現在のセッション数                            | Gauge     |
| deployment_emqx_connections_count                           | クラスター内の現在の接続数                                  | Gauge     |
| deployment_emqx_sent_msg_rate                               | 1秒あたりの送信メッセージレート                             | Gauge     |
| deployment_emqx_received_msg_rate                           | 受信メッセージのレート                                      | Gauge     |
| deployment_emqx_metrics_cluster_sessions_count              | クラスター内のセッション数                                  | Gauge     |
| deployment_emqx_metrics_cluster_sessions_max                | クラスター内のセッション数の過去最大値                      | Gauge     |
| deployment_emqx_metrics_delayed_count                       | 遅延メッセージ数                                            | Gauge     |
| deployment_emqx_metrics_delayed_max                         | 遅延メッセージ数の過去最大値                                | Gauge     |
| deployment_emqx_metrics_live_connections_count              | ライブ接続数                                                | Gauge     |
| deployment_emqx_metrics_live_connections_max                | ライブ接続数の過去最大値                                    | Gauge     |
| deployment_emqx_disconnected_durable_sessions               | 切断されたが保持されているセッション数                      | Gauge     |
| deployment_emqx_dropped_msg_rate                            | ドロップされたメッセージのレート                            | Gauge     |
| deployment_emqx_license_quota                               | ライセンスで許可されている最大接続数                        | Gauge     |
| deployment_emqx_node_count                                  | EMQX クラスター内のノード数                                 | Gauge     |
| deployment_emqx_persisted_rate                              | ストレージに永続化されたメッセージのレート                  | Gauge     |
| deployment_emqx_retained_msg_count                          | 現在の保持メッセージ数                                      | Gauge     |
| deployment_emqx_shared_subscriptions                        | 共有サブスクリプション数                                    | Gauge     |
| deployment_emqx_subscriptions                               | サブスクリプションの総数                                    | Gauge     |
| deployment_emqx_subscriptions_durable                       | セッション間で保持される耐久サブスクリプション数           | Gauge     |
| deployment_emqx_subscriptions_ram                           | RAM に保存される非耐久サブスクリプション数                  | Gauge     |
| deployment_emqx_topics                                     | トピックの総数                                              | Gauge     |
| deployment_emqx_transformation_failed_rate                  | メッセージ変換失敗のレート                                  | Gauge     |
| deployment_emqx_transformation_succeeded_rate               | メッセージ変換成功のレート                                  | Gauge     |
| deployment_emqx_validation_failed_rate                      | メッセージ検証失敗のレート                                  | Gauge     |
| deployment_emqx_validation_succeeded_rate                   | メッセージ検証成功のレート                                  | Gauge     |
| deployment_emqx_metrics_topics_count                        | 現在のトピック数                                            | Gauge     |
| deployment_emqx_metrics_topics_max                          | トピック数の最大値                                          | Gauge     |
| deployment_emqx_metrics_subscriptions_max                   | サブスクリプション数の最大値                                | Gauge     |
| deployment_emqx_metrics_subscriptions_count                 | 現在のサブスクリプション数                                  | Gauge     |
| deployment_emqx_metrics_subscribers_max                     | サブスクライバー数の最大値                                  | Gauge     |
| deployment_emqx_metrics_subscribers_count                   | 現在のサブスクライバー数                                    | Gauge     |
| deployment_emqx_metrics_connections_count                   | 現在の接続数                                                | Gauge     |
| deployment_emqx_metrics_connections_max                     | 接続数の最大値                                              | Gauge     |
| deployment_emqx_metrics_channels_count                      | 現在のチャネル数                                            | Gauge     |
| deployment_emqx_metrics_channels_max                        | チャネル数の最大値                                          | Gauge     |
| deployment_emqx_metrics_sessions_count                      | 現在のセッション数                                          | Gauge     |
| deployment_emqx_metrics_sessions_max                        | セッション数の最大値                                        | Gauge     |
| deployment_emqx_metrics_suboptions_count                    | 現在のサブスクリプションオプション数                        | Gauge     |
| deployment_emqx_metrics_suboptions_max                      | サブスクリプションオプション数の最大値                      | Gauge     |
| deployment_emqx_metrics_subscriptions_shared_count          | 現在の共有サブスクリプション数                              | Gauge     |
| deployment_emqx_metrics_subscriptions_shared_max            | 共有サブスクリプション数の最大値                            | Gauge     |
| deployment_emqx_metrics_retained_count                      | 現在の保持メッセージ数                                      | Gauge     |
| deployment_emqx_metrics_retained_max                        | 過去最大の保持メッセージ数                                  | Gauge     |
| deployment_emqx_cluster_status                              | EMQX クラスターのステータス                                 | Gauge     |
| deployment_emqx_metrics_durable_subscriptions_max           | 現在のクラスターにおける耐久サブスクリプションの最大数     | Counter   |
| deployment_emqx_metrics_durable_subscriptions_count         | 現在のクラスターにおける耐久サブスクリプションの数         | Counter   |
| deployment_emqx_metrics_client_disconnected_reason          | 理由別のリスナーシャットダウン数                            | Counter   |
| deployment_emqx_metrics_bytes_received                      | 受信バイト数                                               | Counter   |
| deployment_emqx_metrics_bytes_sent                          | 送信バイト数                                               | Counter   |
| deployment_emqx_metrics_packets_received                    | 受信パケット数                                             | Counter   |
| deployment_emqx_metrics_packets_sent                        | 送信パケット数                                             | Counter   |
| deployment_emqx_metrics_packets_connack_auth_error          | 認証エラーを含む送信済み CONNACK パケット数                | Counter   |
| deployment_emqx_metrics_packets_connack_error               | エラーを含む送信済み CONNACK パケット数                    | Counter   |
| deployment_emqx_metrics_packets_connack_sent                | 送信済み CONNACK パケット数                                | Counter   |
| deployment_emqx_metrics_packets_publish_received            | 受信済み PUBLISH パケット数                                | Counter   |
| deployment_emqx_metrics_packets_publish_sent                | 送信済み PUBLISH パケット数                                | Counter   |
| deployment_emqx_metrics_packets_publish_inuse               | 使用中の PUBLISH パケット数                                | Counter   |
| deployment_emqx_metrics_packets_publish_auth_error          | 認証エラーを含む PUBLISH パケット数                        | Counter   |
| deployment_emqx_metrics_packets_publish_error               | エラーを含む PUBLISH パケット数                            | Counter   |
| deployment_emqx_metrics_packets_publish_dropped             | ドロップされた PUBLISH パケット数                          | Counter   |
| deployment_emqx_metrics_packets_puback_received             | 受信済み PUBACK パケット数                                | Counter   |
| deployment_emqx_metrics_packets_puback_sent                 | 送信済み PUBACK パケット数                                | Counter   |
| deployment_emqx_metrics_packets_puback_inuse                | 使用中の PUBACK パケット数                                | Counter   |
| deployment_emqx_metrics_packets_puback_missed               | 失われた PUBACK パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubrec_received             | 受信済み PUBREC パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubrec_sent                 | 送信済み PUBREC パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubrec_inuse                | 使用中の PUBREC パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubrec_missed               | 失われた PUBREC パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubrel_received             | 受信済み PUBREL パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubrel_sent                 | 送信済み PUBREL パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubrel_missed               | 失われた PUBREL パケット数                                | Counter   |
| deployment_emqx_metrics_packets_pubcomp_received            | 受信済み PUBCOMP パケット数                               | Counter   |
| deployment_emqx_metrics_packets_pubcomp_sent                | 送信済み PUBCOMP パケット数                               | Counter   |
| deployment_emqx_metrics_packets_pubcomp_inuse               | 使用中の PUBCOMP パケット数                               | Counter   |
| deployment_emqx_metrics_packets_pubcomp_missed              | 失われた PUBCOMP パケット数                               | Counter   |
| deployment_emqx_metrics_packets_subscribe_received          | 受信済み SUBSCRIBE パケット数                             | Counter   |
| deployment_emqx_metrics_packets_subscribe_error             | エラーを含む SUBSCRIBE パケット数                         | Counter   |
| deployment_emqx_metrics_packets_subscribe_auth_error        | 認証エラーを含む SUBSCRIBE パケット数                     | Counter   |
| deployment_emqx_metrics_packets_suback_sent                  | 送信済み SUBACK パケット数                                | Counter   |
| deployment_emqx_metrics_packets_unsubscribe_received        | 受信済み UNSUBSCRIBE パケット数                           | Counter   |
| deployment_emqx_metrics_packets_unsubscribe_error           | エラーを含む UNSUBSCRIBE パケット数                       | Counter   |
| deployment_emqx_metrics_packets_unsuback_sent                | 送信済み UNSUBACK パケット数                              | Counter   |
| deployment_emqx_metrics_packets_pingreq_received            | 受信済み PINGREQ パケット数                               | Counter   |
| deployment_emqx_metrics_packets_pingresp_sent               | 送信済み PINGRESP パケット数                              | Counter   |
| deployment_emqx_metrics_packets_disconnect_received         | 受信済み DISCONNECT パケット数                            | Counter   |
| deployment_emqx_metrics_packets_disconnect_sent             | 送信済み DISCONNECT パケット数                            | Counter   |
| deployment_emqx_metrics_packets_auth_received               | 受信済み AUTH パケット数                                  | Counter   |
| deployment_emqx_metrics_packets_auth_sent                   | 送信済み AUTH パケット数                                  | Counter   |
| deployment_emqx_metrics_delivery_dropped_too_large          | サイズオーバーでドロップされた配信数                      | Counter   |
| deployment_emqx_metrics_delivery_dropped_queue_full         | キュー満杯でドロップされた配信数                          | Counter   |
| deployment_emqx_metrics_delivery_dropped_qos0_msg           | QoS 0 メッセージでドロップされた配信数                    | Counter   |
| deployment_emqx_metrics_delivery_dropped_expired            | 期限切れでドロップされた配信数                            | Counter   |
| deployment_emqx_metrics_delivery_dropped_no_local           | ローカルクライアントなしでドロップされた配信数            | Counter   |
| deployment_emqx_metrics_delivery_dropped                     | ドロップされた配信数の合計                                | Counter   |
| deployment_emqx_metrics_messages_delayed                     | 遅延メッセージ数                                          | Counter   |
| deployment_emqx_metrics_messages_delivered                   | 配信済みメッセージ数                                      | Counter   |
| deployment_emqx_metrics_messages_dropped                     | ドロップされたメッセージ数                                | Counter   |
| deployment_emqx_metrics_messages_dropped_expired             | 期限切れのドロップメッセージ数                            | Counter   |
| deployment_emqx_metrics_messages_dropped_no_subscribers      | サブスクライバーなしでドロップされたメッセージ数          | Counter   |
| deployment_emqx_metrics_messages_forward                     | 転送されたメッセージ数                                    | Counter   |
| deployment_emqx_metrics_messages_publish                     | パブリッシュされたメッセージ数                            | Counter   |
| deployment_emqx_metrics_messages_qos0_received               | 受信した QoS 0 メッセージ数                               | Counter   |
| deployment_emqx_metrics_messages_qos2_received               | 受信した QoS 2 メッセージ数                               | Counter   |
| deployment_emqx_metrics_messages_qos1_received               | 受信した QoS 1 メッセージ数                               | Counter   |
| deployment_emqx_metrics_messages_qos0_sent                   | 送信した QoS 0 メッセージ数                               | Counter   |
| deployment_emqx_metrics_messages_qos1_sent                   | 送信した QoS 1 メッセージ数                               | Counter   |
| deployment_emqx_metrics_messages_qos2_sent                   | 送信した QoS 2 メッセージ数                               | Counter   |
| deployment_emqx_metrics_messages_received                     | 受信したメッセージ数の合計                                | Counter   |
| deployment_emqx_metrics_messages_sent                         | 送信したメッセージ数の合計                                | Counter   |
| deployment_emqx_metrics_messages_retained                     | 保持されたメッセージ数                                    | Counter   |
| deployment_emqx_metrics_messages_acked                        | アック（ACK）されたメッセージ数                           | Counter   |
| deployment_emqx_metrics_client_auth_anonymous                 | 匿名クライアント認証数                                    | Counter   |
| deployment_emqx_metrics_client_connect                        | クライアント接続数                                        | Counter   |
| deployment_emqx_metrics_client_authenticate                    | クライアント認証数                                        | Counter   |
| deployment_emqx_metrics_client_connack                        | 送信済み CONNACK パケット数                              | Counter   |
| deployment_emqx_metrics_client_connected                      | 現在接続中のクライアント数                                | Counter   |
| deployment_emqx_metrics_client_disconnected                   | クライアント切断数                                        | Counter   |
| deployment_emqx_metrics_client_subscribe                       | クライアントのサブスクライブ数                            | Counter   |
| deployment_emqx_metrics_client_unsubscribe                     | クライアントのサブスクライブ解除数                        | Counter   |
| deployment_emqx_metrics_session_created                        | 作成されたセッション数                                    | Counter   |
| deployment_emqx_metrics_session_discarded                      | 廃棄されたセッション数                                    | Counter   |
| deployment_emqx_metrics_session_resumed                        | 再開されたセッション数                                    | Counter   |
| deployment_emqx_metrics_session_terminated                     | 終了したセッション数                                      | Counter   |
| deployment_emqx_metrics_authentication_failure                 | 認証失敗数                                               | Counter   |
| deployment_emqx_metrics_authentication_success                 | 認証成功数                                               | Counter   |
| deployment_emqx_metrics_authentication_success_anonymous       | 匿名認証成功数                                           | Counter   |
| deployment_emqx_metrics_authorization_allow                     | 認可成功数                                               | Counter   |
| deployment_emqx_metrics_authorization_cache_hit                 | 認可時のキャッシュヒット数                               | Counter   |
| deployment_emqx_metrics_authorization_cache_miss                | 認可時のキャッシュミス数                                 | Counter   |
| deployment_emqx_metrics_authorization_deny                      | 認可拒否数                                               | Counter   |
| deployment_emqx_metrics_authorization_matched_allow             | 認可成功マッチ数                                         | Counter   |
| deployment_emqx_metrics_authorization_matched_deny              | 認可拒否マッチ数                                         | Counter   |
| deployment_emqx_metrics_authorization_nomatch                   | 認可ミスマッチ数                                         | Counter   |
| deployment_emqx_metrics_authorization_superuser                 | スーパーユーザー認可数                                   | Counter   |
| deployment_emqx_metrics_client_authorize                        | client.authorize フックのトリガー回数                    | Counter   |
| deployment_emqx_metrics_packets_connect                         | 送信済み CONNECT パケット数                              | Counter   |
| deployment_emqx_metrics_session_takenover                       | session.takenover フックのトリガー回数                    | Counter   |

### データ統合メトリクス URI

GET /deployment_metrics/data_integration

Prometheus 収集用のデータ統合メトリクスを返します。

**クエリパラメータ:**

なし

#### リクエストメッセージ

なし

#### リクエスト例

```bash
curl -u app_id:app_secret -X GET {api}/deployment_metrics/data_integration
```

#### レスポンス

- 各リソースのステータス
- 各ルールのステータス
- 各ルールの異なるマッチステータス（"matched", "passed", "failed", "exception", "no_result"）のカウント
- 各ルールの全アクション処理ステータス（"success", "failed", "taken"）のカウント

| メトリクス                                | 説明                                     | タイプ  | 変数ラベル                  |
| :--------------------------------------- | :--------------------------------------- | :------ | :-------------------------- |
| deployment_emqx_resource_status          | 特定リソースの現在のステータス           | Gauge   | resource_id                 |
| deployment_emqx_rule_status              | 特定ルールの現在のステータス             | Gauge   | rule_id                     |
| deployment_emqx_rule_matched_count       | 特定ルールのマッチ総数                   | Gauge   | rule_id, match_status       |
| deployment_emqx_rule_action_execution_count | 特定ルールのアクション実行回数           | Gauge   | rule_id, execution_status   |
| deployment_emqx_action_dropped_count     | 特定アクションのドロップイベント数       | Counter | drop_reason                 |
| deployment_emqx_action_enable             | アクションが有効な emqx ノード数          | Gauge   | status                      |
| deployment_emqx_action_events_count       | 特定アクションのイベント数               | Counter | event, action_id            |
| deployment_emqx_action_queued_count       | 特定アクションのキューイングイベント数   | Gauge   | action_id, queue_status     |
| deployment_emqx_action_retried_count      | 特定アクションのリトライイベント数       | Counter | action_id, retry_status     |
| deployment_emqx_action_status             | 特定アクションの現在のステータス         | Gauge   | action_id                   |

### 認証・認可メトリクス URI

GET /deployment_metrics/auth

Prometheus 収集用の認証および認可メトリクスを返します。

**クエリパラメータ:**

なし

#### リクエストメッセージ

なし

#### リクエスト例

```bash
curl -u app_id:app_secret -X GET {api}/deployment_metrics/auth
```

#### レスポンス

| メトリクス                        | 説明                                         | タイプ  | 変数ラベル |
| :-------------------------------- | :-------------------------------------------- | :------ | :--------- |
| deployment_emqx_authn_enable       | 指定された認証方式が有効かどうか              | Gauge   | id         |
| deployment_emqx_authn_match_count  | 各認証方式の統計                             | Gauge   | id, status |
| deployment_emqx_authn_status       | 各認証方式の稼働状況                         | Gauge   | id         |
| deployment_emqx_authz_enable       | 指定された認可方式が有効かどうか              | Gauge   | id         |
| deployment_emqx_authz_match_count  | 各認可方式の統計                             | Gauge   | id, status |
| deployment_emqx_authz_status       | 各認可方式の稼働状況                         | Gauge   | id         |

### スマートデータハブメトリクス URI

GET /deployment_metrics/data_hub

Prometheus 収集用のスマートデータハブメトリクスを返します。

**クエリパラメータ:**

なし

#### リクエストメッセージ

なし

#### リクエスト例

```bash
curl -u app_id:app_secret -X GET {api}/deployment_metrics/data_hub
```

#### レスポンス

| メトリクス                         | 説明                                     | タイプ  | 変数ラベル           |
| :-------------------------------- | :--------------------------------------- | :------ | :-------------------- |
| emqx_message_transformation_enable | メッセージ変換の有効状態                 | Gauge   | validation_name       |
| emqx_message_transformation_stats  | 変換統計                               | Counter | stats, validation_name |
| emqx_schema_validation_enable      | スキーマ検証の有効状態                   | Gauge   | validation_name       |
| emqx_schema_validation_stats       | スキーマ検証統計                         | Counter | stats, validation_name |

## Prometheus 設定

1. Prometheus をインストールします。

    ```bash
    wget -c https://github.com/prometheus/prometheus/releases/download/v2.35.0-rc0/prometheus-2.35.0-rc0.linux-amd64.tar.gz
    tar xvfz prometheus-*.tar.gz
    ```

2. 設定ファイルを編集します。

    Prometheus サービスで指定されたモニタリングディレクトリに移動し、設定ファイル prometheus.yml の `scrape_configs` セクションを以下の例のように編集します。

    ```bash
    scrape_configs:
      - job_name: 'emqx_cloud_deployment_metrics'
        scheme: 'https'
        static_configs:
          - targets: [ 'xxxx:8443' ]
        metrics_path: "/api/v5/deployment_metrics"
        params:
          type: [ "prometheus" ]
        basic_auth:
          username: 'APP ID'
          password: 'APP Secret'
      - job_name: 'emqx_cloud_deployment_data_integration_metrics'
        scheme: 'https'
        static_configs:
          - targets: [ 'xxxx:8443' ]
        metrics_path: "/api/v5/deployment_metrics/data_integration"
        params:
          type: [ "prometheus" ]
        basic_auth:
          username: 'APP ID'
          password: 'APP Secret'
    ```

3. サービスを起動し、状態を確認します。

    Prometheus を起動します。

   ```bash
    ./prometheus --config.file=prometheus.yml
   ```

   ローカル IP と対応するポート（例：x.x.x.x:9090）から Prometheus サービスにアクセスし、Status-Targets で新しい scrape_config ファイルが読み込まれていることを確認してください。ステータスに例外が表示される場合は、設定ファイルを確認し、Prometheus サービスを再起動してください。

    ![Prometheus_service](./_assets/prometheus_service.png)

## Grafana 設定

1. Grafana をインストールして起動します。

   ```bash
    wget https://dl.grafana.com/enterprise/release/grafana-enterprise-8.4.6.linux-amd64.tar.gz
    tar -zxvf grafana-enterprise-8.4.6.linux-amd64.tar.gz
    ./bin/grafana-server
   ```

2. Grafana を設定します。

    ローカル IP と対応するポート（例：x.x.x.x:3000）で Grafana ダッシュボードにアクセスします。初期の ID とパスワードは admin です。初回ログイン時にパスワードを変更できます。

    ![Grafana](./_assets/grafana_data_sources.png)

3. Grafana データテンプレートをインポートします。

    EMQX プラットフォームは Grafana ダッシュボード用のテンプレートファイルを提供しています。これらのテンプレートは EMQX プラットフォームのすべての監視データを表示します。ユーザーはこれらのテンプレートを直接 Grafana にインポートして、EMQX の監視状況を示すチャートを生成できます。テンプレートファイルは[こちら](https://github.com/emqx/emqx-cloud-grafana/blob/main/sre/v5_deployment_grafana.json)から入手可能です。

    ローカルの grafana_template.json ファイルは「Upload JSON file」からアップロードするか、「Import via panel json」で手動設定できます。

    ![Grafana](./_assets/grafana_template.png)

## メトリクス詳細

システムのセットアップ完了後、一定期間稼働させると、EMQX プラットフォームの Prometheus が収集したデータが Grafana に表示されます。これにはクライアント数、サブスクリプション数、トピック数、メッセージ数、パケット数などの過去の統計情報が含まれます。各メトリクスに対応したチャートや特定時点の詳細情報を閲覧できます。

![Grafana](./_assets/emqx_grafana_metrics.png)

Prometheus は EMQX プラットフォームのデプロイメントに対して以下のメトリクスデータを追跡します。

| メトリクス                                               | タイプ    | 説明                                         |
| -------------------------------------------------------- | --------- | -------------------------------------------- |
| deployment_emqx_connections_count                        | gauge     | クラスター接続数                             |
| deployment_emqx_sessions_count                           | gauge     | セッション総数                              |
| deployment_emqx_messages_rate                            | gauge     | メッセージ総レート                          |
| deployment_emqx_messages_send_rate                       | gauge     | メッセージ送信レート                        |
| deployment_emqx_messages_receive_rate                    | gauge     | メッセージ受信レート                        |
| deployment_emqx_metrics_bytes_received                   | gauge     | 受信バイト数                                |
| deployment_emqx_metrics_bytes_sent                       | gauge     | 送信バイト数                                |
| deployment_emqx_metrics_retained_count                   | gauge     | 保持メッセージ数                            |
| deployment_emqx_metrics_messages_received                | counter   | 受信メッセージ数                            |
| deployment_emqx_metrics_messages_qos0_received           | counter   | 受信した QoS=0 メッセージ数                 |
| deployment_emqx_metrics_messages_qos1_received           | counter   | 受信した QoS=1 メッセージ数                 |
| deployment_emqx_metrics_messages_qos2_received           | counter   | 受信した QoS=2 メッセージ数                 |
| deployment_emqx_metrics_messages_dropped                 | counter   | 受信段階でドロップされたメッセージ数        |
| deployment_emqx_metrics_messages_dropped_expired         | counter   | 期限切れによるドロップメッセージ数          |
| deployment_emqx_metrics_messages_dropped_no_subscribers  | counter   | サブスクライバーなしによるドロップメッセージ数 |
| deployment_emqx_metrics_messages_sent                    | counter   | 送信メッセージ数                            |
| deployment_emqx_metrics_messages_qos0_sent               | counter   | 送信した QoS=0 メッセージ数                 |
| deployment_emqx_metrics_messages_qos1_sent               | counter   | 送信した QoS=1 メッセージ数                 |
| deployment_emqx_metrics_messages_qos2_sent               | counter   | 送信した QoS=2 メッセージ数                 |
| deployment_emqx_metrics_delivery_dropped                 | counter   | 配信段階でドロップされたメッセージ数        |
| deployment_emqx_metrics_delivery_dropped_too_large       | counter   | サイズ超過によるドロップメッセージ数        |
| deployment_emqx_metrics_delivery_dropped_queue_full      | counter   | キュー満杯によるドロップメッセージ数        |
| deployment_emqx_metrics_delivery_dropped_no_local        | counter   | ローカルなしによるドロップメッセージ数      |
| deployment_emqx_metrics_delivery_dropped_expired         | counter   | 期限切れによるドロップメッセージ数          |
| deployment_emqx_metrics_topics_count                      | gauge     | トピック数                                  |
| deployment_emqx_metrics_subscriptions_count               | gauge     | サブスクリプション数                        |
| deployment_emqx_metrics_subscriptions_shared_count        | gauge     | 共有サブスクリプション数                    |
| deployment_emqx_metrics_subscribers_count                 | gauge     | サブスクライバー数                          |
| deployment_emqx_metrics_authentication_success            | counter   | 認証成功数                                  |
| deployment_emqx_metrics_authentication_failure            | counter   | 認証失敗数                                  |
| deployment_emqx_metrics_client_authorize                  | counter   | クライアント認可数                          |
| deployment_emqx_metrics_authorization_allow               | counter   | 認可成功数                                  |
| deployment_emqx_metrics_authorization_deny                | counter   | 認可拒否数                                  |
| deployment_emqx_metrics_authorization_matched_allow       | counter   | 認可成功マッチ数                            |
| deployment_emqx_metrics_authorization_matched_deny        | counter   | 認可拒否マッチ数                            |
| deployment_emqx_metrics_authorization_nomatch             | counter   | 認可ミスマッチ数                            |
| deployment_emqx_metrics_packets_received                  | counter   | 受信パケット数                              |
| deployment_emqx_metrics_packets_sent                      | counter   | 送信パケット数                              |
| deployment_emqx_metrics_packets_connect_received          | counter   | 受信した CONNECT パケット数                 |
| deployment_emqx_metrics_packets_connack_sent              | counter   | 送信した CONNACK パケット数                 |
| deployment_emqx_metrics_packets_disconnect_received       | counter   | 受信した DISCONNECT パケット数              |
| deployment_emqx_metrics_packets_disconnect_sent           | counter   | 送信した DISCONNECT パケット数              |
| deployment_emqx_metrics_packets_publish_received          | counter   | 受信した PUBLISH パケット数                 |
| deployment_emqx_metrics_packets_publish_sent              | counter   | 送信した PUBLISH パケット数                 |
| deployment_emqx_metrics_packets_subscribe_received        | counter   | 受信した SUBSCRIBE パケット数               |
| deployment_emqx_metrics_packets_unsubscribe_received      | counter   | 受信した UNSUBSCRIBE パケット数             |
| deployment_emqx_metrics_packets_pingreq_received          | counter   | 受信した PINGREQ パケット数                 |
| deployment_emqx_metrics_packets_pingresp_sent             | counter   | 送信した PINGRESP パケット数                |
| deployment_emqx_metrics_packets_auth_received             | counter   | 受信した AUTH パケット数                     |
| deployment_emqx_metrics_packets_auth_sent                 | counter   | 送信した AUTH パケット数                     |
| deployment_emqx_rule_status                               | gauge     | ルールステータス                            |
| deployment_emqx_rule_matched_rate                         | gauge     | ルールマッチ率                              |
| deployment_emqx_rule_matched_count                        | gauge     | ルールマッチ数                              |
| deployment_emqx_rule_action_execution_count               | gauge     | ルールアクション実行回数                      |
