UiPath Documentation
automation-suite
2021.10
false
Guia de instalação do Automation Suite
Importante :
A tradução automática foi aplicada parcialmente neste conteúdo. A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.

Como configurar o Splunk

Observação:
  • This section covers exporting POD logs. For exporting robot logs, see Ochestrator - About Logs.
  • Splunk is an external tool, and UiPath does not have an opinion on how you should configure your Splunk setting. For more details about HTTP Event Collector, see Splunk official documentation.

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

Criação de um segredo com um token​

Para criar um segredo no cluster com o token Coletor de Evento HTTP do Splunk, execute o seguinte comando:

kubectl -n cattle-logging-system create secret generic splunk-hec-token --from-literal=splunk_hec_token=<splunk_hec_token>
kubectl -n cattle-logging-system create secret generic splunk-hec-token --from-literal=splunk_hec_token=<splunk_hec_token>

ClusterOutput para Splunk​

Run the following command to ClusterOutput to Splunk. Replace the following attributes with the ones used in your Splunk configuration:

kubectl -n cattle-logging-system apply -f - <<"EOF"
apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterOutput
metadata:
  name: splunk-output
spec:
  splunkHec:
    buffer:
      tags: '[]'
      timekey: <splunk_hec_timekey>
      timekey_use_utc: true
      timekey_wait: 10s
      type: file
    hec_host: <splunk_hec_host>
    hec_port: <splunk_hec_port>
    hec_token:
      valueFrom:
        secretKeyRef:
          key: <secret_key>
          name: splunk-hec-token
    index: <splunk_hec_index>
    insecure_ssl: true
    protocol: <splunk_hec_protocol>
    source: <splunk_hec_source>
    sourcetype: <splunk_hec_source_type>
EOF
kubectl -n cattle-logging-system apply -f - <<"EOF"
apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterOutput
metadata:
  name: splunk-output
spec:
  splunkHec:
    buffer:
      tags: '[]'
      timekey: <splunk_hec_timekey>
      timekey_use_utc: true
      timekey_wait: 10s
      type: file
    hec_host: <splunk_hec_host>
    hec_port: <splunk_hec_port>
    hec_token:
      valueFrom:
        secretKeyRef:
          key: <secret_key>
          name: splunk-hec-token
    index: <splunk_hec_index>
    insecure_ssl: true
    protocol: <splunk_hec_protocol>
    source: <splunk_hec_source>
    sourcetype: <splunk_hec_source_type>
EOF
AtributoDescription
splunk_hec_hostO host de rede da sua instância Splunk.
splunk_hec_portA porta Splunk para comunicação do cliente.
secret_keyA chave segredo com o token Splunk.
splunk_hec_timekey valor em splunkHec.bufferA frequência de saída, ou seja, com que frequência você deseja enviar logs.
protocolO protocolo de URL. Os valores válidos são httpe https.
splunk_hec_indexIdentificador do índice do Splunk a ser usado para indexar eventos.
splunk_hec_sourceO campo de origem para eventos.
splunk_hec_source_typeO tipo de origem para eventos.

ClusterFlow em FluentD​

Run the following command to ClusterFlow in Fluentd:

kubectl -n cattle-logging-system apply -f - <<"EOF"
apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterFlow
metadata:
  name: splunk-flow
  namespace: cattle-logging-system
spec:
  filters:
  - tag_normaliser:
      format: ${namespace_name}/${pod_name}.${container_name}
  globalOutputRefs:
  - splunk-output
  match:
  - select:
      container_names:
      - istio-proxy
      namespaces:
      - istio-system
  - exclude:
      container_names:
      - istio-proxy
      - istio-init
      - aicenter-hit-count-update
      - istio-configure-executor
      - on-prem-tenant-license-update
      - curl
      - recovery
      - aicenter-oob-scheduler
      - cert-trustor
  - 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
kubectl -n cattle-logging-system apply -f - <<"EOF"
apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterFlow
metadata:
  name: splunk-flow
  namespace: cattle-logging-system
spec:
  filters:
  - tag_normaliser:
      format: ${namespace_name}/${pod_name}.${container_name}
  globalOutputRefs:
  - splunk-output
  match:
  - select:
      container_names:
      - istio-proxy
      namespaces:
      - istio-system
  - exclude:
      container_names:
      - istio-proxy
      - istio-init
      - aicenter-hit-count-update
      - istio-configure-executor
      - on-prem-tenant-license-update
      - curl
      - recovery
      - aicenter-oob-scheduler
      - cert-trustor
  - 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
Observação:

Os logs do cluster são coletados e registrados no ClusterOutput.

Configuração do Splunk​

Para configurar o Splunk, siga as seguintes etapas:

  1. Clique em Configurações na barra de navegação superior e, em seguida, selecione Índices.

  2. Clique em Novo índice e em Criar um índice.

  3. Clique em Configurações na barra de navegação superior e, em seguida, selecione Entrada de dados.

  4. Clique em Coletor de evento HTTP

  5. Clique em Configurações Globais para habilitar a criação do novo token.

  6. Habilite e salve as Configurações Globais.

  7. Clique em Novo token para criar o token.

  8. Insira um nome para o Coletor de evento HTTP e clique em Avançar.

  9. Clique em Novo e insira os detalhes de Tipo de origem.

  10. Role para baixo e selecione Índice na lista de índices disponíveis e clique em Avançar na barra de navegação superior.

  11. Verifique os dados e clique em Submeter.

  12. Once created, fetch the details of Token ID,Index,Source,Source Type. You will need these when setting up ClusterOutput.

Como pesquisar no Splunk​

  1. Clique em Pesquisar e Relatar.

  2. Search based on Source,Index, and SourceType.

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte(opens in new window)

Quer aprender? Academia UiPath(opens in new window)

Tem perguntas? Fórum do UiPath(opens in new window)

Fique por dentro das novidades