Filebeat 7.17 unable to send logs to logstash on FedoraCoreOS

Hi Guys i am troubleshooting a filebeat issue on FedoraCoreOS that we have been using as the operating system for OKD deployment (Free version of openshift) i have noticed a strange issue that i have not experienced with 6.8 that we have been using so far in which when the output on filebeat is set to logstash the harvester doesnt seem to start but it does attempt to connect and start when setting the output to Elasticsearch directly, config file and output of filebeat -e is below

###################### Filebeat Configuration Example #########################

# This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html

# For more available modules and options, please see the filebeat.reference.yml sample
# configuration file.

#=========================== Filebeat inputs =============================

filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

# syslog input
- type: log
  paths:
    - /var/log/messages
    - /var/log/syslog
    - /var/log/secure
    - /var/log/auth.log
    - /var/log/cron
    - /var/log/kern.log
    - /var/log/fail2ban.log
  fields:
    type: syslog
  fields_under_root: true

# salt logs
- type: log
  paths:
    - /var/log/salt/
  fields:
    type: salt
  fields_under_root: true

# elasticsearch input
- type: log
  paths:
    - /var/log/elasticsearch/custom_company_location_*.log
  fields:
    type: elasticsearch
  fields_under_root: true
  multiline.pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}'
  multiline.negate: true
  multiline.match: after

# php-fpm input
- type: log
  paths:
    - /var/log/php-fpm/error.log
  fields:
    type: php-fpm
  fields_under_root: true

# application input
- type: log

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /var/log/custom_company_location/api/1.1/app.log
    - /var/log/custom_company_location/queue/1.0/app.log
    - /var/log/custom_company_location/cron/1.0/app.log
    - /opt/app-root/log/app.log
  fields:
    type: php
  fields_under_root: true







# mongod input
- type: log
  paths:
    - /var/log/mongodb/mongod.log
    - /var/log/mongo/mongod.log
    - /var/log/mongodb/mongod-config.log
    - /var/log/mongodb/mongos*.log
  fields:
  fields_under_root: true

  #exclude_lines: [".*Client connecting with server's own TLS certificate*"]
  exclude_lines: [".*Client connecting with server's own TLS certificate*", ".*Refreshed RWC defaults*"]


