# Using json in logstash

**URL:** https://discuss.elastic.co/t/using-json-in-logstash/252643
**Category:** Logstash
**Created:** [October 20, 2020, 7:08am UTC](https://discuss.elastic.co/t/using-json-in-logstash/252643 "2020-10-20T07:08:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![igersht](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igersht/32/77452_2.png) [@igersht](https://discuss.elastic.co/u/igersht)
#### Post date: [October 20, 2020, 7:08am UTC](https://discuss.elastic.co/t/using-json-in-logstash/252643/1 "2020-10-20T07:08:37Z")

</div>

Hey, I'm trying to send JSON to logstash looking like this:

```auto
         "build_url" => "https://www.build.url",
             "fields" => {
         "log_source" => "log_json"
     },
         "@timestamp" => 2020-10-19T11:12:20.283Z,
              "input" => {
         "type" => "log"
     },
               "host" => {
         "name" => "hosname"
     },
          "build_num" => "62",
            "message" => "{\n \"install\": {}",
           "job_name" => "create-vm"
}

```

Logstash doesn't seem to be doing anything with it even though i have the following configuration:

```auto
 filter {
   if [log_source] == "log_json" {
     json {
         source => "message"
     }
   }
 }

```

I have more filters in the logstash configuration that are working, so the issue is specifically in the JSON part.

I'm not seeing this in elasticsearch, what am I doing wrong?

---

<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: [November 17, 2020, 7:08am UTC](https://discuss.elastic.co/t/using-json-in-logstash/252643/2 "2020-11-17T07:08:44Z")

</div>

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