mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-29 07:29:42 -08:00
71 lines
2.5 KiB
Protocol Buffer
71 lines
2.5 KiB
Protocol Buffer
|
// Copyright 2013 Prometheus Team
|
||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
// you may not use this file except in compliance with the License.
|
||
|
// You may obtain a copy of the License at
|
||
|
//
|
||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||
|
//
|
||
|
// Unless required by applicable law or agreed to in writing, software
|
||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
// See the License for the specific language governing permissions and
|
||
|
// limitations under the License.
|
||
|
|
||
|
package io.prometheus;
|
||
|
|
||
|
// A label/value pair suitable for attaching to timeseries.
|
||
|
message LabelPair {
|
||
|
// The name of the label. Must adhere to the regex "[a-zA-Z_][a-zA-Z0-9_]*".
|
||
|
optional string name = 1;
|
||
|
// The value of the label. May contain any characters.
|
||
|
optional string value = 2;
|
||
|
}
|
||
|
|
||
|
// A set of label/value pairs.
|
||
|
message LabelPairs {
|
||
|
repeated LabelPair label = 1;
|
||
|
}
|
||
|
|
||
|
// The global Prometheus configuration section.
|
||
|
message GlobalConfig {
|
||
|
// How frequently to scrape targets by default. Must be a valid Prometheus
|
||
|
// duration string in the form "[0-9]+[smhdwy]".
|
||
|
optional string scrape_interval = 1 [default = "1m"];
|
||
|
// How frequently to evaluate rules by default. Must be a valid Prometheus
|
||
|
// duration string in the form "[0-9]+[smhdwy]".
|
||
|
optional string evaluation_interval = 2 [default = "1m"];
|
||
|
// The labels to add to any timeseries that this Prometheus instance scrapes.
|
||
|
optional LabelPairs labels = 3;
|
||
|
// The list of file names of rule files to load.
|
||
|
repeated string rule_file = 4;
|
||
|
}
|
||
|
|
||
|
// A labeled group of targets to scrape for a job.
|
||
|
message TargetGroup {
|
||
|
// The list of endpoints to scrape via HTTP.
|
||
|
repeated string target = 1;
|
||
|
// The labels to add to any timeseries scraped for this target group.
|
||
|
optional LabelPairs labels = 2;
|
||
|
}
|
||
|
|
||
|
// The configuration for a Prometheus job to scrape.
|
||
|
message JobConfig {
|
||
|
// The job name. Must adhere to the regex "[a-zA-Z_][a-zA-Z0-9_-]*".
|
||
|
required string name = 1;
|
||
|
// How frequently to scrape targets from this job. Overrides the global
|
||
|
// default.
|
||
|
optional string scrape_interval = 2;
|
||
|
// List of labeled target groups for this job.
|
||
|
repeated TargetGroup target_group = 3;
|
||
|
}
|
||
|
|
||
|
// The top-level Prometheus configuration.
|
||
|
message PrometheusConfig {
|
||
|
// Global Prometheus configuration options. If omitted, an empty global
|
||
|
// configuration with default values (see GlobalConfig definition) will be
|
||
|
// created.
|
||
|
optional GlobalConfig global = 1;
|
||
|
// The list of jobs to scrape.
|
||
|
repeated JobConfig job = 2;
|
||
|
}
|