# Metrics integration with Grafana

**URL:** <https://community.transloadit.com/t/metrics-integration-with-grafana/15746>\
**Category:** Uppy\
**Created:** [June 15, 2021, 5:14pm UTC](https://community.transloadit.com/t/metrics-integration-with-grafana/15746 "2021-06-15T17:14:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anuj](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/anuj/32/428_2.png) [@anuj](https://community.transloadit.com/u/anuj)\
**Post date:** [June 15, 2021, 5:14pm UTC](https://community.transloadit.com/t/metrics-integration-with-grafana/15746/1 "2021-06-15T17:14:37Z")

</div>

On running the standalone companion server, it exposes `/metrics` endpoint.

How this can be integrated with Grafana monitoring?

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [June 16, 2021, 7:28am UTC](https://community.transloadit.com/t/metrics-integration-with-grafana/15746/2 "2021-06-16T07:28:03Z")

</div>

/metrics is a Prometheus compatible endpoint. So you could configure Prometheus to scrape this endpoint, and add Prometheus as a datasource to Grafana, you can then start graphing it there.

---

<div class="post-metadata">

**Author:** ![anuj](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/anuj/32/428_2.png) [@anuj](https://community.transloadit.com/u/anuj)\
**Post date:** [June 16, 2021, 10:04am UTC](https://community.transloadit.com/t/metrics-integration-with-grafana/15746/3 "2021-06-16T10:04:31Z")

</div>

Thanks @kvz

As of now the endpoint is open. Can I secure the endpoint to prevent public access?

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [June 16, 2021, 10:26am UTC](https://community.transloadit.com/t/metrics-integration-with-grafana/15746/4 "2021-06-16T10:26:52Z")

</div>

Companion itself does not offer such functionality but you could do this within HAProxy or Nginx, wrapping the service

---

<div class="post-metadata">

**Author:** ![anuj](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/anuj/32/428_2.png) [@anuj](https://community.transloadit.com/u/anuj)\
**Post date:** [June 16, 2021, 5:18pm UTC](https://community.transloadit.com/t/metrics-integration-with-grafana/15746/5 "2021-06-16T17:18:38Z")

</div>

I’m using the standalone server setup using docker-compose routing 80 requests to 3020 without any proxy server.

It seems the metrics endpoint is only available to the standalone server.

I tried with the custom express application but the metrics endpoint is not accessible over there. It was possible to add authentication in express.

1. Is metrics is available on custom express application?

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [July 6, 2021, 12:12pm UTC](https://community.transloadit.com/t/metrics-integration-with-grafana/15746/6 "2021-07-06T12:12:31Z")

</div>

Hey sorry for the delay, yes this is possible ever since we merged: [Pull out metric middleware logic by mifi · Pull Request #2854 · transloadit/uppy · GitHub](https://github.com/transloadit/uppy/pull/2854)
