# Parse MSSQL logs from event log

**URL:** <https://discuss.elastic.co/t/parse-mssql-logs-from-event-log/222980>\
**Category:** Logstash\
**Created:** [March 10, 2020, 4:42pm UTC](https://discuss.elastic.co/t/parse-mssql-logs-from-event-log/222980 "2020-03-10T16:42:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sref](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@sref](https://discuss.elastic.co/u/sref)\
**Post date:** [March 10, 2020, 4:42pm UTC](https://discuss.elastic.co/t/parse-mssql-logs-from-event-log/222980/1 "2020-03-10T16:42:33Z")

</div>

Hi,  
Im trying to parse MSSQL logs from Windows event log, into Elastic stack.  
Currently MSSQL logs to event viewer, and i use Winlogbeat 7,6 and Elastic stack 7,6 also. (installed under 1 month ago)  
indent preformatted text by 4 spaces  
Currently, all the MSSQL event logs goes into the message field, without getting parsed to seperate fields like it should.

Basically it seems like the same issue as [Parsing additional data in a windows event log](https://discuss.elastic.co/t/parsing-additional-data-in-a-windows-event-log/135157)

I am unsucsessful in using gsub to replace the delimiter, and was hoping for some guidance on the parsing.

Configs:

> ```
> 01input.conf
> input {
> beats {
> port => 5044
> tags => ["winlogbeat2"]
> }
> }
> 
> ```

20-parse-mssql.conf

> ```
> filter {
> mutate {
> gsub => [
> "message", "[\\n]", ","
> ]
> }
> }
> 
> ```

```
30-out-es.conf
    output {
      elasticsearch {
        hosts => ["http://localhost:9200"]
        index => "%{[@metadata][beat]}-%{[@metadata][version]}"
      }
    }

```

---

<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 7, 2020, 4:42pm UTC](https://discuss.elastic.co/t/parse-mssql-logs-from-event-log/222980/2 "2020-04-07T16:42:40Z")

</div>

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