# File appender for filebeat not working in groovy

**URL:** <https://discuss.elastic.co/t/file-appender-for-filebeat-not-working-in-groovy/120954>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 22, 2018, 12:21am UTC](https://discuss.elastic.co/t/file-appender-for-filebeat-not-working-in-groovy/120954 "2018-02-22T00:21:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiten](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jiten](https://discuss.elastic.co/u/jiten)\
**Post date:** [February 22, 2018, 12:21am UTC](https://discuss.elastic.co/t/file-appender-for-filebeat-not-working-in-groovy/120954/1 "2018-02-22T00:21:56Z")

</div>

Hi All,  
i have configured filebeat on my centos machine and it is working fine and now i am trying to use file appender for filebeat using groovy script but it is not creating file. any help will be appericate.

below is the code which i am using in my script for file appender:

static String FILEBEAT\_APPENDER\_XML = """  
  
service.log/logstash.json  
  
  
  
  
  
message  
%msg%n%ex{25}  
  
  
logger  
%logger{50}  
  
  
environment  
${OPERATIONAL\_ENVIRONMENT}  
false  
  
  
host  
${HOSTNAME}  
  
  
thread  
%thread  
false  
  
  
  
  
@service.log@/logstash.json.%d{yyyy-MM-dd}.%i  
1  
true  
  
100MB  
  
  
  
"""

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [February 23, 2018, 11:06pm UTC](https://discuss.elastic.co/t/file-appender-for-filebeat-not-working-in-groovy/120954/2 "2018-02-23T23:06:18Z")

</div>

Sorry @jiten, but it's not entirely clear to me what you are asking for help with. Do you think you could elaborate. Is this a question about Filebeat or about groovy?

---

<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:** [March 23, 2018, 11:06pm UTC](https://discuss.elastic.co/t/file-appender-for-filebeat-not-working-in-groovy/120954/3 "2018-03-23T23:06:22Z")

</div>

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