2013-02-07 02:38:01 -08:00
|
|
|
// Copyright 2013 Prometheus Team
|
2012-11-26 11:11:34 -08:00
|
|
|
// 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.
|
|
|
|
|
2013-04-24 07:59:40 -07:00
|
|
|
package io.prometheus;
|
|
|
|
|
|
|
|
import "google/protobuf/descriptor.proto";
|
2012-11-24 03:33:34 -08:00
|
|
|
|
2012-12-07 02:55:43 -08:00
|
|
|
message LabelPair {
|
2013-02-08 09:03:26 -08:00
|
|
|
optional string name = 1;
|
|
|
|
optional string value = 2;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2012-12-07 02:55:43 -08:00
|
|
|
message LabelName {
|
2013-02-08 09:03:26 -08:00
|
|
|
optional string name = 1;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2012-12-07 02:55:43 -08:00
|
|
|
message Metric {
|
2013-02-08 09:03:26 -08:00
|
|
|
repeated LabelPair label_pair = 1;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2012-12-07 02:55:43 -08:00
|
|
|
message Fingerprint {
|
2013-02-08 09:03:26 -08:00
|
|
|
optional string signature = 1;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2012-12-07 02:55:43 -08:00
|
|
|
message FingerprintCollection {
|
2013-02-08 09:03:26 -08:00
|
|
|
repeated Fingerprint member = 1;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2012-12-07 02:55:43 -08:00
|
|
|
message LabelSet {
|
2013-02-08 09:03:26 -08:00
|
|
|
repeated LabelPair member = 1;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2013-04-11 09:17:44 -07:00
|
|
|
// 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.
|
2012-12-07 02:55:43 -08:00
|
|
|
message SampleKey {
|
2013-03-01 09:51:36 -08:00
|
|
|
optional Fingerprint fingerprint = 1;
|
|
|
|
optional bytes timestamp = 2;
|
2013-04-11 09:17:44 -07:00
|
|
|
optional sfixed64 last_timestamp = 3;
|
|
|
|
optional fixed32 sample_count = 4;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2013-02-08 09:03:26 -08:00
|
|
|
message SampleValueSeries {
|
|
|
|
message Value {
|
2013-04-21 09:15:56 -07:00
|
|
|
optional int64 timestamp = 1;
|
|
|
|
optional double value = 2;
|
2013-02-08 09:03:26 -08:00
|
|
|
}
|
|
|
|
repeated Value value = 1;
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
|
|
|
|
2012-12-07 02:55:43 -08:00
|
|
|
message MembershipIndexValue {
|
2012-11-24 03:33:34 -08:00
|
|
|
}
|
2013-03-14 19:24:28 -07:00
|
|
|
|
|
|
|
message MetricHighWatermark {
|
|
|
|
optional int64 timestamp = 1;
|
|
|
|
}
|
2013-03-21 10:29:33 -07:00
|
|
|
|
2013-04-05 09:03:45 -07:00
|
|
|
// CompactionProcessorDefinition models a curation process across the sample
|
|
|
|
// corpus that ensures that sparse samples.
|
|
|
|
message CompactionProcessorDefinition {
|
|
|
|
// minimum_group_size identifies how minimally samples should be grouped
|
|
|
|
// together to write a new SampleValueSeries chunk.
|
|
|
|
optional uint32 minimum_group_size = 1;
|
|
|
|
}
|
|
|
|
|
2013-03-21 10:29:33 -07:00
|
|
|
// 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
|
2013-04-05 09:03:45 -07:00
|
|
|
// B, and Curation Processor) has been effectuated on-disk.
|
2013-03-21 10:29:33 -07:00
|
|
|
message CurationKey {
|
|
|
|
// fingerprint identifies the fingerprint for the given policy.
|
2013-04-05 09:03:45 -07:00
|
|
|
optional Fingerprint fingerprint = 1;
|
|
|
|
|
|
|
|
// processor_message_type_name identifies the underlying message type that
|
|
|
|
// was used to encode processor_message_raw.
|
|
|
|
optional string processor_message_type_name = 2;
|
|
|
|
|
|
|
|
// processor_message_raw identifies the serialized ProcessorSignature for this
|
|
|
|
// operation.
|
|
|
|
optional bytes processor_message_raw = 3;
|
|
|
|
|
|
|
|
// ignore_younger_than represents in seconds relative to when the curation
|
|
|
|
// cycle start when the curator should stop operating. For instance, if
|
|
|
|
// the curation cycle starts at time T and the curation remark dictates that
|
|
|
|
// the curation should starts processing samples at time S, the curator should
|
|
|
|
// work from S until ignore_younger_than seconds before T:
|
2013-03-21 10:29:33 -07:00
|
|
|
//
|
2013-04-05 09:03:45 -07:00
|
|
|
// PAST NOW FUTURE
|
|
|
|
//
|
|
|
|
// S--------------->|----------T
|
|
|
|
// |---IYT----|
|
|
|
|
//
|
|
|
|
// [Curation Resumption Time (S), T - IYT)
|
|
|
|
optional int64 ignore_younger_than = 4;
|
|
|
|
|
|
|
|
// This could be populated by decoding the generated descriptor file into a
|
|
|
|
// FileDescriptorSet message and extracting the type definition for the given
|
|
|
|
// message schema that describes processor_message_type_name.
|
|
|
|
//
|
|
|
|
// optional google.protobuf.DescriptorProto processor_message_type_descriptor_raw = 5;
|
2013-03-21 10:29:33 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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;
|
2013-04-11 09:17:44 -07:00
|
|
|
}
|