Logging now working

I am trying to enable logging in a filebeat pod and the filebeat setings are as below

apiVersion: v1
kind: ConfigMap
metadata:
  name: filebeat-config
  namespace: "{{ namespace }}"
  labels:
    k8s-app: filebeat
data:
  filebeat.yml: |-
    filebeat.config:
      inputs:
        # Mounted `filebeat-inputs` configmap:
        path: ${path.config}/inputs.d/*.yml
        # Reload inputs configs as they change:
        reload.enabled: false
      modules:
        path: ${path.config}/modules.d/*.yml
        # Reload module configs as they change:
        reload.enabled: false

    # To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this:
    #filebeat.autodiscover:
    #  providers:
    #    - type: kubernetes
    #      hints.enabled: true

    processors:
      - add_cloud_metadata:

    cloud.id: ${ELASTIC_CLOUD_ID}
    cloud.auth: ${ELASTIC_CLOUD_AUTH}

    output.elasticsearch:
      hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
      protocol: "https"
      username: ${ELASTICSEARCH_USERNAME}
      password: ${ELASTICSEARCH_PASSWORD}
      index: "filebeat-openshift-%{[agent.version]}-%{+yyyy.MM.dd}"
    setup.template.name: "filebeat-openshift"
    setup.template.pattern: "filebeat-openshift-*"
    setup.template.overwrite: true
    setup.template.enabled: true

    logging.level: info
    logging.to_files: true
    logging.files:
      path: /usr/share/filebeat/logs
      name: filebeat
      keepfiles: 7
      permissions: 0644

but when I log into the pod and check /usr/share/filebeat/logs there are no logs created.
I am trying to get logs enabled to troubleshoot index loading

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.