Automation Suite
2022.4
バナーの背景画像
Automation Suite インストール ガイド
最終更新日 2024年4月24日

Elasticsearch と Kibana を設定する

EFK (Elasticsearch、Fluentd、Kibana) スタックは、ログ データの検索、分析、可視化を可能にする一元化されたログ ソリューションです。Fluentd はログを収集して Elasticsearch に送信します。Kibana はログを取得し、データの可視化や分析を可能にします。

Automation Suite は Elasticsearch バージョン 7.x をサポートしています。バージョン 8.x もサポートされますが、高度な構成の場合のみです。

Elasticsearch パスワードによりシークレットを作成する

Elasticsearch インスタンスに資格情報が必要な場合、クラスター内の Elasticsearch パスワードによるシークレットを作成します。

kubectl -n cattle-logging-system create secret generic elastic-user --from-literal=password=<password>kubectl -n cattle-logging-system create secret generic elastic-user --from-literal=password=<password>

Elasticsearch への ClusterOutput

Elasticsearch に ClusterOutput するには、次のコマンドを実行します。次の属性を、Elasticsearch 構成の属性に置き換えます。

  • <elasticsearch host> - Elasticsearch インスタンスのネットワーク ホストです。
  • <elasticsearch port> - クライアント通信用の Elasticsearch ポートです。
  • <secret key> - Elasticsearch パスワードによるシークレットです。
  • elasticsearch.buffer 内の timekey の値 - 出力頻度。つまり、ログをプッシュする頻度です。
  • elasticsearch.scheme - URL スキーム。有効な値は、http または https です。
    kubectl -n cattle-logging-system apply -f - <<"EOF"
    apiVersion: logging.banzaicloud.io/v1beta1
    kind: ClusterOutput
    metadata:
      name: es-output
    spec:
      elasticsearch:
        host: <elasticsearch host>
        port: <elasticsearch port>
        scheme: <http or https>
        ssl_verify: false
        ssl_version: TLSv1_2
        user: elastic
        password:
          valueFrom:
            secretKeyRef:
              name: elastic-user
              key: <secret key>
        buffer:
          timekey: 10m
          timekey_wait: 30s
          timekey_use_utc: true
    EOFkubectl -n cattle-logging-system apply -f - <<"EOF"
    apiVersion: logging.banzaicloud.io/v1beta1
    kind: ClusterOutput
    metadata:
      name: es-output
    spec:
      elasticsearch:
        host: <elasticsearch host>
        port: <elasticsearch port>
        scheme: <http or https>
        ssl_verify: false
        ssl_version: TLSv1_2
        user: elastic
        password:
          valueFrom:
            secretKeyRef:
              name: elastic-user
              key: <secret key>
        buffer:
          timekey: 10m
          timekey_wait: 30s
          timekey_use_utc: true
    EOF

FluentD 内の ClusterFlow

FluentD で ClusterFlow するには、次のコマンドを実行します。

kubectl -n cattle-logging-system apply -f - <<"EOF"
apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterFlow
metadata:
  name: es-flow
spec:
  filters:
    - tag_normaliser:
        format: ${namespace_name}/${pod_name}.${container_name}
  globalOutputRefs:
    - es-output
  match:
    - select:
        container_names:
          - istio-proxy
        namespaces:
          - istio-system
    - exclude:
        container_names:
          - istio-proxy
          - istio-init
          - aicenter-hit-count-update
    - exclude:
        namespaces:
          - fleet-system
          - cattle-gatekeeper-system
          - default
    - exclude:
        labels:
          app: csi-snapshotter
    - exclude:
        labels:
          longhorn.io/job-task: backup
    - exclude:
        labels:
          app: csi-resizer
    - select: {}
EOFkubectl -n cattle-logging-system apply -f - <<"EOF"
apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterFlow
metadata:
  name: es-flow
spec:
  filters:
    - tag_normaliser:
        format: ${namespace_name}/${pod_name}.${container_name}
  globalOutputRefs:
    - es-output
  match:
    - select:
        container_names:
          - istio-proxy
        namespaces:
          - istio-system
    - exclude:
        container_names:
          - istio-proxy
          - istio-init
          - aicenter-hit-count-update
    - exclude:
        namespaces:
          - fleet-system
          - cattle-gatekeeper-system
          - default
    - exclude:
        labels:
          app: csi-snapshotter
    - exclude:
        labels:
          longhorn.io/job-task: backup
    - exclude:
        labels:
          app: csi-resizer
    - select: {}
EOF
クラスターのログが ClusterOutput に収集、記録されます。

Kibana を構成する

  1. サイドバーの [Analytics] の下にある [Discover] をクリックします。


  2. [Create Index Pattern] をクリックしてから、Fluentd という名前のインデックス パターンを作成します。


  3. [Configure settings] ウィンドウで [I don’t want to use the time filter] を選択します。


  4. サイドバーの [Kibana] の下にある [Discover] をクリックします。


    • ログはダッシュボードで確認できます。


    • UiPath の名前空間と特定のサービスに対するクエリをログ記録できます。


Was this page helpful?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.