Skip to content

A simple dockerized api exposing /metrics to Prometheus and Grafana

Notifications You must be signed in to change notification settings

JGMelon22/CustomMetricsPOC

Repository files navigation

CustomMetricsPOC

This is a sample dockerized web API CRUD as a sole purpose to be a start point to work with Prometheus custom metrics and Grafana. What actually was done? It was created a custom gauge metric to scrape amount of orders from the last 10 days from database using a background job to keep constantly up to date.

Tech Stacks

Docker Badge
.NET 8 Badge
SQLite Badge

About Prometheus

The following dashboard template was used: prometheus-net

Custom dashboard

Please download the custom dashboard.
You need to change the stat panel to the following metric and label filter: total_order_count and job = csharp-app

PS ⚠️

The final stage image uses the bookworm-slim tag, which is smaller but do not contains tzdata, resulting on lack of globalization.
That's why there is no data at Start time of the process panel.

About

A simple dockerized api exposing /metrics to Prometheus and Grafana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published