...

Text file src/github.com/grpc-ecosystem/go-grpc-prometheus/examples/grpc-server-with-prometheus/prometheus/prometheus.yaml

Documentation: github.com/grpc-ecosystem/go-grpc-prometheus/examples/grpc-server-with-prometheus/prometheus

     1# my global config
     2global:
     3  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
     4  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
     5  # scrape_timeout is set to the global default (10s).
     6
     7  # Attach these labels to any time series or alerts when communicating with
     8  # external systems (federation, remote storage, Alertmanager).
     9  external_labels:
    10      monitor: 'kirk-grpc-service-monitor'
    11
    12# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
    13rule_files:
    14  # - "first.rules"
    15  # - "second.rules"
    16
    17# A scrape configuration containing exactly one endpoint to scrape:
    18# Here it's Prometheus itself.
    19scrape_configs:
    20  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
    21
    22  # - job_name: 'prometheus'
    23  #   scrape_interval: 5s
    24  #   static_configs:
    25  #     - targets: ['localhost:9090']
    26
    27  - job_name: 'grpcserver'
    28    scrape_interval: 2s
    29    static_configs:
    30      - targets: ['localhost:9092']

View as plain text