# Auth issues while adding pmm as a datasource in Grafana

**URL:** <https://forums.percona.com/t/auth-issues-while-adding-pmm-as-a-datasource-in-grafana/34639>\
**Category:** Awards & Recognition\
**Created:** [October 28, 2024, 3:43pm UTC](https://forums.percona.com/t/auth-issues-while-adding-pmm-as-a-datasource-in-grafana/34639 "2024-10-28T15:43:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![skp15](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/skp15/32/19681_2.png) [@skp15](https://forums.percona.com/u/skp15)\
**Post date:** [October 28, 2024, 3:43pm UTC](https://forums.percona.com/t/auth-issues-while-adding-pmm-as-a-datasource-in-grafana/34639/1 "2024-10-28T15:43:29Z")

</div>

Hello,

I have a pmm-server hosted on an AWS EKS cluster and exposed it on localhost, I am able to access the PMM UI as well as the /prometheus endpoint that has Single-node VictoriaMetrics.

When I am adding pmm’s service ([http://monitoring-service.pmm.svc.cluster.local/prometheus](http://monitoring-service.pmm.svc.cluster.local/prometheus)) as a data source to Grafana also hosted in the same cluster, I am getting 401 unauthorized. I had to use Chrome’s debug tools and pass cookie session to add the datasource. Is there a better way to do the authentication?

Thanks.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 28, 2024, 6:23pm UTC](https://forums.percona.com/t/auth-issues-while-adding-pmm-as-a-datasource-in-grafana/34639/2 "2024-10-28T18:23:18Z")

</div>

@skp15 I use this format `https://username:pass@pmm-server.local/` to provide un/pw when accessing PMM on CLI.

---

<div class="post-metadata">

**Author:** ![skp15](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/skp15/32/19681_2.png) [@skp15](https://forums.percona.com/u/skp15)\
**Post date:** [October 28, 2024, 7:21pm UTC](https://forums.percona.com/t/auth-issues-while-adding-pmm-as-a-datasource-in-grafana/34639/3 "2024-10-28T19:21:11Z")

</div>

It’s not on the CLI but when I add pmm as a Prometheus endpoint datasource in Grafana UI.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 28, 2024, 8:48pm UTC](https://forums.percona.com/t/auth-issues-while-adding-pmm-as-a-datasource-in-grafana/34639/4 "2024-10-28T20:48:03Z")

</div>

Yes, I understood that you are using the PMM UI. You asked for an alternate way to provide un/pw to PMM so you could access the endpoint. The same situation is required when accessing PMM on CLI. Using the URL format I showed, you should be able to access the PMM endpoint.
