Setting the User-Agent of heartbeat

Is there a way to set override the user-agent of heartbeat?
The default one is "Go-http-client/1.1" I want to change that to "heartbeat".

I think this has been already pushed: https://github.com/elastic/beats/issues/10170

Which version are you using?

I am using 7.4.2 but is there a way to setup the header within a configuration with a custom name?
heartbeat is a relative common name for other heartbeat services in the wild. Or a custom name for the given platform/web-application/servername to be able to whitelist for the servers

Did you try with check.headers? See: https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-http-options.html

header "User-Agent"

Yeah that worked out, the outcome in the end was.

check.request:
  headers:
    'User-Agent': 'heartbeat'

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