How to fix Unexpected exception indices:monitor/stats?

Hi,

I am using Open Distro 1.13.0 and I was trying to monitor the cluster using Prometheus. I have downloaded and installed Elasticsearch plugin (v7.10.2.0 which is compatible) available here GitHub - justwatchcom/elasticsearch_exporter: Elasticsearch stats exporter for Prometheus , which supports exposing elasticsearch metrics to _prometheus/metrics endpoint.

But, when I try to access the endpoint https://elasticsearch_ip:9200/_prometheus/metrics in my browser, I am getting error like below;

{
  "error": {
    "root_cause": [
      {
        "type": "security_exception",
        "reason": "Unexpected exception indices:monitor/stats"
      }
    ],
    "type": "exception",
    "reason": "Indices stats request failed",
    "caused_by": {
      "type": "security_exception",
      "reason": "Unexpected exception indices:monitor/stats"
    }
  },
  "status": 500
}

Any idea on why this is happening and how to fix this? Can somebody kindly help me with this…

Note: I am using admin user credentials

Thanks in advance.

Useful links;