# Functionbeat JSON logs

**URL:** <https://discuss.elastic.co/t/functionbeat-json-logs/178301>\
**Category:** Beats\
**Created:** [April 24, 2019, 5:02pm UTC](https://discuss.elastic.co/t/functionbeat-json-logs/178301 "2019-04-24T17:02:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Fielding](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marc_fielding/32/39406_2.png) [@Marc\_Fielding](https://discuss.elastic.co/u/Marc_Fielding)\
**Post date:** [April 24, 2019, 5:02pm UTC](https://discuss.elastic.co/t/functionbeat-json-logs/178301/1 "2019-04-24T17:02:40Z")

</div>

Hey Everyone,

So I have Functionbeat working nicely with cloudwatch logs, we use Bunyan to do out logging in JSON format so, for example, some log messages look like this:

{  
"name": "the\_log",  
"hostname": "ip-1-2-3-4",  
"pid": 1,  
"level": 30,  
"msg": "Some Message",  
"time": "2019-04-24T16:56:27.769Z",  
"v": 0  
}

I also added the following to the processor

processors:

- decode\_json\_fields:  
when.regexp.message: '^{'  
fields: ["message", "msg"]  
process\_array: true  
max\_depth: 5  
overwrite\_keys: true
- add\_host\_metadata: ~
- add\_cloud\_metadata: ~

However, those fields don't appear to get indexed, a normal console.log appears fine but all the JSON bits are missing. Normally these fields just appear so I'm guessing there's something different with Functionbeat?

Thanks in advance

Marc

---

<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:** [May 22, 2019, 5:02pm UTC](https://discuss.elastic.co/t/functionbeat-json-logs/178301/2 "2019-05-22T17:02:42Z")

</div>

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