Issue with metricbeat kibana module when using custom path for Kibana

My kibana setup uses

SERVER_PUBLICBASEURL = http://www.example.com/kibana
SERVER_BASEPATH = /kibana
SERVER_REWRITEBASEPATH = "true"

My metricbeat autodiscovery for the kibana module uses:

- condition:
    contains:
       kubernetes.annotations.app: kibana
  config:
  - module: kibana
    hosts: ["https://${data.host}:5601/kibana"]

But I am getting this in my metricbeat logs:

Error fetching data for metricset kibana.cluster_rules: invalid character '<' looking for beginning of value

As if metricbeat is hitting some HTML.

I can curl
https://www.example.com/kibana/api/status just fine.
I can also curl the pods ip directly from inside the cluster:
https://elastic:elastic@10.150.1.22:5601/kibana/api/status

Before modifying the Kibana path, metricbeats was pulling Kibana metrics normally.

Please try this.

hosts: ["https://${data.host}:5601]

And restart metricbeat. I hope it helps.

Sorry this does not work:

hosts: ["https://${data.host}:5601]

Error fetching data for metricset kibana.cluster_rules: HTTP error 404 in : 404 Not Found

Sorry for the late reply, I was out on holidays for a week.

Try without the (S) in your https. Use http and see it this works.

I have tls enabled in kibana.
Metricbeats is able to upload dashboards to kibana fine to
https://${KIBANA_HOSTS}:5601/kibana

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