# New to Logstash need help with config file

**URL:** <https://discuss.elastic.co/t/new-to-logstash-need-help-with-config-file/77713>\
**Category:** Logstash\
**Created:** [March 7, 2017, 6:28pm UTC](https://discuss.elastic.co/t/new-to-logstash-need-help-with-config-file/77713 "2017-03-07T18:28:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![parrot](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@parrot](https://discuss.elastic.co/u/parrot)\
**Post date:** [March 7, 2017, 6:28pm UTC](https://discuss.elastic.co/t/new-to-logstash-need-help-with-config-file/77713/1 "2017-03-07T18:28:05Z")

</div>

Hello,  
I need to create configuration file that this is the input:

2017-02-14T13:39:33+02:00 PulseSecure: 2017-02-14 13:39:33 - ive - [10.16.4.225] dpnini(Users)[] - Testing Password realm restrictions failed for dpnini/Users

and this is the required text file output:

{"timestamp":"2017-02-14T13:39:33+02:00 ","vendor":"PulseSecure","localEventTime":"2017-02-14 13:39:33","userIP":"10.16.4.225","username":"dpnini","group":"Users","vpnMsg":"Testing Password realm restrictions failed for dpnini/Users\r"}

**All i know is that i start the logstash with "bin/logstash -f logstash-simple.conf"**  
also i know that the file that i need to change is YML file inside the config folder.

Thank you!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 9, 2017, 2:58pm UTC](https://discuss.elastic.co/t/new-to-logstash-need-help-with-config-file/77713/2 "2017-03-09T14:58:18Z")

</div>

Use a grok filter to parse the input line (use the grok constructor site to get help with the needed expression), then use a file output with a json\_lines codec.

> also i know that the file that i need to change is YML file inside the config folder.

I don't see why you'd have to change any YAML file to accomplish what you want.

---

<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 6, 2017, 2:58pm UTC](https://discuss.elastic.co/t/new-to-logstash-need-help-with-config-file/77713/3 "2017-04-06T14:58:27Z")

</div>

Closed on April 6, 2017, 2:58pm UTC

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