2017-07-06 05:38:40 -07:00
|
|
|
// Copyright 2017 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.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
package prometheus;
|
|
|
|
|
|
|
|
import "types.proto";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
option go_package = "prompb";
|
|
|
|
|
|
|
|
option (gogoproto.sizer_all) = true;
|
|
|
|
option (gogoproto.marshaler_all) = true;
|
|
|
|
option (gogoproto.unmarshaler_all) = true;
|
|
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
|
|
|
|
|
|
|
|
service Admin {
|
2017-11-30 02:35:29 -08:00
|
|
|
// Snapshot creates a snapshot of all current data into 'snapshots/<datetime>-<rand>' under the TSDB's data directory.
|
2017-07-06 05:38:40 -07:00
|
|
|
rpc TSDBSnapshot(TSDBSnapshotRequest) returns (TSDBSnapshotResponse) {
|
|
|
|
option (google.api.http) = {
|
2017-07-10 06:44:29 -07:00
|
|
|
post: "/v2/admin/tsdb/snapshot"
|
2017-07-06 05:38:40 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-11-30 02:35:29 -08:00
|
|
|
// CleanTombstones removes the deleted data from disk and cleans up the existing tombstones.
|
|
|
|
rpc TSDBCleanTombstones(TSDBCleanTombstonesRequest) returns (TSDBCleanTombstonesResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v2/admin/tsdb/clean_tombstones"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-06 05:38:40 -07:00
|
|
|
// DeleteSeries deletes data for a selection of series in a time range.
|
|
|
|
rpc DeleteSeries(SeriesDeleteRequest) returns (SeriesDeleteResponse) {
|
|
|
|
option (google.api.http) = {
|
2017-07-10 06:44:29 -07:00
|
|
|
post: "/v2/admin/tsdb/delete_series"
|
2017-07-06 05:38:40 -07:00
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message TSDBSnapshotRequest {
|
2018-03-08 02:43:41 -08:00
|
|
|
bool skip_head = 1;
|
2017-07-06 05:38:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TSDBSnapshotResponse {
|
|
|
|
string name = 1;
|
|
|
|
}
|
|
|
|
|
2017-11-30 02:35:29 -08:00
|
|
|
message TSDBCleanTombstonesRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message TSDBCleanTombstonesResponse {
|
|
|
|
}
|
|
|
|
|
2017-07-06 05:38:40 -07:00
|
|
|
message SeriesDeleteRequest {
|
|
|
|
google.protobuf.Timestamp min_time = 1 [(gogoproto.stdtime) = true];
|
|
|
|
google.protobuf.Timestamp max_time = 2 [(gogoproto.stdtime) = true];
|
|
|
|
repeated LabelMatcher matchers = 3 [(gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message SeriesDeleteResponse {
|
|
|
|
}
|