mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-13 17:14:05 -08:00
96 lines
3.1 KiB
Protocol Buffer
96 lines
3.1 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 dto;
|
|
|
|
message LabelPair {
|
|
optional string name = 1;
|
|
optional string value = 2;
|
|
}
|
|
|
|
message LabelName {
|
|
optional string name = 1;
|
|
}
|
|
|
|
message Metric {
|
|
repeated LabelPair label_pair = 1;
|
|
}
|
|
|
|
message Fingerprint {
|
|
optional string signature = 1;
|
|
}
|
|
|
|
message FingerprintCollection {
|
|
repeated Fingerprint member = 1;
|
|
}
|
|
|
|
message LabelSet {
|
|
repeated LabelPair member = 1;
|
|
}
|
|
|
|
// The default LevelDB comparator sorts not only lexicographically, but also by
|
|
// key length (which takes precedence). Thus, no variable-length fields may be
|
|
// introduced into the key definition below.
|
|
message SampleKey {
|
|
optional Fingerprint fingerprint = 1;
|
|
optional bytes timestamp = 2;
|
|
optional sfixed64 last_timestamp = 3;
|
|
optional fixed32 sample_count = 4;
|
|
}
|
|
|
|
message SampleValueSeries {
|
|
message Value {
|
|
optional int64 timestamp = 1;
|
|
optional float value = 2;
|
|
}
|
|
repeated Value value = 1;
|
|
}
|
|
|
|
message MembershipIndexValue {
|
|
}
|
|
|
|
message MetricHighWatermark {
|
|
optional int64 timestamp = 1;
|
|
}
|
|
|
|
// CurationKey models the state of curation for a given metric fingerprint and
|
|
// its associated samples. The time series database only knows about compaction
|
|
// and resampling behaviors that are explicitly defined to it in its runtime
|
|
// configuration, meaning it never scans on-disk tables for CurationKey
|
|
// policies; rather, it looks up via the CurationKey tuple to find out what the
|
|
// effectuation state for a given metric fingerprint is.
|
|
//
|
|
// For instance, how far along as a rule for (Fingerprint A, Samples Older Than
|
|
// B, and Grouped Together in Size of C) has been effectuated on-disk.
|
|
message CurationKey {
|
|
// fingerprint identifies the fingerprint for the given policy.
|
|
optional Fingerprint fingerprint = 1;
|
|
// older_than represents in seconds relative to when curation cycle starts
|
|
// into the past when the curator should stop operating on a given metric
|
|
// fingerprint's samples:
|
|
//
|
|
// [Oldest Sample Time, time.Now().Sub(time.Second * older_than))
|
|
optional int64 older_than = 2;
|
|
// minimum_group_size identifies how minimally samples should be grouped
|
|
// together to write a new SampleValueSeries chunk.
|
|
optional uint32 minimum_group_size = 3;
|
|
}
|
|
|
|
// CurationValue models the progress for a given CurationKey.
|
|
message CurationValue {
|
|
// last_completion_timestamp represents the seconds since the epoch UTC at
|
|
// which the curator last completed its duty cycle for a given metric
|
|
// fingerprint.
|
|
optional int64 last_completion_timestamp = 1;
|
|
}
|