# nginx input
- type: log
  paths:
    - /var/log/nginx/*error.log
  fields:
    type: nginx
  fields_under_root: true
  multiline.pattern: '^[[:digit:]]{4}/[[:digit:]]{2}/[[:digit:]]{2}'
  multiline.negate: true
  multiline.match: after
# Exclude lines. A list of regular expressions to match. It drops the lines that are
  # matching any regular expression from the list.
  #exclude_lines: ["^DBG"]

  # Include lines. A list of regular expressions to match. It exports the lines that are
  # matching any regular expression from the list.
  #include_lines: ["^ERR", "^WARN"]

  # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  # are matching any regular expression from the list. By default, no files are dropped.
  #exclude_files: [".gz$"]

  # Optional additional fields. These field can be freely picked
  # to add additional information to the crawled log files for filtering
  #fields:
  #  level: debug
  #  review: 1

  ### Multiline options

  # Multiline can be used for log messages spanning multiple lines. This is common
  # for Java Stack Traces or C-Line Continuation

  # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  #multiline.pattern: ^\[

  # Defines if the pattern set under pattern should be negated or not. Default is false.
  #multiline.negate: false

  # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  #multiline.match: after

#============================= Filebeat modules ===============================

filebeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: false

  # Period on which files under path should be checked for changes
  #reload.period: 10s

#==================== Elasticsearch template setting ==========================

#setup.template.settings:
  #index.number_of_shards: 3
  #index.codec: best_compression
  #_source.enabled: false

#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
#  env: staging

#============================== Dashboards =====================================
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here, or by using the `-setup` CLI flag or the `setup` command.
#setup.dashboards.enabled: false

# The URL from where to download the dashboards archive. By default this URL
# has a value which is computed based on the Beat name and version. For released
# versions, this URL points to the dashboard archive on the artifacts.elastic.co
# website.
#setup.dashboards.url:

#============================== Kibana =====================================

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
#setup.kibana:

  # Kibana Host
  # Scheme and port can be left out and will be set to the default (http and 5601)
  # In case you specify and additional path, the scheme is required: http://localhost:5601/path
  # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
  #host: "localhost:5601"

  # Kibana Space ID
  # ID of the Kibana Space into which the dashboards should be loaded. By default,
  # the Default Space will be used.
  #space.id:

#============================= Elastic Cloud ==================================

# These settings simplify using filebeat with the Elastic Cloud (https://cloud.elastic.co/).

# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
# `setup.kibana.host` options.
# You can find the `cloud.id` in the Elastic Cloud web UI.
#cloud.id:

# The cloud.auth setting overwrites the `output.elasticsearch.username` and
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
#cloud.auth:

#================================ Outputs =====================================

# Configure what outputs to use when sending the data collected by the beat.
# Multiple outputs may be used.

#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:
  # Array of hosts to connect to.
  #hosts: ["server76.domain.com:9200"]

  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["server509.domain.com:5044", "server510.domain.com:5044", "server511.domain.com:5044"]
  loadbalance: true

  # Optional SSL. By default is off.
  # List of root certificates for HTTPS server verifications
  #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  ssl:
    verification_mode: "none"
    # Certificate for SSL client authentication
    certificate: "/etc/ssl/any.domain.com.crt"

    # Client Certificate Key
    key: "/etc/ssl/any.domain.com.key"

#================================ Logging =====================================

# Sets log level. The default log level is info.
# Available log levels are: critical, error, warning, info, debug
#logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]

#============================== Xpack Monitoring ===============================
# filebeat can export internal metrics to a central Elasticsearch monitoring
# cluster.  This requires xpack monitoring to be enabled in Elasticsearch.  The
# reporting is disabled by default.

# Set to true to enable the monitoring reporter.
#xpack.monitoring.enabled: false

# Uncomment to send the metrics to Elasticsearch. Most settings from the
# Elasticsearch output are accepted here as well. Any setting that is not set is
# automatically inherited from the Elasticsearch output configuration, so if you
# have the Elasticsearch output configured, you can simply uncomment the
# following line.
#xpack.monitoring.elasticsearch:

And this is the output of filebeat -e in this setup

2024-07-03T08:20:22.142+0200    INFO    instance/beat.go:292    Setup Beat: filebeat; Version: 7.17.12
2024-07-03T08:20:22.142+0200    WARN    [cfgwarn]       tlscommon/config.go:100 DEPRECATED: Treating the CommonName field on X.509 certificates as a host name when no Subject Alternative Names are present is going to be removed. Please update your certificates if needed. Will be removed in version: 8.0.0
2024-07-03T08:20:22.143+0200    INFO    [publisher]     pipeline/module.go:113  Beat name: server1113.finderly.com
2024-07-03T08:20:22.143+0200    WARN    beater/filebeat.go:202  Filebeat is unable to load the ingest pipelines for the configured modules because the Elasticsearch output is not configured/enabled. If you have already loaded the ingest pipelines or are using Logstash pipelines, you can ignore this warning.
2024-07-03T08:20:22.143+0200    INFO    instance/beat.go:457    filebeat start running.
2024-07-03T08:20:22.143+0200    INFO    [monitoring]    log/log.go:142  Starting metrics logging every 30s
2024-07-03T08:20:22.144+0200    INFO    memlog/store.go:119     Loading data file of '/var/lib/filebeat/registry/filebeat' succeeded. Active transaction id=1
2024-07-03T08:20:22.144+0200    INFO    memlog/store.go:124     Finished loading transaction log file for '/var/lib/filebeat/registry/filebeat'. Active transaction id=1
2024-07-03T08:20:22.144+0200    WARN    beater/filebeat.go:411  Filebeat is unable to load the ingest pipelines for the configured modules because the Elasticsearch output is not configured/enabled. If you have already loaded the ingest pipelines or are using Logstash pipelines, you can ignore this warning.
2024-07-03T08:20:22.144+0200    INFO    [registrar]     registrar/registrar.go:109      States Loaded from registrar: 0
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:71    Loading Inputs: 7
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:117   starting input, keys present on the config: [filebeat.inputs.0.fields.type filebeat.inputs.0.fields_under_root filebeat.inputs.0.paths.0 filebeat.inputs.0.paths.1 filebeat.inputs.0.paths.2 filebeat.inputs.0.paths.3 filebeat.inputs.0.paths.4 filebeat.inputs.0.paths.5 filebeat.inputs.0.paths.6 filebeat.inputs.0.type]
2024-07-03T08:20:22.144+0200    WARN    [cfgwarn]       log/input.go:89 DEPRECATED: Log input. Use Filestream input instead.
2024-07-03T08:20:22.144+0200    INFO    [input] log/input.go:171        Configured paths: [/var/log/messages /var/log/syslog /var/log/secure /var/log/auth.log /var/log/cron /var/log/kern.log /var/log/fail2ban.log]   {"input_id": "e539372d-b92c-4f98-8908-6c9859aec41a"}
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:148   Starting input (ID: 491256334408846613)
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:117   starting input, keys present on the config: [filebeat.inputs.1.fields.type filebeat.inputs.1.fields_under_root filebeat.inputs.1.paths.0 filebeat.inputs.1.type]
2024-07-03T08:20:22.144+0200    INFO    [input] log/input.go:171        Configured paths: [/var/log/salt]       {"input_id": "be4a4504-8684-43b3-9f14-49c561e7b258"}
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:148   Starting input (ID: 3467850540037532291)
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:117   starting input, keys present on the config: [filebeat.inputs.2.fields.type filebeat.inputs.2.fields_under_root filebeat.inputs.2.multiline.match filebeat.inputs.2.multiline.negate filebeat.inputs.2.multiline.pattern filebeat.inputs.2.paths.0 filebeat.inputs.2.type]
2024-07-03T08:20:22.144+0200    INFO    [input] log/input.go:171        Configured paths: [/var/log/elasticsearch/shpock_*.log] {"input_id": "42ec57f2-04ac-4a98-b52b-916c579f35a6"}
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:148   Starting input (ID: 12006132445697640109)
2024-07-03T08:20:22.144+0200    INFO    [crawler]       beater/crawler.go:117   starting input, keys present on the config: [filebeat.inputs.3.fields.type filebeat.inputs.3.fields_under_root filebeat.inputs.3.paths.0 filebeat.inputs.3.type]
2024-07-03T08:20:22.145+0200    INFO    [input] log/input.go:171        Configured paths: [/var/log/php-fpm/error.log]  {"input_id": "58de7c20-630b-4bff-9f99-42402a9e27a6"}
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:148   Starting input (ID: 9719945833334904770)
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:117   starting input, keys present on the config: [filebeat.inputs.4.fields.type filebeat.inputs.4.fields_under_root filebeat.inputs.4.paths.0 filebeat.inputs.4.paths.1 filebeat.inputs.4.paths.2 filebeat.inputs.4.paths.3 filebeat.inputs.4.type]
2024-07-03T08:20:22.145+0200    INFO    [input] log/input.go:171        Configured paths: [/var/log/custom_company_location/api/1.1/app.log /var/log/custom_company_location/queue/1.0/app.log /var/log/custom_company_location/cron/1.0/app.log /opt/app-root/log/app.log]        {"input_id": "0906d34d-7a73-4bb1-bdba-3698f74efaeb"}
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:148   Starting input (ID: 12887282010394141130)
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:117   starting input, keys present on the config: [filebeat.inputs.5.exclude_lines.0 filebeat.inputs.5.exclude_lines.1 filebeat.inputs.5.fields_under_root filebeat.inputs.5.paths.0 filebeat.inputs.5.paths.1 filebeat.inputs.5.paths.2 filebeat.inputs.5.paths.3 filebeat.inputs.5.type]
2024-07-03T08:20:22.145+0200    INFO    [input] log/input.go:171        Configured paths: [/var/log/mongodb/mongod.log /var/log/mongo/mongod.log /var/log/mongodb/mongod-config.log /var/log/mongodb/mongos*.log]       {"input_id": "b26fc4d3-b0e5-4cba-9e40-1c5dc0acef43"}
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:148   Starting input (ID: 3945498069398597451)
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:117   starting input, keys present on the config: [filebeat.inputs.6.fields.type filebeat.inputs.6.fields_under_root filebeat.inputs.6.multiline.match filebeat.inputs.6.multiline.negate filebeat.inputs.6.multiline.pattern filebeat.inputs.6.paths.0 filebeat.inputs.6.type]
2024-07-03T08:20:22.145+0200    INFO    [input] log/input.go:171        Configured paths: [/var/log/nginx/*error.log]   {"input_id": "c9fb5345-1291-42b8-af79-cd0054d83883"}
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:148   Starting input (ID: 9538249257552554528)
2024-07-03T08:20:22.145+0200    INFO    [crawler]       beater/crawler.go:106   Loading and starting Inputs completed. Enabled inputs: 7
2024-07-03T08:20:22.145+0200    INFO    cfgfile/reload.go:164   Config reloader started
2024-07-03T08:20:22.145+0200    INFO    cfgfile/reload.go:224   Loading of config files completed.
2024-07-03T08:20:52.153+0200    INFO    [monitoring]    log/log.go:184  Non-zero metrics in the last 30s        {"monitoring": {"metrics": {"beat":{"cgroup":{"cpu":{"id":"session-3180.scope"},"memory":{"id":"session-3180.scope","mem":{"usage":{"bytes":45522944}}}},"cpu":{"system":{"ticks":10,"time":{"ms":13}},"total":{"ticks":110,"time":{"ms":117},"value":110},"user":{"ticks":100,"time":{"ms":104}}},"handles":{"limit":{"hard":524288,"soft":524288},"open":10},"info":{"ephemeral_id":"12350372-c505-44a5-9a1e-d839a02cd022","uptime":{"ms":30040},"version":"7.17.12"},"memstats":{"gc_next":18921416,"memory_alloc":12167144,"memory_sys":42382600,"memory_total":57596408,"rss":102854656},"runtime":{"goroutines":69}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0},"reloads":1,"scans":1},"output":{"events":{"active":0},"type":"logstash"},"pipeline":{"clients":7,"events":{"active":0},"queue":{"max_events":4096}}},"registrar":{"states":{"current":0}},"system":{"cpu":{"cores":8},"load":{"1":0.65,"15":0.6,"5":0.56,"norm":{"1":0.0813,"15":0.075,"5":0.07}}}}}}

and from that point on it just starts loading metrics to stdout without even attempting to send any data, for reference both Logstash and ES are on 7.17 we are in the process of upgrading beats, now my question is do i need to first setup the pipelines using filebeat setup command directly to elasticsearch before i re-point it to logstash, and if is there an option of avoding that in any way as we are already running custom pipelines via logstash. Any help would be appreciated.

Removed #elastic-cloud

Removed docker, #elastic-cloud

Hi Guys managed to figure out the issue and it was a problem with the inputs, as fedoraCoreos stores the logs in /var/log//.log after making the change it started working, this can be marked as closed.