# Can't get filebeat clients to ship to logstash

**URL:** <https://discuss.elastic.co/t/cant-get-filebeat-clients-to-ship-to-logstash/173562>\
**Category:** Logstash\
**Created:** [March 22, 2019, 10:10pm UTC](https://discuss.elastic.co/t/cant-get-filebeat-clients-to-ship-to-logstash/173562 "2019-03-22T22:10:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![boxclever38](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boxclever38/32/42610_2.png) [@boxclever38](https://discuss.elastic.co/u/boxclever38)\
**Post date:** [March 22, 2019, 10:10pm UTC](https://discuss.elastic.co/t/cant-get-filebeat-clients-to-ship-to-logstash/173562/1 "2019-03-22T22:10:16Z")

</div>

I have 3 VMs setup:

Server A: Elastic Stack. Everything works great. filebeat -\> logstash -\> elasticsearch  
Kibana loads everything up and we're looking good. Let's say it has an IP address of 10.10.10.10

Server B + C: installed filebeat. super basic config, just added the IP of Server A as so in filebeat.yml in the output section (note, this is identical to the filebeat.yml on ServerA):

```
#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["10.10.10.10:5044"]

```

here's my logstash:

```
input {
  beats {
    port => 5044
    client_inactivity_timeout => 600
    ssl => false
  }
}

filter {
  if [fileset][module] == "system" {
    if [fileset][name] == "auth" {
      grok {
        match => { "message" => ["%{SYSLOGTIMESTAMP:[system][auth][timestamp]} %{SYSLOGHOST:[system][auth][hostname]} sshd(?:\[%{POSINT:[system][auth][pid]}\])?: %{DATA:[system][auth][ssh][event]} %{DATA:[system][auth][ssh][method]} for (invalid user )?%{DATA:[system][auth][user]} from %{IPORHOST:[system][auth][ssh][ip]} port %{NUMBER:[system][auth][ssh][port]} ssh2(: %{GREEDYDATA:[system][auth][ssh][signature]})?",
                  "%{SYSLOGTIMESTAMP:[system][auth][timestamp]} %{SYSLOGHOST:[system][auth][hostname]} sshd(?:\[%{POSINT:[system][auth][pid]}\])?: %{DATA:[system][auth][ssh][event]} user %{DATA:[system][auth][user]} from %{IPORHOST:[system][auth][ssh][ip]}",
                  "%{SYSLOGTIMESTAMP:[system][auth][timestamp]} %{SYSLOGHOST:[system][auth][hostname]} sshd(?:\[%{POSINT:[system][auth][pid]}\])?: Did not receive identification string from %{IPORHOST:[system][auth][ssh][dropped_ip]}",
                  "%{SYSLOGTIMESTAMP:[system][auth][timestamp]} %{SYSLOGHOST:[system][auth][hostname]} sudo(?:\[%{POSINT:[system][auth][pid]}\])?: \s*%{DATA:[system][auth][user]} :( %{DATA:[system][auth][sudo][error]} ;)? TTY=%{DATA:[system][auth][sudo][tty]} ; PWD=%{DATA:[system][auth][sudo][pwd]} ; USER=%{DATA:[system][auth][sudo][user]} ; COMMAND=%{GREEDYDATA:[system][auth][sudo][command]}",
                  "%{SYSLOGTIMESTAMP:[system][auth][timestamp]} %{SYSLOGHOST:[system][auth][hostname]} groupadd(?:\[%{POSINT:[system][auth][pid]}\])?: new group: name=%{DATA:system.auth.groupadd.name}, GID=%{NUMBER:system.auth.groupadd.gid}",
                  "%{SYSLOGTIMESTAMP:[system][auth][timestamp]} %{SYSLOGHOST:[system][auth][hostname]} useradd(?:\[%{POSINT:[system][auth][pid]}\])?: new user: name=%{DATA:[system][auth][user][add][name]}, UID=%{NUMBER:[system][auth][user][add][uid]}, GID=%{NUMBER:[system][auth][user][add][gid]}, home=%{DATA:[system][auth][user][add][home]}, shell=%{DATA:[system][auth][user][add][shell]}$",
                  "%{SYSLOGTIMESTAMP:[system][auth][timestamp]} %{SYSLOGHOST:[system][auth][hostname]} %{DATA:[system][auth][program]}(?:\[%{POSINT:[system][auth][pid]}\])?: %{GREEDYMULTILINE:[system][auth][message]}"] }
        pattern_definitions => {
          "GREEDYMULTILINE"=> "(.|\n)*"
        }
        remove_field => "message"
      }
      date {
        match => ["[system][auth][timestamp]", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
      }
      geoip {
        source => "[system][auth][ssh][ip]"
        target => "[system][auth][ssh][geoip]"
      }
    }
    else if [fileset][name] == "syslog" {
      grok {
        match => { "message" => ["%{SYSLOGTIMESTAMP:[system][syslog][timestamp]} %{SYSLOGHOST:[system][syslog][hostname]} %{DATA:[system][syslog][program]}(?:\[%{POSINT:[system][syslog][pid]}\])?: %{GREEDYMULTILINE:[system][syslog][message]}"] }
        pattern_definitions => { "GREEDYMULTILINE" => "(.|\n)*" }
        remove_field => "message"
      }
      date {
        match => ["[system][syslog][timestamp]", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
      }
    }
  }
}

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

```

I'm super green at this, so any insight is appreciated.

---

<div class="post-metadata">

**Author:** ![boxclever38](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boxclever38/32/42610_2.png) [@boxclever38](https://discuss.elastic.co/u/boxclever38)\
**Post date:** [March 26, 2019, 9:35pm UTC](https://discuss.elastic.co/t/cant-get-filebeat-clients-to-ship-to-logstash/173562/2 "2019-03-26T21:35:09Z")

</div>

Turns out the issue was timezones. The client / server were set differently so the data mismatched and was offset. Sheesh.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 23, 2019, 9:35pm UTC](https://discuss.elastic.co/t/cant-get-filebeat-clients-to-ship-to-logstash/173562/3 "2019-04-23T21:35:10Z")

</div>

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