Hi, thanks for coming back and I am trying to get all this information especially version numbers for Elasticsearch & Kibana but running into space errors. I will get this sorted and revert back.
Thanks
Thanks for your help, I was able to recover my system from low memory for some reason filebeats was logging huge amounts of data to syslog and daemon log files. I reset them and commented the console output commands. Now, it appears to be fine. Filebeats is still logging into syslog file but not in json.
:/etc/filebeat/modules.d# cat suricata.yml
# Module: suricata
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.17/filebeat-module-suricata.html
- module: suricata
# All logs
eve:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
#var.paths:
Service Status of Elk Stack
root@ids1:/etc/filebeat/modules.d# sudo systemctl status filebeat.service
● filebeat.service - Filebeat sends log files to Logstash or directly to Elastic
Loaded: loaded (/lib/systemd/system/filebeat.service; disabled; vendor preset
Active: active (running) since Wed 2022-07-13 11:22:07 BST; 1h 51min ago
Docs: https://www.elastic.co/beats/filebeat
Main PID: 12010 (filebeat)
Tasks: 14 (limit: 4915)
Memory: 385.1M
CGroup: /system.slice/filebeat.service
└─12010 /usr/share/filebeat/bin/filebeat --environment systemd -c /et
Jul 13 13:12:31 ids1 filebeat[12010]: 2022-07-13T13:12:31.652+0100 INFO
Jul 13 13:12:31 ids1 filebeat[12010]: 2022-07-13T13:12:31.652+0100 ERROR
Jul 13 13:12:40 ids1 filebeat[12010]: 2022-07-13T13:12:40.765+0100 INFO
Jul 13 13:13:07 ids1 filebeat[12010]: 2022-07-13T13:13:07.160+0100 ERROR
Jul 13 13:13:07 ids1 filebeat[12010]: 2022-07-13T13:13:07.161+0100 INFO
Jul 13 13:13:07 ids1 filebeat[12010]: 2022-07-13T13:13:07.161+0100 INFO
Jul 13 13:13:07 ids1 filebeat[12010]: 2022-07-13T13:13:07.161+0100 INFO
Jul 13 13:13:07 ids1 filebeat[12010]: 2022-07-13T13:13:07.161+0100 ERROR
Jul 13 13:13:10 ids1 filebeat[12010]: 2022-07-13T13:13:10.764+0100 INFO
Jul 13 13:13:40 ids1 filebeat[12010]: 2022-07-13T13:13:40.764+0100 INFO
lines 1-20/20 (END)
sudo systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; disabled; vendor p
Active: active (running) since Wed 2022-07-13 13:15:55 BST; 1min 56s ago
Docs: https://www.elastic.co
Main PID: 12550 (java)
Tasks: 125 (limit: 4915)
Memory: 5.0G
CGroup: /system.slice/elasticsearch.service
├─12550 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.netwo
└─12750 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86
Jul 13 13:15:45 ids1 systemd[1]: Starting Elasticsearch...
Jul 13 13:15:55 ids1 systemd[1]: Started Elasticsearch.
root@ids1:/etc/filebeat/modules.d# sudo systemctl status kibana.service
● kibana.service - Kibana
Loaded: loaded (/etc/systemd/system/kibana.service; disabled; vendor preset:
Active: active (running) since Wed 2022-07-13 13:16:04 BST; 2min 9s ago
Docs: https://www.elastic.co
Main PID: 12831 (node)
Tasks: 11 (limit: 4915)
Memory: 401.8M
CGroup: /system.slice/kibana.service
└─12831 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/
Jul 13 13:16:04 ids1 systemd[1]: Started Kibana.
I will get the logs from filebeat shortly and share it here.
So it looks like filebeat is harvesting the suricata logs which is good
It also looks like you set the output to console So we're seeing what filebeat is collecting sent to the console which ends up going to the filbeat logs.
So now set the filebeat output back to Elasticsearch and run again and check the filebeat logs.
Also, post your filebeat.yml.
Try to post more of your filebeat logs My suspicion is filebeat is not connecting with elasticsearch.
thanks for your support, please see the filebeats logs from journalctl. I have used grep 'elasticsearch' to reduce. I am happy to share full logs if need be,
Also I have changed the ip address and passwords for security purpose,
FileBeat logs greped
https://pastebin.com/4bNhR8qt
FileBeat.yml (password and ip changed)
###################### 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.
# filestream is an input for collecting log messages from files.
- type: filestream
# Unique ID among all inputs, an ID is required.
id: my-filestream-id
# Change to true to enable this input configuration.
enabled: false
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/*.log
#- c:\programdata\elasticsearch\logs\*
# 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.
#prospector.scanner.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
# ============================== 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: 1
#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` 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: "10.10.10.10: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 output to use when sending the data collected by the beat.
# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["10.10.10.10:9200"]
# Protocol - either `http` (default) or `https`.
#protocol: "https"
# Authentication credentials - either API key or username/password.
#api_key: "id:api_key"
username: "elastic"
password: "changedpassword"
#output.console:
# pretty: true
# ------------------------------ Logstash Output -------------------------------
#output.logstash:
# The Logstash hosts
#hosts: ["localhost:5044"]
# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
# ================================= Processors =================================
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
# ================================== Logging ===================================
# Sets log level. The default log level is info.
# Available log levels are: 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",
# "publisher", "service".
#logging.selectors: ["*"]
# ============================= X-Pack 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.
#monitoring.enabled: false
# Sets the UUID of the Elasticsearch cluster under which monitoring data for this
# Filebeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
#monitoring.cluster_uuid:
# Uncomment to send the metrics to Elasticsearch. Most settings from the
# Elasticsearch output are accepted here as well.
# Note that the settings should point to your Elasticsearch *monitoring* cluster.
# Any setting that is not set is automatically inherited from the Elasticsearch
# output configuration, so if you have the Elasticsearch output configured such
# that it is pointing to your Elasticsearch monitoring cluster, you can simply
# uncomment the following line.
#monitoring.elasticsearch:
# ============================== Instrumentation ===============================
# Instrumentation support for the filebeat.
#instrumentation:
# Set to true to enable instrumentation of filebeat.
#enabled: false
# Environment in which filebeat is running on (eg: staging, production, etc.)
#environment: ""
# APM Server hosts to report instrumentation results to.
#hosts:
# - http://localhost:8200
# API Key for the APM Server(s).
# If api_key is set then secret_token will be ignored.
#api_key:
# Secret token for the APM Server(s).
#secret_token:
# ================================= Migration ==================================
# This allows to enable 6.7 migration aliases
#migration.6_to_7.enabled: true
Filebeat can not connect to elasticsearch so you have a network issue or you did not bind elasticsearch to the network.. or both...
Jul 13 13:16:15 ids1 filebeat[12010]: 2022-07-13T13:16:15.475+0100 ERROR [publisher_pipeline_output] pipeline/output.go:154 Failed to connect to backoff(elasticsearch(http://10.10.10.10:9200)): Get "http://10.10.10.10:9200": dial tcp 10.10.10.10:9200: connect: connection refused
I looked at your article in your /etc/elasticsearch/elasticsearch.yml I see the instructions I would set.
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 0.0.0.0 <!--- Here
# network.bind_host: ["127.0.0.1", "your_private_ip"] <!-- Comment Back Out
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
...
discovery.type: single-node
xpack.security.enabled: true
Next try to curl from your filebeat server to elasticsearch server you should get a happy response from this.
hello, thanks.
I can see all the logs are coming in the system.
I was wondering what I was doing wrong previously.
Thank you very much for your help.
Regards
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.