Automation Suite
2023.10
falso
Imagem de fundo do banner
Guia de instalação do Automation Suite no Linux
Última atualização 19 de abr de 2024

Configurando o Elasticsearch e o Kibana

A pilha EFK (Elasticsearch, Fluentd, Kibana) é uma solução de registro centralizada que permite pesquisar, analisar e visualizar dados de registro. O Fluentd coleta e envia os logs para o Elasticsearch, o Kibana recupera os logs e permite visualizar e analisar os dados.

O Automation Suite oferece suporte ao Elasticsearch versão 7.x. A versão 8.x também é suportada, mas apenas para configurações avançadas.

Criando um segredo com a senha do Elasticsearch

Se sua instância do Elasticsearch exigir credenciais, crie um segredo com sua senha no 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 para Elasticsearch

Execute o seguinte comando para ClusterOutput para o Elasticsearch. Substitua os seguintes atributos pelos de sua configuração do Elasticsearch:

  • <elasticsearch host> - o host de rede da sua instância do Elasticsearch;
  • <elasticsearch port>- a porta Elasticsearch para comunicação com o cliente;
  • <secret key>- o segredo com a senha do Elasticsearch;
  • timekey valor em elasticsearch.buffer - a frequência de saída, ou seja, com que frequência você deseja enviar logs;
  • elasticsearch.scheme- o esquema de URL.Os valores válidos são: http ou 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 em FluentD

Execute o seguinte comando para ClusterFlow no FluendD:

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:
          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:
          app: csi-resizer
    - select: {}
EOF
Os logs do cluster são coletados e registrados no ClusterOutput.

Configurando o Kibana

  1. Clique Descobrir sob Análise na barra lateral.


  2. Clique Criar padrão de índice e então Crie um padrão de índice com o nome Fluentd.


  3. Selecione Não quero usar o filtro de tempo na janela Definir configurações.


  4. Clique em Descobrir em Kibana na barra lateral.


    • Você pode ver os logs no painel.


    • Consulta de logs para o namespace UiPath e um serviço específico:


Was this page helpful?

Obtenha a ajuda que você precisa
Aprendendo RPA - Cursos de automação
Fórum da comunidade da Uipath
Logotipo branco da Uipath
Confiança e segurança
© 2005-2024 UiPath. All rights reserved.