yokawasa/fluent-plugin-azure-loganalytics

uri encoding error with o.4.1

Closed this issue · 4 comments

[fatal]: Exception occured in posting to DataCollector API: 'bad URI(is not URI?):

exception when pushing json to log analytics.

@varuns-zetaris
Thank you for reporting the issue. Can you please provide whole log including data=> xxxx part? I'd like to know for which data the exception occured in posting to log analytics.

The log format should be like this:

        log.fatal "Exception occured in posting to DataCollector API: " +
                  "'#{ex}', data=>" + Yajl.dump(records)

Exception occured in posting to DataCollector API: 'bad URI(is not URI?): https://4ad8b335-d430-333333-5f62111dd6f
.ods.opinsights.azure.com/api/logs?api-version=2016-04-01', data=>
[{"Count":0,"hostname":"host-156824-exec-1","time":"1568248857"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248862"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248867"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248872"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248877"}
,{"Count":0,"hostname":"host-156824-exec-1","time":"1568248882"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248887"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248892"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248897"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248902"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248907"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248912"},
{"Count":0,"hostname":"host-156824-exec-1","time":"1568248917"}]

@varuns-zetaris thanks for your providing the info.
looks like customer_id string containers return code at the end.
Can you please take look at your fluend conf and see if the customer_id contains return code at he end of customer_id?? Please remove the code if you find.

<match azure-loganalytics.**>
    @type azure-loganalytics
    customer_id "4ad8b335-d430-333333-5f62111dd6f ????"  <<< HERE
     shared_key xxxxxxxxxxxx
    log_type TestLogType

</match>

if you edited the conf in windows environment, you may see ^M when you open the file with vi editor, for example.

Thanks,
Yoichi

thanks for that. It resolved the issue.