# WID Extractions with Logstash

**URL:** <https://discuss.elastic.co/t/wid-extractions-with-logstash/215011>\
**Category:** Logstash\
**Created:** [January 14, 2020, 3:57pm UTC](https://discuss.elastic.co/t/wid-extractions-with-logstash/215011 "2020-01-14T15:57:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Guzman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_guzman/32/83587_2.png) [@John\_Guzman](https://discuss.elastic.co/u/John_Guzman)\
**Post date:** [January 14, 2020, 3:57pm UTC](https://discuss.elastic.co/t/wid-extractions-with-logstash/215011/1 "2020-01-14T15:57:34Z")

</div>

Hello!

I need to extract some data from a Windows internal Database from WSUS. I already tried using the JDBC and Exec input plugins, buy no one worked using this string connection \.\pipe\MICROSOFT##WID\tsql\query.

This is my exec config file, but it's not retrieving the query results. If i use it directly from shell, it works.

```
input {
	exec {
    command => "sqlcmd -S \\.\pipe\MICROSOFT##WID\tsql\query
	SELECT [ComputerTargetId],[ParentServerId],[Name],[IPAddress],[LastSyncResult],[LastSyncTime],[LastReportedStatusTime],[LastReportedInventoryTime],[ClientVersion],[OSArchitecture],[Make],[Model],[BiosName],[BiosVersion],[BiosReleaseDate],[OSMajorVersion],[OSMinorVersion],[OSBuildNumber],[OSServicePackMajorNumber],[OSDefaultUILanguage]FROM [SUSDB].[PUBLIC_VIEWS].[vComputerTarget]
	go"
    interval => 30
  }
}

```

Thanks!

---

<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:** [February 11, 2020, 3:57pm UTC](https://discuss.elastic.co/t/wid-extractions-with-logstash/215011/2 "2020-02-11T15:57:49Z")

</div>

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