Filebeat harvesting only its own logs not other service on Nomad Cluster

I have filebeat running on Nomad cluster. It is only sending its own logs to the central server. There are other services running too but its unable to harvest their logs. Can anyone suggest what could be the problem?
This is my filebeat.yml

job "filebeat" {
  datacenters = ["dc"]

  type = "system"
  update {
    min_healthy_time = "10s"
    healthy_deadline = "5m"
    progress_deadline = "10m"
    auto_revert = true
  }
  
  group "monitoring" {
    task "filebeat" {
      driver = "docker"

      config {
        image = "docker.elastic.co/beats/filebeat:7.10.2"
        args = [
          "-c", "/local/filebeat.yml",
          "--path.data", "/alloc/data/filebeat",
          "--path.logs", "/alloc/logs",
        ]
        mount {
          type     = "bind"
          source   = "local/filebeat.yml"
          target   = "/usr/share/filebeat/filebeat.yml"
          readonly = true  
        }
      } 
      template {
        data = <<template
  filebeat.inputs:
    - paths:
        - /alloc/logs/*stdout.[0-9]*
#      exclude_files: ['\.fifo$']  
      type: log
      scan_frequency: 1m
#      fields_under_root: true
#      fields:
#        app: ${NOMAD_JOB_NAME}
    
    - paths:
        - /alloc/logs/*stderr.[0-9]*
#      exclude_files: ['\.fifo$']  
      type: log
      scan_frequency: 1m
#      fields_under_root: true
#      fields:
#        app: ${NOMAD_JOB_NAME}
    
    - paths:
        - /alloc/logs/filebeat
#      exclude_files: ['\.fifo$']  
      type: log
      scan_frequency: 1m
#      fields_under_root: true
#      fields:
#        app: ${NOMAD_JOB_NAME}
      
      encoding: utf-8    
      backoff: 1s
      close_eof: false
      close_inactive: 5m
      close_removed: true

      filebeat.registry.path: ${path.data}/registry
      filebeat.registry.file_permissions: 0600
      filebeat.registry.flush: 0s

  output.logstash:
    hosts: ["IP:5044"]

  logging.level: debug
    
      template
      destination = "local/filebeat.yml"
      } 
    }
  }
}

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