# Structured logging (json) via Kubernetes hinted autodiscover

**URL:** <https://discuss.elastic.co/t/structured-logging-json-via-kubernetes-hinted-autodiscover/155118>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 2, 2018, 6:13am UTC](https://discuss.elastic.co/t/structured-logging-json-via-kubernetes-hinted-autodiscover/155118 "2018-11-02T06:13:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocketraman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rocketraman/32/32342_2.png) [@rocketraman](https://discuss.elastic.co/u/rocketraman)\
**Post date:** [November 2, 2018, 6:13am UTC](https://discuss.elastic.co/t/structured-logging-json-via-kubernetes-hinted-autodiscover/155118/1 "2018-11-02T06:13:20Z")

</div>

I am using autodiscovery with hints in Kubernetes.

Many of my containers log with single JSON per-line structured logging as described @ [https://www.elastic.co/blog/structured-logging-filebeat](https://www.elastic.co/blog/structured-logging-filebeat).

However, looking at the hints documentation @ [https://www.elastic.co/guide/en/beats/filebeat/6.4/configuration-autodiscover-hints.html](https://www.elastic.co/guide/en/beats/filebeat/6.4/configuration-autodiscover-hints.html), I don't see the right hint to tell filebeat to parse the container logs as JSON-per-line.

How do I do this?

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [November 3, 2018, 1:58pm UTC](https://discuss.elastic.co/t/structured-logging-json-via-kubernetes-hinted-autodiscover/155118/2 "2018-11-03T13:58:33Z")

</div>

At the moment not all input settings are exposed via annotations.  
If you need to set up some configuration not available via hints or modules, you can use the [`co.elastic.logs/raw`](https://www.elastic.co/guide/en/beats/filebeat/6.4/configuration-autodiscover-hints.html#_literal_co_elastic_logs_raw_literal) annotation, that allows to define inline a whole input or module.

---

<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:** [December 1, 2018, 1:58pm UTC](https://discuss.elastic.co/t/structured-logging-json-via-kubernetes-hinted-autodiscover/155118/3 "2018-12-01T13:58:36Z")

</div>

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