Monitoring with Prometheus and Grafana
For monitoring microservices solutions, Prometheus and Grafana are often used. Prometheus uses a pull model to collect data from services. Using this data, the PromQL query language analyzes this information. Grafana can access the data collected from Prometheus to show a graphical view.
We’ll use Docker containers running Prometheus and Grafana. Microsoft Azure also offers managed services for Prometheus and Grafana that can be used as well.
Let’s configure Docker containers for Prometheus and Grafana next.
Adding Docker containers for Prometheus and Grafana
To use the solution with Prometheus and Grafana, you need to select the launch profile – using Visual Studio, select OnPremises in the toolbar after the project selection.
Using the command line, use the --
launch-profile
parameter:
dotnet run --project Codebreaker.AppHost.csproj --launch-profile OnPremises
To also use SQL Server within a Docker container...