# Host field missing on received documents using syslog input

**URL:** <https://discuss.elastic.co/t/host-field-missing-on-received-documents-using-syslog-input/165585>\
**Category:** Logstash\
**Created:** [January 24, 2019, 11:35am UTC](https://discuss.elastic.co/t/host-field-missing-on-received-documents-using-syslog-input/165585 "2019-01-24T11:35:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor.nilsson](https://avatars.discourse-cdn.com/v4/letter/v/eb8c5e/32.png) [@victor.nilsson](https://discuss.elastic.co/u/victor.nilsson)\
**Post date:** [January 24, 2019, 11:35am UTC](https://discuss.elastic.co/t/host-field-missing-on-received-documents-using-syslog-input/165585/1 "2019-01-24T11:35:20Z")

</div>

Hi,

I have the following logstash input:

```
input {
    udp {
        port => 5514
        tags => "syslog"
        id => "syslog-udp"
    }
    tcp {
        port => 5514
        tags => "syslog"
        id => "syslog-tcp"
        proxy_protocol => true
    }
}

```

and the following output:

```
output {
  if "syslog" in [tags] {
      elasticsearch {
                    hosts => ["10.232.0.40:9200", "10.232.0.41:9200"]
                    index => "logstash-%{+YYYY-MM-dd}"
                    user => logstash
                    password => password
                    ssl => true
                    ssl_certificate_verification => true
                    cacert => "/etc/logstash/ssl/root-ca.pem"
                    }
   }

```

And the configuration is working because i am receiving logs and can view them with kibana, but i cant know which host sent the logs since the Host field is missing from the documents. What am i missing here and can i add the Host field?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 24, 2019, 1:55pm UTC](https://discuss.elastic.co/t/host-field-missing-on-received-documents-using-syslog-input/165585/2 "2019-01-24T13:55:13Z")

</div>

A udp input should add a host field by default. For a tcp input I believe that information is in [@metadata][ip\_address], so you would need to mutate+copy it.

---

<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:** [February 21, 2019, 1:55pm UTC](https://discuss.elastic.co/t/host-field-missing-on-received-documents-using-syslog-input/165585/3 "2019-02-21T13:55:20Z")

</div>

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