1
votes

Hello and thank you for your time. 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!

1

1 Answers

0
votes

Logstash conf file (your logstash-simple.conf) is composed of three parts: input, filter, output. Input/output is source/destination of your data, while filter defines data transformation. Check elastic page for samples:

https://www.elastic.co/guide/en/logstash/current/config-examples.html

What you actually need to do, is to write grok pattern inside filter to split your text into tokens/fields that you have in your json. Simple description of grok:

http://logz.io/blog/logstash-grok/