# Formatting output of report for Logstash / Elasticsearch

**URL:** <https://discuss.elastic.co/t/formatting-output-of-report-for-logstash-elasticsearch/174658>\
**Category:** Logstash\
**Created:** [March 31, 2019, 4:15am UTC](https://discuss.elastic.co/t/formatting-output-of-report-for-logstash-elasticsearch/174658 "2019-03-31T04:15:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![createchange](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/createchange/32/43154_2.png) [@createchange](https://discuss.elastic.co/u/createchange)\
**Post date:** [March 31, 2019, 4:15am UTC](https://discuss.elastic.co/t/formatting-output-of-report-for-logstash-elasticsearch/174658/1 "2019-03-31T04:15:51Z")

</div>

Hey there. I have been tasked with writing a report to obtain data re: cpanel account sites (think disk and bandwidth utilization, account packages, etc.). This started me down the path of the Elastic Stack, which I have zero experience with. Last evening I set up a VM and have it all configured to play around with, but have been having issues with formatting the output of my report in a manner in which it can easily be ingested into Elasticsearch directly.

My question is this: does it make sense to format my report in a manner that is delimited, rather than JSON, so that I can simply set a grok pattern in Logstash, and ingest it that way? To me that seems to be the easiest means of approaching this. Otherwise, I would have to programmatically generate the JSON output, or create a complex mapping just to get the original output to ingest - both much more difficult tasks, unless I am missing something.

Not sure if this is entirely clear, and am happy to answer questions as needed. I am really just looking for comments on whether or not I am way off the path here. Thanks!

---

<div class="post-metadata">

**Author:** ![navneetkumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneetkumar/32/43165_2.png) [@navneetkumar](https://discuss.elastic.co/u/navneetkumar)\
**Post date:** [March 31, 2019, 3:49pm UTC](https://discuss.elastic.co/t/formatting-output-of-report-for-logstash-elasticsearch/174658/2 "2019-03-31T15:49:16Z")

</div>

Hi @createchange You don't have to programmatically generate JSON yourself and let Logstash or Elasticsearch do it. Raw data can be processed using Logstash [grok](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html) or [dissect](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html) filter plugins. If your data in key-value format, then [kv](https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html) filter can be used.  
Processing of data can be done in Elasticsearch as well, using [ingestion pipelines](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html). Dissect, grok and kv [ingestion processors](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-processors.html) are available in Elasticsearch.

---

<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 28, 2019, 3:49pm UTC](https://discuss.elastic.co/t/formatting-output-of-report-for-logstash-elasticsearch/174658/3 "2019-04-28T15:49:16Z")

</div>

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