# Can filebeat ingest a JSON-format file as a single document?

**URL:** <https://discuss.elastic.co/t/can-filebeat-ingest-a-json-format-file-as-a-single-document/304872>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 16, 2022, 9:29pm UTC](https://discuss.elastic.co/t/can-filebeat-ingest-a-json-format-file-as-a-single-document/304872 "2022-05-16T21:29:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kmp/32/5144_2.png) [@kmp](https://discuss.elastic.co/u/kmp)\
**Post date:** [May 16, 2022, 9:29pm UTC](https://discuss.elastic.co/t/can-filebeat-ingest-a-json-format-file-as-a-single-document/304872/1 "2022-05-16T21:29:11Z")

</div>

I'm guessing this is really simple or ... not so much: we have an application deployed on a number of hosts that has a configuration file in JSON. We'd like to ingest the file as a single document using filebeat, in order to allow access to the configuration data for the instance along with the logs and metrics.

I know this can be done with `curl`, but filebeat is installed and dealing with setting up a separate path into Elasticsearch for one document seems inefficient (btw, this is an Elastic Cloud deployment). If there was a way to tell filebeat to ignore the newlines, for example, it's otherwise valid JSON so I'd expect it would work. Technically, this is multiline input, so I could approach it that way but I wonder if I'm missing something... the file can change either by someone manually editing it or a new copy being moved in place from a repository, so there isn't any data loss issue caused by a partial copy being ingested. Any relatively "clean" way to do this?

Thanks!

---

<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:** [June 13, 2022, 11:29pm UTC](https://discuss.elastic.co/t/can-filebeat-ingest-a-json-format-file-as-a-single-document/304872/2 "2022-06-13T23:29:36Z")

</div>

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