diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusAlert.png b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusAlert.png
new file mode 100644
index 0000000000..9fc7493ac5
Binary files /dev/null and b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusAlert.png differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusAlert.webp b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusAlert.webp
deleted file mode 100644
index 65c21e5597..0000000000
Binary files a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusAlert.webp and /dev/null differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusChart.png b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusChart.png
new file mode 100644
index 0000000000..f31da0cdb1
Binary files /dev/null and b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusChart.png differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusChart.webp b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusChart.webp
deleted file mode 100644
index 31d4a81df8..0000000000
Binary files a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusChart.webp and /dev/null differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusDashboard.png b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusDashboard.png
new file mode 100644
index 0000000000..a1980e3078
Binary files /dev/null and b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusDashboard.png differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusDashboard.webp b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusDashboard.webp
deleted file mode 100644
index 097d3755c4..0000000000
Binary files a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusDashboard.webp and /dev/null differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusGrafana.png b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusGrafana.png
new file mode 100644
index 0000000000..2d43d462c7
Binary files /dev/null and b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusGrafana.png differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusGrafana.webp b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusGrafana.webp
deleted file mode 100644
index 79a494d316..0000000000
Binary files a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusGrafana.webp and /dev/null differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusMetrics.png b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusMetrics.png
new file mode 100644
index 0000000000..1e3c7d99fe
Binary files /dev/null and b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusMetrics.png differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusMetrics.webp b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusMetrics.webp
deleted file mode 100644
index c2916e9f7f..0000000000
Binary files a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusMetrics.webp and /dev/null differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusNtfy.png b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusNtfy.png
new file mode 100644
index 0000000000..3f2e50859f
Binary files /dev/null and b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusNtfy.png differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusNtfy.webp b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusNtfy.webp
deleted file mode 100644
index e95c9aca7c..0000000000
Binary files a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusNtfy.webp and /dev/null differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusTargets.png b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusTargets.png
new file mode 100644
index 0000000000..eb408d8cb2
Binary files /dev/null and b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusTargets.png differ
diff --git a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusTargets.webp b/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusTargets.webp
deleted file mode 100644
index 19acf3fa60..0000000000
Binary files a/astro/public/img/docs/operate/secure-and-monitor/prometheus/prometheusTargets.webp and /dev/null differ
diff --git a/astro/src/content/docs/operate/secure-and-monitor/prometheus.mdx b/astro/src/content/docs/operate/secure-and-monitor/prometheus.mdx
index 17ead6cf04..d6bf845d67 100644
--- a/astro/src/content/docs/operate/secure-and-monitor/prometheus.mdx
+++ b/astro/src/content/docs/operate/secure-and-monitor/prometheus.mdx
@@ -1,12 +1,11 @@
---
-title: Monitor with Prometheus and Grafana
-description: Learn how to monitor FusionAuth with Prometheus, Grafana, and Ntfy.
+title: Monitor With Prometheus And Grafana
+description: Learn how to monitor FusionAuth with Prometheus, Grafana, and ntfy.
navcategory: admin
section: operate
subcategory: secure and monitor
---
import Aside from 'src/components/Aside.astro';
-import IconButton from 'src/components/IconButton.astro';
import Breadcrumb from 'src/components/Breadcrumb.astro';
import InlineField from 'src/components/InlineField.astro';
import InlineUIElement from 'src/components/InlineUIElement.astro';
@@ -18,11 +17,11 @@ import Diagram5 from 'src/components/docs/operate/secure-and-monitor/prometheusD
## Introduction
-This guide explains how to monitor FusionAuth events and metrics with the open-source tools [Prometheus](https://prometheus.io/docs/introduction/overview) and [Grafana](https://grafana.com/grafana), and send you alerts when problems occur.
+This guide explains how to monitor FusionAuth events and metrics with the open-source tools [Prometheus](https://prometheus.io/docs/introduction/overview) and [Grafana](https://grafana.com/grafana), and receive alerts when problems occur.
-Please read the [FusionAuth monitoring overview](/docs/operate/secure-and-monitor/monitor) before proceeding. The overview explains what FusionAuth metrics are, what activities comprise a complete monitoring workflow, and what Prometheus, Loki, and Grafana are. Review [alternative monitoring services](/docs/operate/secure-and-monitor/monitor#overview-of-popular-monitoring-tools) in the overview to ensure that Prometheus is the right tool for your needs.
+Please read the [FusionAuth monitoring overview](/docs/operate/secure-and-monitor/monitor) for details on FusionAuth metrics, the activities in a complete monitoring workflow, and what Prometheus, Loki, and Grafana are. Review the [alternative monitoring services](/docs/operate/secure-and-monitor/monitor#overview-of-popular-monitoring-tools) in the overview to ensure that Prometheus is the right tool for your needs.
-While in this guide you set up Prometheus in Docker containers on your local machine, there is also a paid cloud-hosted alternative at [Grafana Cloud](https://grafana.com/auth/sign-up/create-user).
+This guide will show you how to set up Prometheus in Docker containers on your local machine. However, a paid, cloud-hosted alternative is also available from [Grafana Cloud](https://grafana.com/auth/sign-up/create-user).
## Initial Architecture
@@ -30,7 +29,7 @@ Running FusionAuth and PostgreSQL in Docker usually looks like the diagram below
-This diagram shows three components that could die and need monitoring: the PostgreSQL database, FusionAuth, and your app (web server) that directs users to FusionAuth for login. In this guide, you will monitor only FusionAuth. To do so, you will add Prometheus to monitor your FusionAuth instance. Prometheus will poll FusionAuth every fifteen seconds to see if any errors have occurred.
+This diagram shows three components that could die and need monitoring: the PostgreSQL database, FusionAuth, and the app (web server) that directs users to FusionAuth for login. In this guide, you'll focus on monitoring FusionAuth by adding Prometheus to your setup. Prometheus will poll your FusionAuth instance for errors every fifteen seconds.
@@ -40,27 +39,30 @@ Clone the sample [FusionAuth kickstart repository](https://github.com/FusionAuth
```sh
git clone https://github.com/FusionAuth/fusionauth-example-docker-compose.git
-cd light
+cd fusionauth-example-docker-compose/light
```
-Add a new service to the bottom of `docker-compose.yaml` before the `volumes:` section, with the code below. You are using the Ubuntu Docker image from Docker Hub for [Prometheus](https://hub.docker.com/r/ubuntu/prometheus).
+Add the following code to `docker-compose.yaml` near the end, before the `networks:` section, to define a new service. The service uses the Ubuntu Docker image from Docker Hub for [Prometheus](https://hub.docker.com/r/ubuntu/prometheus).
```yaml
prometheus:
image: ubuntu/prometheus:2.52.0-22.04_stable
+ platform: linux/amd64
container_name: faProm
depends_on:
- fa
ports:
- 9090:9090
+ networks:
+ - db_net
volumes:
- ./prometheusConfig.yml:/etc/prometheus/prometheus.yml
- ./prometheusDb:/prometheus
```
-This service says that Prometheus will start after FusionAuth, that you can browse to it on port 9090, and that it will save its database and configuration file in persistent directories on your machine.
+This service definition specifies that Prometheus starts after FusionAuth, is accessible on port 9090, and saves its database and configuration file in persistent directories on your machine.
-Create the Prometheus configuration file, called `prometheusConfig.yml`, containing the content below.
+Create a `prometheusConfig.yml` configuration file containing the content below.
```yaml
global:
@@ -77,9 +79,9 @@ scrape_configs:
password: "33052c8a-c283-4e96-9d2a-eb1215c69f8f-not-for-prod"
```
-This configuration says that metrics will be gathered from FusionAuth every fifteen seconds. Prometheus will evaluate the metrics only every thirty seconds. The FusionAuth kickstart configuration files created a superuser API key that Prometheus uses as `password`. In production to be more secure, rather create an API key that has only the `GET` permission for the `/api/prometheus/metrics` endpoint.
+This configures Prometheus to collect metrics from FusionAuth every 15 seconds and evaluate the metrics every 30 seconds. Prometheus uses the superuser API key, created by the FusionAuth kickstart configuration files, as `password`. For improved security in production, create an API key that has only `GET` permissions for the `/api/prometheus/metrics` endpoint.
-If you prefer to allow unauthenticated access to the Prometheus metrics endpoint in FusionAuth from any local scraper, you may set `fusionauth-app.local-metrics.enabled=true`. See the FusionAuth [configuration reference](/docs/reference/configuration) for more information.
+If you prefer to allow unauthenticated access to the Prometheus metrics endpoint in FusionAuth from any local scraper, you can set `fusionauth-app.local-metrics.enabled=true`. See the FusionAuth [configuration reference](/docs/reference/configuration) for more information.