# Problem with http output

**URL:** <https://discuss.elastic.co/t/problem-with-http-output/200396>\
**Category:** Logstash\
**Created:** [September 20, 2019, 10:21am UTC](https://discuss.elastic.co/t/problem-with-http-output/200396 "2019-09-20T10:21:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ovie](https://avatars.discourse-cdn.com/v4/letter/o/4af34b/32.png) [@ovie](https://discuss.elastic.co/u/ovie)\
**Post date:** [September 20, 2019, 10:21am UTC](https://discuss.elastic.co/t/problem-with-http-output/200396/1 "2019-09-20T10:21:46Z")

</div>

Hello,

I'm facing a problem with sending Input from SQL server to Power BI

```
input {
	jdbc { 
    		jdbc_connection_string => "jdbc:sqlserver://db.local:1433;database=test"
    		jdbc_user => "test"
		jdbc_password => "test"
    		jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
		jdbc_driver_library => "C:\Logstash\sqljdbc_4.2\enu\jre8\sqljdbc42.jar"
    		statement => "select top(2)id,eventdata,inserttime from BPADataPipelineInput with (rowlock, readpast)"
		schedule => "*/1 * * * *" 
	}
}

```

Getting input is working fine.

Output from:

```
stdout { codec => rubydebug }

{
    "inserttime" => 2019-09-11T06:24:16.567Z,
     "eventdata" => "{\"EventData\":{\"Source\":\"License\",\"Subject\":\"License Information\",\"Values\":[{\"Constraint\":\"Concurrent Sessions\",\"Limit\":52,\"Used\":0}]},\"EventType\":2}"
}

```

Then i'm trying to send it to Power BI API using Http module:

```
	http {
    	http_method => "post"
    	url => "https://api.powerbi.com/removedkey"
	content_type =>"application/json"
	format => "message"	
	message => '[{"eventdata" : "%{eventdata}" , "inserttime" : "%{inserttime}"}]'
	}

```

Output

```
[2019-09-20T10:06:01,947][WARN][logstash.outputs.http] Encountered a retryable HTTP request in HTTP output, will retry {:code=>500, :body=>"{\"error\":{\"code\":\"RealTime_PushRowsInvalidJson\",\"pbi.error
\":{\"code\":\"RealTime_PushRowsInvalidJson\",\"parameters\":{},\"details\":[]}}}"}

```

When I put dummy data, like this  
`message => '[{"eventdata" : "test11" , "inserttime" : "%{inserttime}"}]'`  
Then its working...  
**any idea how should I format _eventdata_**

---

<div class="post-metadata">

**Author:** ![ovie](https://avatars.discourse-cdn.com/v4/letter/o/4af34b/32.png) [@ovie](https://discuss.elastic.co/u/ovie)\
**Post date:** [September 23, 2019, 5:40pm UTC](https://discuss.elastic.co/t/problem-with-http-output/200396/2 "2019-09-23T17:40:43Z")

</div>

managed to resolve it with dissect filter

---

<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:** [October 21, 2019, 5:40pm UTC](https://discuss.elastic.co/t/problem-with-http-output/200396/3 "2019-10-21T17:40:45Z")

</div>

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