bruno-garcia / log4net.ElasticSearch

log4net appender to ElasticSearch
https://bruno-garcia.github.io/log4net.ElasticSearch/
Other
219 stars 92 forks source link

Json strange format #103

Closed juzamdjinn closed 5 years ago

juzamdjinn commented 5 years ago

Hi , i have this stack fluentd , elasticserach and kibana.

I use this configuration for the appender :

`

`

but message does not arrive , if i trace them with fiddler i see :

POST http://myserver:8888/m3s.log-2018.07.25/logEvent/_bulk HTTP/1.1 Content-Type: application/json Host: myserver:8888 Content-Length: 930 Connection: Keep-Alive

{"index" : {} } {"timeStamp":"2018-07-25T08:14:24.5652145Z","message":"log console log test","messageObject":{},"exception":{},"loggerName":"ConsoleApplication1.Program","domain":"ConsoleApplication1.vshost.exe","identity":"","level":"INFO","className":"ConsoleApplication1.Program","fileName":"c:\aaaa\bbbb\documents\visual studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs","lineNumber":"34","fullInfo":"ConsoleApplication1.Program.Main(c:\aaaa\bbbb\documents\visual studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:34)","methodName":"Main","fix":"LocationInfo, UserName, Identity, Partial","properties":{"log4net:HostName":"machine","log4net:Identity":"","log4net:UserName":"mysoc\bbbb","@timestamp":"2018-07-25T08:14:24.5652145Z"},"userName":"mysoc\bbbb","threadName":"10","hostName":"mymachine"}

it is correct that the raw data presents two json tag ? ( index .... and timeStamp.... )

if i remove index and sent it with postaman the message arrive ( i need to modify all strings with backslash ... )

Thank you

A.

jptoto commented 5 years ago

@juzamdjinn I apologize for the slow reply. I don't think that index name will work since you have a "." in it. Can you try without the dot "." and see if your index is created correctly?