# Failed when parsing JSON from VirusTotal

**URL:** <https://discuss.elastic.co/t/failed-when-parsing-json-from-virustotal/149387>\
**Category:** Logstash\
**Created:** [September 21, 2018, 4:30am UTC](https://discuss.elastic.co/t/failed-when-parsing-json-from-virustotal/149387 "2018-09-21T04:30:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahmat\_Agung\_W](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Rahmat\_Agung\_W](https://discuss.elastic.co/u/Rahmat_Agung_W)\
**Post date:** [September 21, 2018, 4:30am UTC](https://discuss.elastic.co/t/failed-when-parsing-json-from-virustotal/149387/1 "2018-09-21T04:30:42Z")

</div>

So I have JSON file retrieve from virustotal. Looks:

 ![json1](https://us1.discourse-cdn.com/elastic/original/3X/4/0/405bfcda723caeff743ba06e6a8a496f38f46669.jpeg)  
 ![json2](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f61e0b5d5058bfede46d70095eddd6b877141650.jpeg)

This is my logstash config :

```
input{
file{
	path => "/path/scan.json"
    start_position => beginning
}

}
filter{
json{
	source => scans
	}

}

output {
   elasticsearch {   
    hosts => ["10.33.109.24:9200"]
	index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
	}
	file {
            path => "/home/elk/log/virustotal.json"
            codec => json
        }
        stdout {
            codec => rubydebug
        }
}

```

At first, I used filebeat as my input but there is no incoming data to my elasticsearch/kibana. I Then i used file input instead, but still no result. Is something wrong with my JSON filter?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 24, 2018, 6:23pm UTC](https://discuss.elastic.co/t/failed-when-parsing-json-from-virustotal/149387/2 "2018-09-24T18:23:28Z")

</div>

If it's a multiline JSON file (i.e. the file contains a single JSON object spread over multiple lines) you have to use a multiline codec to join all lines of the file into a single event. Examples of this have been posted in the past. People have to do the same thing for XML files.

---

<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:** [October 22, 2018, 6:23pm UTC](https://discuss.elastic.co/t/failed-when-parsing-json-from-virustotal/149387/3 "2018-10-22T18:23:34Z")

</div>

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