Could not authenticate: Empty metadata in kibana metricbeat

I have ROR 1.40.0 free kibana/elasticsearch plugin and all is working but I get an error getting metricbeat metrics from kibana

kibana side
[info][plugins][ReadonlyREST][authController] Could not authenticate: Empty metadata

metricbeat side
{“log.level”:“error”,"@timestamp":“2022-06-14T09:36:38.825+0200”,“log.origin”:{“”:“module/wrapper.go”,“file.line”:254},“message”:“Error fetching data for metricset kibana.stats: error trying to get stats data from Kibana: HTTP error 401 in : 401 Unauthorized”,“”:“metricbeat”,“ecs.version”:“1.6.0”}

metricbeat settings

curl ‘’ is working

ok the point was to add
readonlyrest_kbn.whitelistedPaths: [".*api/stats$", “.*api/status$”]

thank you all xd

1 Like

You need to add credentials to metricbeat settings:

For example if your readonlyrest.yml has an ACL block to authenticate Kibana → Elasticsearch communication, i.e.


    auth_key: kibana:kibana
    verbosity: error

Then you can configure metricbeat with the same credentials:

  host: "mykibanahost:5601"
  username: "kibana" 
  password: "kibana" 

This will work because Metricbeat talks to Kibana via the Kibana API (URL path starting with /api/), and ROR accepts HTTP Basic auth for those paths.

Sure, this works OK too, but… you are leaving these endpoints without authentication :slight_smile:

True, that solutions is bettter but i has been configured in the module. I mean

  • module: kibana
    username: “XXXXX”
    password: “XXXX”

This file is irrelevant when ReadonlyREST is installed.