System module and Nginx module dashboard

Hello Team,

I have enabled the system module and nginx module for filebeat. I am getting the logs on kibana dashboard from both the modules. But when i am check the filebeat dashboard for nginx and syslog no data is available on the dashboard.

I have enable the filebeat prospector as well in filebeat.yml because we are sending our arbitrary application logs on kibana using it.

Can you please help to to troubleshoot the issue.

Please refer the below screenshots for nginx module logs on kibana:-

Screenshot for blank filebeat nginx dashboard:-

Please find my filebeat.yml config file:-

###################### 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.
#
#=========================== Filebeat prospectors =============================

filebeat.prospectors:

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

- type: log

  # Change to true to enable this prospector configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
#    - /var/log/*.log
    - /var/apps/mobilock/shared/log/production.log

    #- c:\programdata\elasticsearch\logs\*
  exclude_lines: ['^.*health.*$']
  document_type: syslog

  # 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 fields can be freely picked
  # to add additional information to the crawled log files for filtering
  #fields:
  #  level: debug
  #  review: 1

  ### Multiline options

  # Mutiline 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
  multiline.pattern: '[A-Z]{1}, \[[0-9]{4}-[0-9]{2}-[0-9]{2}'
  multiline.negate: true
  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: true

  # 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"

#============================= 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 output to use when sending the data collected by the beat.

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

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

#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["xyz:5044"]
  bulk_max_size: 1024

  # Optional SSL. By default is off.
  # List of root certificates for HTTPS server verifications
  #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  ssl.certificate_authorities: ["/etc/pki/tls/ca.crt"]
  ssl.certificate: "/etc/pki/tls/client.crt"
  ssl.key: "/etc/pki/tls/client.key"
  ssl.key_passphrase: "ky9D=h=w2z2uUCjRqqWF"

Any assistance will be appreciated.

Thanks.

It seems to me that the logs you are forwarding cannot be parsed by the Ingest pipeline of the Filebeat module.
Could you please share a few example logs you are forwarding?
What version of nginx are you running?

Hello Noemi,

Thank you for your information. Please find the requested details:-

::ffff:10.137..16.80 - - [07/Sep/2018:03:15:59 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
10.13.15.18 - - [07/Sep/2018:03:15:59 +0000] "GET /health-status HTTP/1.0" 200 0 "-" "-"
10.13.15.19 - - [07/Sep/2018:03:15:59 +0000] "GET /health-status HTTP/1.0" 200 0 "-" "-"
10.13.15.18 - - [07/Sep/2018:03:15:59 +0000] "GET /health-status HTTP/1.0" 200 0 "-" "-"
::ffff:7.24.47.3 - - [07/Sep/2018:03:15:59 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:12.12.25.189 - - [07/Sep/2018:03:15:59 +0000] "POST /api/v1/devices/71501f381ae9a980/data_usages/create_v2.json HTTP/1.1" 200 5 "-" "okhttp/3.2.0"
::ffff:1.44.10.45 - - [07/Sep/2018:03:15:59 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:98.12.17.52 - - [07/Sep/2018:03:15:59 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:42.200.210.58 - - [07/Sep/2018:03:15:59 +0000] "GET /api/v1/devices/settings_v2.json HTTP/1.1" 200 9959 "-" "okhttp/3.2.0"
::ffff:11.14.4.6 - - [07/Sep/2018:03:15:59 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:15.12.0.84 - - [07/Sep/2018:03:15:58 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:13.20.208.48 - - [07/Sep/2018:03:15:58 +0000] "GET /api/v1/devices/settings_v2.json HTTP/1.1" 200 12700 "-" "okhttp/3.2.0"
::ffff:96.8.174.49 - - [07/Sep/2018:03:15:58 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:14.0.15.57 - - [07/Sep/2018:03:15:58 +0000] "GET /status.json HTTP/1.1" 200 254 "-" "okhttp/3.2.0"
::ffff:15.28.21.33 - - [07/Sep/2018:03:15:58 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:16.27.97.124 - - [07/Sep/2018:03:15:58 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
::ffff:69.246.71.165 - - [07/Sep/2018:03:15:58 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
2607:fea8:4a0:675:a524:d5b9:ffdf:8689 - - [07/Sep/2018:03:15:58 +0000] "PUT /api/v1/devices/ping.json HTTP/1.1" 200 31 "-" "okhttp/3.2.0"
root@xyz:~# nginx -v
nginx version: nginx/1.14.0

I am facing same issue with filebeat system module also. Please find the sample logs for syslog:-

Sep  7 04:07:50 stl redis-server[1523]: 1523:M 07 Sep 04:07:50.197 * Background saving terminated with success
Sep  7 04:07:50 stl redis-server[1523]: 2524:C 07 Sep 04:07:50.115 * RDB: 0 MB of memory used by copy-on-write
Sep  7 04:07:50 stl redis-server[1523]: 2524:C 07 Sep 04:07:50.114 * DB saved on disk
Sep  7 04:07:50 stl redis-server[1523]: 1523:M 07 Sep 04:07:50.096 * Background saving started by pid 2524
Sep  7 04:07:50 stl redis-server[1523]: 1523:M 07 Sep 04:07:50.096 * 10 changes in 300 seconds. Saving...
Sep  7 04:07:21 stl nrpe[2502]: Connection from 10.133.4.106 closed.
Sep  7 02:54:31 stl nrpe[30525]: Connection from 10.133.4.106 port 11909
Sep  7 02:54:31 stl nrpe[30525]: CONN_CHECK_PEER: checking if host is allowed: 10.133.4.106 port 11909
Sep  7 02:53:59 stl nrpe[30505]: Connection from 10.133.4.106 closed.
Sep  7 02:53:59 stl nrpe[30505]: Return Code: 0, Output: OK: Free memory percentage is 52% ( free 1049 MiB out of 2000 MiB)| RAM Free=52%;80;85;0;100
Sep  7 02:53:59 stl nrpe[30505]: Command completed with return code 0 and output: OK: Free memory percentage is 52% ( free 1049 MiB out of 2000 MiB)| RAM Free=52%;80;85;0;100

Please help me to troubleshoot the issue.

The version of nginx you are using is not supported yet. See: https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-nginx.html#_compatibility_15
Is this the default log format for nginx 1.14? If yes, do you mind opening an issue on Github and share your example logs, so we can add support for 1.14? https://github.com/elastic/beats/issues/new

Regarding the system/syslog module problem, I was not able to reproduce the parsing errors. The log lines you provided can be parsed using the pipeline of the fileset. Could you please share concrete error logs you see in Kibana in case of syslog events?

Hello Noemi,

Thank you for your response.

Let me confirm whether these are default logs or not for nginx1.14. Once i am sure i will open issue on Github.

For syslog the logs are coming on Kibana dashboard via system module. But logs are not available in Syslog Dashboard. Please refer the below screenshot:

Blank syslog dashboard for filebeat:-

I am not seeing any error on kibana dashboard. May be i am seeing at wrong place. Can you please tell me where i can find these error logs so i can share with you.

Thanks.

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