Member-only story

Prometheus setup with docker-compose.

Full monitoring stack — part 1.

Mirco | VerboseMode.dev
Javarevisited

Please read the updated version here:

In short: What is Prometheus?

Prometheus is an open-source monitoring application. It scrapes HTTP endpoints to collect metrics exposed in a simple text format.

For example, your web app might expose a metric like

http_server_requests_seconds_count{exception="None", method="GET",outcome="SUCCESS",status="200",uri="/actuator/health"} 435

which means that the endpoint /actuator/health was successfully queried 435 times via a GET request.

Prometheus can also create alerts if a metric exceeds a threshold, e.g. if your endpoint returned more than one-hundred times the status code 500 in the last 5 minutes.

Configuration

To set up Prometheus, we create three files:

  • prometheus/prometheus.yml — the actual Prometheus configuration
  • prometheus/alert.yml —…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (1)

What are your thoughts?

Thanks for this! I'd recommend adding `:ro` to the colume entry for /etc/prometheus as prometheus does not need to write to it