Hi,
I need to get logs from a rest API, I tried this config in My filebeat.yml:
filebeat.inputs:
- type: httpjson
request.url: ----------------------------------
request.transforms:- set:
target: header.Authorization
value: '"Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX='
- set:
When testing the URI with basic authentication using other toolsn I get the logs I'm looking for.
But when running Filebeat , I get this:
{"log.level":"error","@timestamp":"2023-08-07T12:50:44.763+0100","log.logger":"input.httpjson-stateless","log.origin":{"file.name":"httpjson/input.go","file.line":143},"message":"Error while processing http request: failed to execute rf.collectResponse: failed to execute http client.Do: server responded with status code 401: {"code":"AuthenticationMissingOrInvalid","message":"The credential is missing or invalid."}\n","service.name":"filebeat","id":"7AFEB288B5C44402","input_url":"--------------------------","ecs.version":"1.6.0"}
I don't know what the problem is.
Pleqse help me