Elastic Beats


Error

You must log in or register to view this page

Elastic Beats is an open source platform for single-purpose data shippers. It is a solution for sending data from hundreds or thousands of machines and systems to Logstash or Elasticsearch.

  • Elastic Filebeat is a lightweight shipper for forwarding and centralizing log data. Installed as an agent on your servers, Filebeat monitors the log files or locations that you specify, collects log events, and forwards them to Elasticsearch or Logstash for indexing.
  • Elastic Metricbeat is a monitoring tool.
  • Elastic Winlogbeat ships Windows event logs to Elasticsearch or Logstash.

Software pattern summary

The following table gives an overview of the pattern characteristics:

Product component

OS type

Versioning

Pattern depth

ElasticAuditbeatUNIX, WindowsActive, PackageInstance-based
Filebeat AgentUNIXActive, Package, PathInstance-based
Filebeat AgentWindowsActive, PathInstance-based
ElasticHeartbeat

UNIX, Windows

Active

Instance-based

ElasticPacketbeatUNIX, WindowsActive, Package, PathInstance-based
    

Platforms supported by the pattern

The pattern discovers Elastic Beats deployments on the UNIX and Windows systems.

Identification

To run a discovery of the product, the pattern must be triggered. This section describes conditions under which the pattern can be triggered.

Software instance triggers

The following table gives details about the pattern trigger:

Pattern

Trigger node

Attribute

Condition

Argument

ElasticAuditbeatDiscoveredProcesscmdmatchesregex '\bauditbeat$'
or
cmdmatchesregex '(?i)\bauditbeat\.exe$'
Filebeat AgentDiscoveredProcesscmdmatchesregex '\bfilebeat(?:-god)?$'
or
cmdmatchesregex '(?i)\bfilebeat\.exe$'
ElasticHeartbeat

DiscoveredProcess

cmd

matches

regex '\bhearbeat$'
or
cmdmatchesregex '(?i)\bhearbeat\.exe$'
Elastic MetricbeatDiscoveredProcesscmdmatchesregex '(?i)\bmetricbeat(?:\d+)?\.exe$'
ElasticPacketbeatDiscoveredProcesscmdmatchesregex '\bpacketbeat$'
or
cmdmatchesregex '(?i)\bpacketbeat\.exe$'
ElasticWinlogbeatDiscoveredProcesscmdmatchesregex '(?i)\bwinlogbeat(?:\d+)?\.exe$'

Software Instance type attributes

The pattern in this module sets the following attribute:

Pattern name

SI type

ElasticAuditbeatElastic Auditbeat
ElasticFilebeatElastic Filebeat
ElasticHeartbeatElastic Heartbeat
ElasticMetricbeatElastic Metricbeat
ElasticPacketbeatElastic Packetbeat
ElasticWinlogbeatElastic Winlogbeat

SoftwareInstance attributes

The Winlogbeat pattern creates a SoftwareInstance with a set of attributes.

Default attributes

The Winlogbeat pattern creates the following default attributes:

  • name
  • short_name
  • version
  • product_version

Optional attribute

The Winlogbeat pattern obtains the install root from the path to the trigger process:

  • install_root

Additional attribute

The Winlogbeat pattern obtains the data path from the path.data option of the trigger process.

  • data_path

Simple identification mappings

The following components/processes are identified by using the simple identity mappings that map the product's known processes:

Name

Command

Elastic Auditbeatregex '\bauditbeat$'
Elastic Auditbeatregex '(?i)\bauditbeat\.exe$'
Elastic Filebeatregex '\bfilebeat$'
Elastic Filebeat Go daemonregex '\bfilebeat-god$'
Elastic Filebeatregex '(?i)\bfilebeat\.exe$'
Elastic Heartbeatregex '\bheartbeat$'
Elastic Heartbeatregex '(?i)\bheartbeat\.exe$'
Elastic Metricbeatregex '\bmetricbeat$'
Elastic Metricbeatregex '(?i)\bmetricbeat\.exe$'
Elastic Packetbeatregex '\bpacketbeat$'
Elastic Packetbeatregex '(?i)\bpacketbeat\.exe$'
Elastic Winlogbeatregex '(?i)\bwinlogbeat(?:\d+)?\.exe$'

Versioning

Version information for the product is collected by using one of the following methods: active versioning, package versioning, and path versioning.

The methods are tried in the order of precedence based on the likely success and accuracy of the information that can be gathered. After a result is obtained, the methods that are lower in precedence are not attempted.

In order of precedence, the methods are used as follows:

Instance

The ElasticHeartbeat pattern gets the instance name from the configuration file.

Installation root

