mirror of
https://github.com/juspay/services-flake.git
synced 2024-09-19 08:17:11 +03:00
bdd6dde41a
* prometheus: init service * prometheus: add doc * prometheus: update doc
1.2 KiB
1.2 KiB
Prometheus
Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts when specified conditions are observed.
Getting Started
# In `perSystem.process-compose.<name>`
{
services.prometheus."pro1".enable = true;
}
{#tips}
Tips & Tricks
{#scrape-configs}
Adding Scrape Configs
scrape_configs
controls what resources Prometheus monitors.
Since Prometheus also exposes data about itself as an HTTP endpoint it can scrape and monitor its own health. In the default example configuration there is a single job, called prometheus. We can add it to scrape_configs
using the following config:
{
services.prometheus."pro1" = {
enable = true;
# scrape prometheus
extraConfig = {
scrape_configs = [{
job_name = "prometheus";
static_configs = [{
targets = [ "localhost:9090" ];
}];
}];
};
};
}