Configuring logstash to listen to Filebeat

(Saurabh) #1


I have installed Logstash version 5.2.0 and File Beat 5.2.0. Next I configured file beat to send events to logstash.

Next I configured logstash to listen to file beat by the following configuration:

input {
beats {
port => 5044

output {
elasticsearch {
hosts => "localhost:9200"
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"

The elastic search document asks to install input beats plugin for logstash. So i executed the following command but it says connection refused.

D:\Softwares\LogMonitoring\logstash-5.2.0\bin>logstash-plugin install logstash-i
ERROR: Something went wrong when installing logstash-input-beats, message: Conne
ction refused - Connection refused

Can someone point to the correct steps to configure logstash to received inputs from file beat?

I am trying to parse the log files from apache and push it to elasticsearch.


(Guy Boertje) #2

The beats input is sooooo important in the Elastic Stack it is always shipped with each Logstash release.

bin/logstash-plugin list --verbose logstash-input-beats
logstash-input-beats (3.1.12)

bin/logstash-plugin --help
    bin/logstash-plugin [OPTIONS] SUBCOMMAND [ARG] ...

    SUBCOMMAND                    subcommand
    [ARG] ...                     subcommand arguments

    list                          List all installed Logstash plugins
    install                       Install a Logstash plugin
    remove                        Remove a Logstash plugin
    update                        Update a plugin
    pack                          Package currently installed plugins, Deprecated: Please use prepare-offline-pack instead
    unpack                        Unpack packaged plugins, Deprecated: Please use prepare-offline-pack instead
    generate                      Create the foundation for a new plugin
    uninstall                     Uninstall a plugin. Deprecated: Please use remove instead
    prepare-offline-pack          Create an archive of specified plugins to use for offline installation

    -h, --help                    print help

$ bin/logstash-plugin list --help
    bin/logstash-plugin list [OPTIONS] [PLUGIN]

    [PLUGIN]                      Part of plugin name to search for, leave empty for all plugins

    --installed                   List only explicitly installed plugins using bin/logstash-plugin install ... (default: false)
    --verbose                     Also show plugin version number (default: false)
    --group NAME                  Filter plugins per group: input, output, filter or codec
    -h, --help                    print help

(Saurabh) #3

Thanks a lot for your reply. I just checked and the beats plugin is shipped by default with 5.2.


(system) #4

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