The ElasticHeartbeat pattern gets the installation root from the trigger process by parsing against one of the following regular expressions:

  • (?i)^(.+)[\\/]heartbeat(?:\.exe)?$
  • \-\-path\.home\s['\"]?([\w\:\s\\/]+)['\"]?

Active versioning

The ElasticAuditbeat, ElasticHeartbeat and ElasticPacketbeat patterns attempt to extract the version from the output of the following command:

<process_cmd> version

by parsing against the following regular expression:

(\d+(?:\.\d+)*)

The Filebeat Agent pattern runs <process_cmd> version. Then, the pattern extracts a version from its results by parsing against one of the following regular expressions:

Software\sVersion:-\s*0?(\d+):0?(\d+):0?(\d+)
filebeat\sversion\s(\d+(?:\.\d+)*)

The Winlogbeat pattern runs the following command:

<install root>\winlogbeat.exe version

Then, the Winlogbeat pattern extracts the full version from the results by using the following regular expression:

winlogbeat version (\d+(?:\.\d+)+)

The Metricbeat pattern runs the following command:

<install root>/metricbeat -c <yml_filename> version

Then, the Metricbeat pattern obtains the install root and the path to the .yml file from the trigger process. If the pattern cannot obtain the path to the yml_filename, it runs the following command:

<install root>/metricbeat version

Package Versioning

The ElasticAuditbeat and ElasticPacketbeat patterns attempt to extract the version from a package by matching on the following regular expression:

PatternRegular Expression
ElasticAuditbeatregex "^auditbeat$"
ElasticFilebeatregex "^filebeat$"
ElasticMetricbeatregex "metricbeat"
ElasticPacketbeatregex "^packetbeat$"

Path Versioning

The Filebeat Agent pattern supports path versioning.

The path regex functionality allows a regular expression to be applied against the process command line to derive a version number from the command path or arguments.

Versioning is performed by reading information within the command-line path by using the following regular expression:

[\\/]filebeat\-(\d+(?:\.\d+)*)

The ElasticPacketbeat pattern attempts to extract the version from the trigger process path by matching against the following regular expression:

  • regex "Elastic\\Beats\\(\d+(?:\.\d+)*)\\packetbeat"

If all previous attempts have failed, the Metricbeat pattern tries to get a  version from process cmd by using the following regex:

metricbeat(\d+(?:\.\d+)*)

If active versioning fails, the Winlogbeat pattern attempts to extract the version from the trigger process leafname by using the following regular expression:

winlogbeat(\d+(?:\.\d+)*)\.exe$

If the regex returns version 32 or 64, these are discarded as relating to the processor architecture.

Application model

If the pattern discovers a SoftwareInstance of Elastic Beats, it defines the software instance's architecture in the form of the application model.

Pattern trigger

The ElasticAuditbeat pattern is triggered by a auditbeat or auditbeat.exe process.

The ElasticHeartbeat pattern is triggered by a heartbeat or heartbeat.exe process.

The ElasticPacketbeat pattern is triggered by a packetbeat or packetbeat.exe process.

SI depth

The ElasticAuditbeat pattern creates an instance-based software instance with the key based on the config file (if available), type, and host key.

The Filebeat Agent pattern creates an instance-based SoftwareInstance with a key based on the type and the host key.

The ElasticHeartbeat pattern creates an instance-based software instance with the key based on the instance name (if available), config file (if available), type, and host key.

The Metricbeat pattern creates an instance-based SoftwareInstance with the key based on the yml_filename, type, and host key. The type is Elastic Metricbeat.

The ElasticPacketbeat pattern creates an instance-based software instance with the key based on the type and host key.

The ElasticWinlogbeat pattern creates an instance-based SoftwareInstance with the key based on the data path, type, and host key. Elastic Winlogbeat is the type.

Relationship creation

The Filebeat Agent pattern attempts to create a dependency link with Elasticsearch, Kafka, and Logstash.

The ElasticHeartbeat pattern attempts to create a dependency relationship between Elastic Heartbeat and Elastic Kibana.

The ElasticHeartbeat pattern attempts to create a dependency relationship between Elastic Heartbeat and Elasticsearch.

The metricbeat pattern obtains details of the linked SI from the metricbeat.yml file. The links that the pattern creates are the following:

SI type

metricbeat.yml file parsing

Search for

setup.kibana:

    host: "<hostname>:<port>"

Search for

output.elasticsearch:

    hosts: ["https://<hostname>:<port>"]

The pattern creates a client-server link. The Metricbeat Software Instance is the client.

Subject matter expertise

Inputs from subject matter experts are welcome on any other potential approaches not discussed in this topic.

Testing

The pattern has been tested against the available customer data.

Open issues

There are no known open issues with this pattern.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Discovery content reference