<commit_before>[[filebeat-getting-started]]
== Getting Started

To get started with your own Filebeat setup, install and configure these related products:

 * Elasticsearch for storage and indexing the data. {libbeat}/getting-started.html#elasticsearch-installation[More details]
 * Kibana for the UI. {libbeat}/getting-started.html#kibana-installation[More details]
 * Optionally Logstash for inserting data into Elasticsearch. {libbeat}/getting-started.html#logstash-installation[More details]

After you have installed these products, you can start <<filebeat-installation>>.

[[filebeat-installation]]
=== Installing Filebeat

To download and install Filebeat, run the following commands. Use the commands that
work with your system (deb for Debian/Ubuntu, rpm for Redhat/Centos/Fedora, mac for OS X).

deb:

["source","sh",subs="attributes,callouts"]
------------------------------------------------
curl -L -O https://download.elastic.co/beats/filebeat/filebeat_{version}_amd64.deb
sudo dpkg -i filebeat_{version}_amd64.deb
------------------------------------------------



rpm:

["source","sh",subs="attributes,callouts"]
------------------------------------------------
curl -L -O https://download.elastic.co/beats/filebeat/filebeat-{version}-x86_64.rpm
sudo rpm -vi filebeat-{version}-x86_64.rpm
------------------------------------------------


mac:

["source","sh",subs="attributes,callouts"]
------------------------------------------------
curl -L -O https://download.elastic.co/beats/filebeat/filebeat-{version}-darwin.tgz
tar xzvf filebeat-{version}-darwin.tgz
------------------------------------------------

NOTE: We also provide 32-bit images that you can get from our
https://www.elastic.co/downloads/beats/filebeat[download page].

Before starting filebeat, you should look at the configuration options in the configuration
file, for example `/etc/filebeat/filebeat.yml`. For more information about these options,
see <<filebeat-configuration-details>>.

[[filebeat-configuration]]
=== Configuring Filebeat

To configure Filebeat, you edit the _filebeat.yml_ file. Here is a sample of
the _filebeat.yml_ file:

[source,yaml]
-------------------------------------------------------------------------------------
filebeat:
  # List of prospectors to fetch data.
  prospectors:
    # Each - is a prospector. Below are the prospector specific configurations
    -
      # Paths that should be crawled and fetched. Glob based paths.
      # For each file found under this path, a harvester is started.
      paths:
        - "/var/log/*.log"
      # - c:\programdata\elasticsearch\logs\*

      # Type of the files. Based on this the way the file is read is decided.
      # The different types cannot be mixed in one prospector
      #
      # Possible options are:
      # * log: Reads every line of the log file (default)
      # * stdin: Reads the standard in
      type: log
-------------------------------------------------------------------------------------

Filebeat uses predefined default values for most configuration options. For the most basic
Filebeat configuration, you can define a single prospector with a single path. For example:<commit_msg>Fixes example .yml file that shows old name for option<commit_after>[[filebeat-getting-started]]
== Getting Started

To get started with your own Filebeat setup, install and configure these related products:

 * Elasticsearch for storage and indexing the data. {libbeat}/getting-started.html#elasticsearch-installation[More details]
 * Kibana for the UI. {libbeat}/getting-started.html#kibana-installation[More details]
 * Optionally Logstash for inserting data into Elasticsearch. {libbeat}/getting-started.html#logstash-installation[More details]

After you have installed these products, you can start <<filebeat-installation>>.

[[filebeat-installation]]
=== Installing Filebeat

To download and install Filebeat, run the following commands. Use the commands that
work with your system (deb for Debian/Ubuntu, rpm for Redhat/Centos/Fedora, mac for OS X).

deb:

["source","sh",subs="attributes,callouts"]
------------------------------------------------
curl -L -O https://download.elastic.co/beats/filebeat/filebeat_{version}_amd64.deb
sudo dpkg -i filebeat_{version}_amd64.deb
------------------------------------------------



rpm:

["source","sh",subs="attributes,callouts"]
------------------------------------------------
curl -L -O https://download.elastic.co/beats/filebeat/filebeat-{version}-x86_64.rpm
sudo rpm -vi filebeat-{version}-x86_64.rpm
------------------------------------------------


mac:

["source","sh",subs="attributes,callouts"]
------------------------------------------------
curl -L -O https://download.elastic.co/beats/filebeat/filebeat-{version}-darwin.tgz
tar xzvf filebeat-{version}-darwin.tgz
------------------------------------------------

NOTE: We also provide 32-bit images that you can get from our
https://www.elastic.co/downloads/beats/filebeat[download page].

Before starting filebeat, you should look at the configuration options in the configuration
file, for example `/etc/filebeat/filebeat.yml`. For more information about these options,
see <<filebeat-configuration-details>>.

[[filebeat-configuration]]
=== Configuring Filebeat

To configure Filebeat, you edit the _filebeat.yml_ file. Here is a sample of
the _filebeat.yml_ file:

[source,yaml]
-------------------------------------------------------------------------------------
filebeat:
  # List of prospectors to fetch data.
  prospectors:
    # Each - is a prospector. Below are the prospector specific configurations
    -
      # Paths that should be crawled and fetched. Glob based paths.
      # For each file found under this path, a harvester is started.
      paths:
        - "/var/log/*.log"
      # - c:\programdata\elasticsearch\logs\*

      # Type of the files. Based on this the way the file is read is decided.
      # The different types cannot be mixed in one prospector
      #
      # Possible options are:
      # * log: Reads every line of the log file (default)
      # * stdin: Reads the standard in
      input_type: log
-------------------------------------------------------------------------------------

Filebeat uses predefined default values for most configuration options. For the most basic
Filebeat configuration, you can define a single prospector with a single path. For example:
{'fraction_non_alphanumeric': 0.22584673013891057, 'fraction_numerical': 0.004370220071796473, 'mean_word_length': 2.2217194570135748, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '493303', 'n_tokens_mistral': 1699, 'n_tokens_neox': 1585, 'n_words': 572}