Automation Suite
2022.4
False
Bannerhintergrundbild
Automation Suite-Installationsanleitung
Letzte Aktualisierung 24. Apr. 2024

Einrichten von Elasticsearch und Kibana

EFK (Elasticsearch, Fluentd, Kibana) ist eine zentralisierte Protokollierungslösung, mit der Sie Protokolldaten suchen, analysieren und visualisieren können. Fluentd sammelt und sendet die Protokolle an Elasticsearch und Kibana ruft die Protokolle ab und ermöglicht Ihnen, die Daten zu visualisieren und zu analysieren.

Die Automation Suite unterstützt Elasticsearch Version 7.x. Version 8.x wird ebenfalls unterstützt, jedoch nur für erweiterte Konfigurationen.

Erstellen eines Secrets mit dem Elasticsearch-Kennwort

Wenn Ihre Elasticsearch-Instanz Anmeldeinformationen benötigt, erstellen Sie ein Secret mit seinem Kennwort im Cluster.

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>

ClusterOutput zu Elasticsearch

Führen Sie den folgenden Befehl für ClusterOutput für Elasticsearch aus. Ersetzen Sie die folgenden Attribute durch die Attribute Ihrer Elasticsearch-Konfiguration:

  • <elasticsearch host> – der Netzwerkhost Ihrer Elasticsearch-Instanz;
  • <elasticsearch port> – der Elasticsearch-Port für die Clientkommunikation;
  • <secret key> – das Secret mit dem Elasticsearch-Kennwort;
  • der Wert timekey in elasticsearch.buffer – die Ausgabehäufigkeit, d. h. wie oft Sie Protokolle übertragen möchten;
  • elasticsearch.scheme – das URL-Schema. Gültige Werte sind: http oder 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

ClusterFlow in Fluentd

Führen Sie den folgenden Befehl für ClusterFlow in FluentD aus:

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
Protokolle aus dem Cluster werden gesammelt und im ClusterOutput protokolliert.

Konfigurieren von Kibana

  1. Klicken Sie auf Discover unter Analytics in der Seitenleiste.


  2. Klicken Sie auf Create Index Pattern und dann auf Create an index pattern with name Fluentd.


  3. Wählen Sie I don’t want to use the time filter im Fenster Configure settings aus.


  4. Klicken Sie auf Discover unter Kibana auf der Seitenleiste.


    • Sie können Protokolle im Dashboard sehen.


    • Protokollabfrage für den UiPath-Namespace und einen bestimmten Dienst:


War diese Seite hilfreich?

Hilfe erhalten
RPA lernen – Automatisierungskurse
UiPath Community-Forum
UiPath Logo weiß
Vertrauen und Sicherheit
© 2005-2024 UiPath. All rights reserved.