MyNixOS website logo
option

services.victoriametrics.prometheusConfig

Config for prometheus style metrics. See the docs: https://docs.victoriametrics.com/vmagent/#how-to-collect-metrics-in-prometheus-format for more information.

Declarations
Type
YAML value
Default
{ }
Example
{
  scrape_configs = [
    {
      job_name = "postgres-exporter";
      metrics_path = "/metrics";
      static_configs = [
        {
          targets = ["1.2.3.4:9187"];
          labels.type = "database";
        }
      ];
    }
    {
      job_name = "node-exporter";
      metrics_path = "/metrics";
      static_configs = [
        {
          targets = ["1.2.3.4:9100"];
          labels.type = "node";
        }
        {
          targets = ["5.6.7.8:9100"];
          labels.type = "node";
        }
      ];
    }
  ];
}