Unable to find cluster, stack monitoring

Hello all,

I am trying to setup Metricbeat for stack monitoring in Kibana to monitor Elasticsearch.

When I go to the monitoring page. It says there is no monitoring data and if I click to setup monitoring with metricbeat I get this blank screen and error:

If I search for the data I can see that it is there

POST .monitoring-es-7-*/_search
{
  "took" : 2,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 420,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : ".monitoring-es-7-mb-2022.07.20",
        "_type" : "_doc",
        "_id" : "x3hoHYIB2_GZ48scjG77",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2022-07-20T20:59:26.419Z",
          "event" : {
            "dataset" : "elasticsearch.node.stats",
            "module" : "elasticsearch",
            "duration" : 20331000
          },
          "interval_ms" : 10000,
          "node_stats" : {
            "process" : {
              "max_file_descriptors" : 65535,
              "cpu" : {
                "percent" : 0
              },
              "open_file_descriptors" : 1188
            },
            "jvm" : {
              "mem" : {
                "heap_used_in_bytes" : 22162797232,
                "heap_used_percent" : 66,
                "heap_max_in_bytes" : 33285996544
              },
              "gc" : {
                "collectors" : {
                  "old" : {
                    "collection_count" : 0,
                    "collection_time_in_millis" : 0
                  },
                  "young" : {
                    "collection_count" : 277,
                    "collection_time_in_millis" : 17952
                  }
                }
              }
            },

elasticsearch-xpack.yml

# Module: elasticsearch
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.17/metricbeat-module-elasticsearch.html

- module: elasticsearch
  xpack.enabled: true
  period: 10s
  hosts: ["https://localhost:9200"]
  ssl.certificate_autorities: "/etc/ca.cert"


metricbeat.yml



metricbeat.config.modules:

  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression

setup.kibana:

  host: "kibana-ip:5601"
  ssl.certificate_autorities: "/etc/ca.crt"  

output.elasticsearch:

  hosts: ["https://elasticsearch:9200"]
  ssl.certificate_authorities: '/etc/ca.crt'

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

logging.level: debug
logging.to_files: true
logging.files:
  path: /var/log/metricbeat
  name: metricbeat
  keepfiles: 10
  permissions: 0640

Any thoughts on why it is not showing in ui?

If you check in journald are there any errors shown by metricbeat?