diff --git a/CHANGELOG.md b/CHANGELOG.md index 69683d2aa7..4ae3e3083e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,14 +10,12 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan We use _breaking :warning:_ to mark changes that are not backward compatible (relates only to v0.y.z releases.) -## Unreleased + +### Added - [#4029](https://github.com/thanos-io/thanos/pull/4029) Mixin: Remove dependency on the rule dashboard when generating the compact dashboard - [#4019](https://github.com/thanos-io/thanos/pull/4019) Query: Adds query range histogram. - [#3350](https://github.com/thanos-io/thanos/pull/3350) Query/Sidecar: Added targets API support. You can now configure you Querier to fetch Prometheus targets from leaf Prometheus-es! - -### Added - - [#3977](https://github.com/thanos-io/thanos/pull/3903) Expose exemplars for `http_request_duration_seconds` histogram if tracing is enabled. - [#3903](https://github.com/thanos-io/thanos/pull/3903) Store: Returning custom grpc code when reaching series/chunk limits. - [#3919](https://github.com/thanos-io/thanos/pull/3919) Allow to disable automatically setting CORS headers using `--web.disable-cors` flag in each component that exposes an API. @@ -40,9 +38,7 @@ We use _breaking :warning:_ to mark changes that are not backward compatible (re ### Removed -## [v0.19.0-rc.2](https://github.com/thanos-io/thanos/releases/tag/v0.19.0-rc.2) - 2021.03.24 - -### Added +## [v0.19.0](https://github.com/thanos-io/thanos/releases/tag/v0.19.0) - 2021.03.31 - [#3700](https://github.com/thanos-io/thanos/pull/3700) Compact/Web: Make old bucket viewer UI work with vanilla Prometheus blocks. - [#3657](https://github.com/thanos-io/thanos/pull/3657) *: It's now possible to configure HTTP transport options for S3 client. @@ -65,7 +61,8 @@ We use _breaking :warning:_ to mark changes that are not backward compatible (re - [#3815](https://github.com/thanos-io/thanos/pull/3815) Receive: Improve handling of empty time series from clients - [#3795](https://github.com/thanos-io/thanos/pull/3795) s3: A truncated "get object" response is reported as error. - [#3899](https://github.com/thanos-io/thanos/pull/3899) Receive: Correct the inference of client gRPC configuration. -- [#3943](https://github.com/thanos-io/thanos/pull/3943): Receive: Fixed memory regression introduced in v0.17.0. +- [#3943](https://github.com/thanos-io/thanos/pull/3943) Receive: Fixed memory regression introduced in v0.17.0. +- [#3960](https://github.com/thanos-io/thanos/pull/3960) Query: Fixed deduplication of equal alerts with different labels. ### Changed diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 3d728f6bc1..a3aa5c65a1 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -58,7 +58,7 @@ func registerReceive(app *extkingpin.App) { rwClientCert := cmd.Flag("remote-write.client-tls-cert", "TLS Certificates to use to identify this client to the server.").Default("").String() rwClientKey := cmd.Flag("remote-write.client-tls-key", "TLS Key for the client's certificate.").Default("").String() rwClientServerCA := cmd.Flag("remote-write.client-tls-ca", "TLS CA Certificates to use to verify servers.").Default("").String() - rwClientServerName := cmd.Flag("remote-write.client-server-name", "Server name to verify the hostname on the returned gRPC certificates. See https://tools.ietf.org/html/rfc4366#section-3.1").Default("").String() + rwClientServerName := cmd.Flag("remote-write.client-server-name", "Server name to verify the hostname on the returned TLS certificates. See https://tools.ietf.org/html/rfc4366#section-3.1").Default("").String() dataDir := cmd.Flag("tsdb.path", "Data directory of TSDB."). Default("./data").String() @@ -233,7 +233,17 @@ func runReceive( if err != nil { return err } - dialOpts, err := extgrpc.StoreClientGRPCOpts(logger, reg, tracer, rwServerCert != "", rwServerClientCA == "", rwClientCert, rwClientKey, rwClientServerCA, rwClientServerName) + dialOpts, err := extgrpc.StoreClientGRPCOpts( + logger, + reg, + tracer, + rwServerCert != "", + rwServerClientCA == "", + rwClientCert, + rwClientKey, + rwClientServerCA, + rwClientServerName, + ) if err != nil { return err } diff --git a/docs/components/receive.md b/docs/components/receive.md index 41327de9b9..f5d8b51870 100644 --- a/docs/components/receive.md +++ b/docs/components/receive.md @@ -129,7 +129,7 @@ Flags: TLS CA Certificates to use to verify servers. --remote-write.client-server-name="" Server name to verify the hostname on the - returned gRPC certificates. See + returned TLS certificates. See https://tools.ietf.org/html/rfc4366#section-3.1 --tsdb.path="./data" Data directory of TSDB. --label=key="value" ... External labels to announce. This flag will be diff --git a/pkg/api/query/v1.go b/pkg/api/query/v1.go index 4c78452170..4089488cfd 100644 --- a/pkg/api/query/v1.go +++ b/pkg/api/query/v1.go @@ -908,7 +908,7 @@ func NewMetricMetadataHandler(client metadata.UnaryClient, enablePartialResponse } return func(r *http.Request) (interface{}, []error, *api.ApiError) { - req := &metadatapb.MetadataRequest{ + req := &metadatapb.MetricMetadataRequest{ // By default we use -1, which means no limit. Limit: -1, Metric: r.URL.Query().Get("metric"), @@ -924,7 +924,7 @@ func NewMetricMetadataHandler(client metadata.UnaryClient, enablePartialResponse req.Limit = int32(limit) } - t, warnings, err := client.Metadata(r.Context(), req) + t, warnings, err := client.MetricMetadata(r.Context(), req) if err != nil { return nil, nil, &api.ApiError{Typ: api.ErrorInternal, Err: errors.Wrap(err, "retrieving metadata")} } diff --git a/pkg/metadata/metadata.go b/pkg/metadata/metadata.go index 9396b88192..c92bfda160 100644 --- a/pkg/metadata/metadata.go +++ b/pkg/metadata/metadata.go @@ -13,10 +13,10 @@ import ( var _ UnaryClient = &GRPCClient{} -// UnaryClient is gRPC metadatapb.Metadata client which expands streaming metadata API. Useful for consumers that does not +// UnaryClient is a gRPC metadatapb.Metadata client which expands streaming metadata API. Useful for consumers that does not // support streaming. type UnaryClient interface { - Metadata(ctx context.Context, req *metadatapb.MetadataRequest) (map[string][]metadatapb.Meta, storage.Warnings, error) + MetricMetadata(ctx context.Context, req *metadatapb.MetricMetadataRequest) (map[string][]metadatapb.Meta, storage.Warnings, error) } // GRPCClient allows to retrieve metadata from local gRPC streaming server implementation. @@ -31,7 +31,7 @@ func NewGRPCClient(ts metadatapb.MetadataServer) *GRPCClient { } } -func (rr *GRPCClient) Metadata(ctx context.Context, req *metadatapb.MetadataRequest) (map[string][]metadatapb.Meta, storage.Warnings, error) { +func (rr *GRPCClient) MetricMetadata(ctx context.Context, req *metadatapb.MetricMetadataRequest) (map[string][]metadatapb.Meta, storage.Warnings, error) { srv := &metadataServer{ctx: ctx, metric: req.Metric, limit: int(req.Limit)} if req.Limit >= 0 { @@ -46,8 +46,8 @@ func (rr *GRPCClient) Metadata(ctx context.Context, req *metadatapb.MetadataRequ srv.metadataMap = make(map[string][]metadatapb.Meta) } - if err := rr.proxy.Metadata(req, srv); err != nil { - return nil, nil, errors.Wrap(err, "proxy Metadata") + if err := rr.proxy.MetricMetadata(req, srv); err != nil { + return nil, nil, errors.Wrap(err, "proxy MetricMetadata") } return srv.metadataMap, srv.warnings, nil @@ -55,7 +55,7 @@ func (rr *GRPCClient) Metadata(ctx context.Context, req *metadatapb.MetadataRequ type metadataServer struct { // This field just exist to pseudo-implement the unused methods of the interface. - metadatapb.Metadata_MetadataServer + metadatapb.Metadata_MetricMetadataServer ctx context.Context metric string @@ -65,7 +65,7 @@ type metadataServer struct { metadataMap map[string][]metadatapb.Meta } -func (srv *metadataServer) Send(res *metadatapb.MetadataResponse) error { +func (srv *metadataServer) Send(res *metadatapb.MetricMetadataResponse) error { if res.GetWarning() != "" { srv.warnings = append(srv.warnings, errors.New(res.GetWarning())) return nil diff --git a/pkg/metadata/metadatapb/custom.go b/pkg/metadata/metadatapb/custom.go index 36f53a0889..697277aaa3 100644 --- a/pkg/metadata/metadatapb/custom.go +++ b/pkg/metadata/metadatapb/custom.go @@ -7,17 +7,17 @@ import ( "unsafe" ) -func NewMetadataResponse(metadata *MetricMetadata) *MetadataResponse { - return &MetadataResponse{ - Result: &MetadataResponse_Metadata{ +func NewMetricMetadataResponse(metadata *MetricMetadata) *MetricMetadataResponse { + return &MetricMetadataResponse{ + Result: &MetricMetadataResponse_Metadata{ Metadata: metadata, }, } } -func NewWarningMetadataResponse(warning error) *MetadataResponse { - return &MetadataResponse{ - Result: &MetadataResponse_Warning{ +func NewWarningMetadataResponse(warning error) *MetricMetadataResponse { + return &MetricMetadataResponse{ + Result: &MetricMetadataResponse_Warning{ Warning: warning.Error(), }, } diff --git a/pkg/metadata/metadatapb/rpc.pb.go b/pkg/metadata/metadatapb/rpc.pb.go index 2eb0805824..e7b51b665a 100644 --- a/pkg/metadata/metadatapb/rpc.pb.go +++ b/pkg/metadata/metadatapb/rpc.pb.go @@ -29,24 +29,24 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type MetadataRequest struct { +type MetricMetadataRequest struct { Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` PartialResponseStrategy storepb.PartialResponseStrategy `protobuf:"varint,3,opt,name=partial_response_strategy,json=partialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partial_response_strategy,omitempty"` } -func (m *MetadataRequest) Reset() { *m = MetadataRequest{} } -func (m *MetadataRequest) String() string { return proto.CompactTextString(m) } -func (*MetadataRequest) ProtoMessage() {} -func (*MetadataRequest) Descriptor() ([]byte, []int) { +func (m *MetricMetadataRequest) Reset() { *m = MetricMetadataRequest{} } +func (m *MetricMetadataRequest) String() string { return proto.CompactTextString(m) } +func (*MetricMetadataRequest) ProtoMessage() {} +func (*MetricMetadataRequest) Descriptor() ([]byte, []int) { return fileDescriptor_1d9ae5661e0dc3fc, []int{0} } -func (m *MetadataRequest) XXX_Unmarshal(b []byte) error { +func (m *MetricMetadataRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MetricMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MetadataRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MetricMetadataRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -56,37 +56,37 @@ func (m *MetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *MetadataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetadataRequest.Merge(m, src) +func (m *MetricMetadataRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricMetadataRequest.Merge(m, src) } -func (m *MetadataRequest) XXX_Size() int { +func (m *MetricMetadataRequest) XXX_Size() int { return m.Size() } -func (m *MetadataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MetadataRequest.DiscardUnknown(m) +func (m *MetricMetadataRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MetricMetadataRequest.DiscardUnknown(m) } -var xxx_messageInfo_MetadataRequest proto.InternalMessageInfo +var xxx_messageInfo_MetricMetadataRequest proto.InternalMessageInfo -type MetadataResponse struct { +type MetricMetadataResponse struct { // Types that are valid to be assigned to Result: - // *MetadataResponse_Metadata - // *MetadataResponse_Warning - Result isMetadataResponse_Result `protobuf_oneof:"result"` + // *MetricMetadataResponse_Metadata + // *MetricMetadataResponse_Warning + Result isMetricMetadataResponse_Result `protobuf_oneof:"result"` } -func (m *MetadataResponse) Reset() { *m = MetadataResponse{} } -func (m *MetadataResponse) String() string { return proto.CompactTextString(m) } -func (*MetadataResponse) ProtoMessage() {} -func (*MetadataResponse) Descriptor() ([]byte, []int) { +func (m *MetricMetadataResponse) Reset() { *m = MetricMetadataResponse{} } +func (m *MetricMetadataResponse) String() string { return proto.CompactTextString(m) } +func (*MetricMetadataResponse) ProtoMessage() {} +func (*MetricMetadataResponse) Descriptor() ([]byte, []int) { return fileDescriptor_1d9ae5661e0dc3fc, []int{1} } -func (m *MetadataResponse) XXX_Unmarshal(b []byte) error { +func (m *MetricMetadataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MetricMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MetadataResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MetricMetadataResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -96,60 +96,60 @@ func (m *MetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MetadataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetadataResponse.Merge(m, src) +func (m *MetricMetadataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricMetadataResponse.Merge(m, src) } -func (m *MetadataResponse) XXX_Size() int { +func (m *MetricMetadataResponse) XXX_Size() int { return m.Size() } -func (m *MetadataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MetadataResponse.DiscardUnknown(m) +func (m *MetricMetadataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MetricMetadataResponse.DiscardUnknown(m) } -var xxx_messageInfo_MetadataResponse proto.InternalMessageInfo +var xxx_messageInfo_MetricMetadataResponse proto.InternalMessageInfo -type isMetadataResponse_Result interface { - isMetadataResponse_Result() +type isMetricMetadataResponse_Result interface { + isMetricMetadataResponse_Result() MarshalTo([]byte) (int, error) Size() int } -type MetadataResponse_Metadata struct { +type MetricMetadataResponse_Metadata struct { Metadata *MetricMetadata `protobuf:"bytes,1,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"` } -type MetadataResponse_Warning struct { +type MetricMetadataResponse_Warning struct { Warning string `protobuf:"bytes,2,opt,name=warning,proto3,oneof" json:"warning,omitempty"` } -func (*MetadataResponse_Metadata) isMetadataResponse_Result() {} -func (*MetadataResponse_Warning) isMetadataResponse_Result() {} +func (*MetricMetadataResponse_Metadata) isMetricMetadataResponse_Result() {} +func (*MetricMetadataResponse_Warning) isMetricMetadataResponse_Result() {} -func (m *MetadataResponse) GetResult() isMetadataResponse_Result { +func (m *MetricMetadataResponse) GetResult() isMetricMetadataResponse_Result { if m != nil { return m.Result } return nil } -func (m *MetadataResponse) GetMetadata() *MetricMetadata { - if x, ok := m.GetResult().(*MetadataResponse_Metadata); ok { +func (m *MetricMetadataResponse) GetMetadata() *MetricMetadata { + if x, ok := m.GetResult().(*MetricMetadataResponse_Metadata); ok { return x.Metadata } return nil } -func (m *MetadataResponse) GetWarning() string { - if x, ok := m.GetResult().(*MetadataResponse_Warning); ok { +func (m *MetricMetadataResponse) GetWarning() string { + if x, ok := m.GetResult().(*MetricMetadataResponse_Warning); ok { return x.Warning } return "" } // XXX_OneofWrappers is for the internal use of the proto package. -func (*MetadataResponse) XXX_OneofWrappers() []interface{} { +func (*MetricMetadataResponse) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*MetadataResponse_Metadata)(nil), - (*MetadataResponse_Warning)(nil), + (*MetricMetadataResponse_Metadata)(nil), + (*MetricMetadataResponse_Warning)(nil), } } @@ -267,8 +267,8 @@ func (m *Meta) XXX_DiscardUnknown() { var xxx_messageInfo_Meta proto.InternalMessageInfo func init() { - proto.RegisterType((*MetadataRequest)(nil), "thanos.MetadataRequest") - proto.RegisterType((*MetadataResponse)(nil), "thanos.MetadataResponse") + proto.RegisterType((*MetricMetadataRequest)(nil), "thanos.MetricMetadataRequest") + proto.RegisterType((*MetricMetadataResponse)(nil), "thanos.MetricMetadataResponse") proto.RegisterType((*MetricMetadata)(nil), "thanos.MetricMetadata") proto.RegisterMapType((map[string]MetricMetadataEntry)(nil), "thanos.MetricMetadata.MetadataEntry") proto.RegisterType((*MetricMetadataEntry)(nil), "thanos.MetricMetadataEntry") @@ -278,36 +278,37 @@ func init() { func init() { proto.RegisterFile("metadata/metadatapb/rpc.proto", fileDescriptor_1d9ae5661e0dc3fc) } var fileDescriptor_1d9ae5661e0dc3fc = []byte{ - // 463 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xf6, 0xe6, 0x8f, 0x74, 0x02, 0xa5, 0x5a, 0xaa, 0xd6, 0x35, 0xe0, 0x44, 0x16, 0x07, 0x9f, - 0x62, 0x30, 0x1c, 0x10, 0x97, 0x4a, 0x91, 0x40, 0x95, 0x50, 0x25, 0xb4, 0x5c, 0x10, 0x1c, 0xca, - 0xa6, 0xac, 0x52, 0x0b, 0xc7, 0x5e, 0x76, 0xd7, 0x20, 0xbf, 0x05, 0x0f, 0xc0, 0x53, 0xf0, 0x14, - 0x39, 0xf6, 0xc8, 0xa9, 0x82, 0xe4, 0xc6, 0x53, 0xa0, 0xdd, 0xb5, 0x5b, 0x47, 0xf8, 0x32, 0xfa, - 0x66, 0xbe, 0xcf, 0x33, 0x9f, 0x66, 0xc7, 0xf0, 0x70, 0xc9, 0x14, 0xfd, 0x44, 0x15, 0x8d, 0x6a, - 0xc0, 0xe7, 0x91, 0xe0, 0xe7, 0x53, 0x2e, 0x72, 0x95, 0xe3, 0x81, 0xba, 0xa0, 0x59, 0x2e, 0xbd, - 0x23, 0xa9, 0x72, 0xc1, 0x22, 0x13, 0xf9, 0x3c, 0x52, 0x25, 0x67, 0xd2, 0x4a, 0xbc, 0xfd, 0x45, - 0xbe, 0xc8, 0x0d, 0x8c, 0x34, 0xb2, 0xd5, 0xe0, 0x07, 0x82, 0xbb, 0xa7, 0x55, 0x47, 0xc2, 0xbe, - 0x14, 0x4c, 0x2a, 0x7c, 0x00, 0x83, 0x25, 0x53, 0x22, 0x39, 0x77, 0xd1, 0x04, 0x85, 0x3b, 0xa4, - 0xca, 0xf0, 0x3e, 0xf4, 0xd3, 0x64, 0x99, 0x28, 0xb7, 0x33, 0x41, 0x61, 0x9f, 0xd8, 0x04, 0x7f, - 0x80, 0x23, 0x4e, 0x85, 0x4a, 0x68, 0x7a, 0x26, 0x98, 0xe4, 0x79, 0x26, 0xd9, 0x99, 0x54, 0x82, - 0x2a, 0xb6, 0x28, 0xdd, 0xee, 0x04, 0x85, 0xbb, 0xf1, 0x78, 0x6a, 0xed, 0x4d, 0xdf, 0x58, 0x21, - 0xa9, 0x74, 0x6f, 0x2b, 0x19, 0x39, 0xe4, 0xed, 0x44, 0x90, 0xc1, 0xde, 0x8d, 0x3b, 0xcb, 0xe1, - 0x67, 0x30, 0xac, 0x77, 0x60, 0x0c, 0x8e, 0xe2, 0x83, 0xba, 0xff, 0xa9, 0x31, 0x5a, 0x7f, 0x71, - 0xe2, 0x90, 0x6b, 0x25, 0xf6, 0xe0, 0xd6, 0x37, 0x2a, 0xb2, 0x24, 0x5b, 0x18, 0xfb, 0x3b, 0x27, - 0x0e, 0xa9, 0x0b, 0xb3, 0x21, 0x0c, 0x04, 0x93, 0x45, 0xaa, 0x82, 0x9f, 0x08, 0x76, 0xb7, 0x9b, - 0xe0, 0x57, 0x5b, 0xe3, 0xba, 0xe1, 0x28, 0x7e, 0xd4, 0x3e, 0x6e, 0x5a, 0x83, 0x97, 0x99, 0x12, - 0xe5, 0xac, 0xb7, 0xba, 0x1a, 0x37, 0x0c, 0x78, 0xef, 0xe0, 0xce, 0x96, 0x00, 0xef, 0x41, 0xf7, - 0x33, 0x2b, 0xab, 0x1d, 0x6b, 0x88, 0x9f, 0x40, 0xff, 0x2b, 0x4d, 0x0b, 0x66, 0x1c, 0x8e, 0xe2, - 0xfb, 0xed, 0x73, 0xcc, 0xd7, 0xc4, 0x2a, 0x5f, 0x74, 0x9e, 0xa3, 0xe0, 0x18, 0xee, 0xb5, 0x28, - 0x70, 0x08, 0x7d, 0x3d, 0x5c, 0xba, 0x1d, 0xe3, 0xfa, 0x76, 0xa3, 0x1b, 0xad, 0xdc, 0x59, 0x41, - 0xf0, 0x11, 0x7a, 0xba, 0x88, 0x1f, 0x40, 0x4f, 0x5f, 0x8c, 0xb5, 0x34, 0x1b, 0xfe, 0xbd, 0x1a, - 0x9b, 0x9c, 0x98, 0xa8, 0xd9, 0x0b, 0x96, 0x72, 0xbb, 0x3e, 0xcb, 0xea, 0x9c, 0x98, 0xa8, 0xd9, - 0x22, 0x4b, 0x94, 0x79, 0xf1, 0x8a, 0xd5, 0x39, 0x31, 0x31, 0x7e, 0x0d, 0xc3, 0xeb, 0x85, 0x1e, - 0x37, 0xf0, 0x61, 0xd3, 0x54, 0xe3, 0x06, 0x3d, 0xf7, 0x7f, 0xc2, 0x3e, 0xff, 0x63, 0x34, 0x0b, - 0x57, 0x7f, 0x7c, 0x67, 0xb5, 0xf6, 0xd1, 0xe5, 0xda, 0x47, 0xbf, 0xd7, 0x3e, 0xfa, 0xbe, 0xf1, - 0x9d, 0xcb, 0x8d, 0xef, 0xfc, 0xda, 0xf8, 0xce, 0x7b, 0xb8, 0xf9, 0x41, 0xe6, 0x03, 0x73, 0xe4, - 0x4f, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x08, 0x77, 0xe4, 0x56, 0x3e, 0x03, 0x00, 0x00, + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xcd, 0x6e, 0x13, 0x31, + 0x10, 0x5e, 0xe7, 0x8f, 0x74, 0x02, 0x15, 0x32, 0x25, 0xa4, 0x0b, 0xdd, 0x44, 0x2b, 0x0e, 0x7b, + 0xca, 0xc2, 0xc2, 0x01, 0x71, 0x41, 0x8a, 0x04, 0xea, 0xa5, 0x12, 0x98, 0x0b, 0x02, 0xa1, 0xe2, + 0x14, 0x2b, 0x5d, 0xb1, 0xd9, 0x35, 0xf6, 0x04, 0x94, 0xb7, 0xe0, 0x19, 0x78, 0x04, 0x9e, 0x22, + 0xc7, 0x1e, 0x39, 0x55, 0x90, 0xdc, 0x78, 0x0a, 0x64, 0x7b, 0xb7, 0x34, 0xb0, 0x5c, 0x46, 0x33, + 0xf3, 0x7d, 0x9e, 0xf9, 0x3c, 0x1e, 0xc3, 0xc1, 0x5c, 0x20, 0x7f, 0xcf, 0x91, 0xc7, 0x95, 0x23, + 0xa7, 0xb1, 0x92, 0x27, 0x63, 0xa9, 0x0a, 0x2c, 0x68, 0x07, 0x4f, 0x79, 0x5e, 0x68, 0x7f, 0x5f, + 0x63, 0xa1, 0x44, 0x6c, 0xad, 0x9c, 0xc6, 0xb8, 0x94, 0x42, 0x3b, 0x8a, 0xbf, 0x37, 0x2b, 0x66, + 0x85, 0x75, 0x63, 0xe3, 0xb9, 0x6c, 0xf8, 0x95, 0xc0, 0xcd, 0x23, 0x81, 0x2a, 0x3d, 0x39, 0x2a, + 0xeb, 0x32, 0xf1, 0x71, 0x21, 0x34, 0xd2, 0x3e, 0x74, 0xe6, 0x16, 0x18, 0x90, 0x11, 0x89, 0x76, + 0x58, 0x19, 0xd1, 0x3d, 0x68, 0x67, 0xe9, 0x3c, 0xc5, 0x41, 0x63, 0x44, 0xa2, 0x36, 0x73, 0x01, + 0x7d, 0x03, 0xfb, 0x92, 0x2b, 0x4c, 0x79, 0x76, 0xac, 0x84, 0x96, 0x45, 0xae, 0xc5, 0xb1, 0x46, + 0xc5, 0x51, 0xcc, 0x96, 0x83, 0xe6, 0x88, 0x44, 0xbb, 0xc9, 0x70, 0xec, 0x44, 0x8e, 0x9f, 0x3b, + 0x22, 0x2b, 0x79, 0x2f, 0x4b, 0x1a, 0xbb, 0x25, 0xeb, 0x81, 0x10, 0xa1, 0xff, 0xb7, 0x46, 0xc7, + 0xa0, 0x0f, 0xa1, 0x5b, 0xcd, 0xc3, 0xca, 0xec, 0x25, 0xfd, 0xaa, 0xcb, 0xf6, 0x89, 0x43, 0x8f, + 0x5d, 0x30, 0xa9, 0x0f, 0x57, 0x3e, 0x73, 0x95, 0xa7, 0xf9, 0xcc, 0x5e, 0x62, 0xe7, 0xd0, 0x63, + 0x55, 0x62, 0xd2, 0x85, 0x8e, 0x12, 0x7a, 0x91, 0x61, 0xf8, 0x8d, 0xc0, 0xee, 0x76, 0x11, 0xfa, + 0x6c, 0xab, 0x5d, 0x33, 0xea, 0x25, 0x77, 0xeb, 0xdb, 0x8d, 0x2b, 0xe7, 0x69, 0x8e, 0x6a, 0x39, + 0x69, 0xad, 0xce, 0x87, 0x97, 0x04, 0xf8, 0xaf, 0xe0, 0xda, 0x16, 0x81, 0x5e, 0x87, 0xe6, 0x07, + 0xb1, 0x2c, 0x27, 0x6d, 0x5c, 0x7a, 0x1f, 0xda, 0x9f, 0x78, 0xb6, 0x10, 0x56, 0x61, 0x2f, 0xb9, + 0x5d, 0xdf, 0xc7, 0x9e, 0x66, 0x8e, 0xf9, 0xb8, 0xf1, 0x88, 0x84, 0x4f, 0xe0, 0x46, 0x0d, 0x83, + 0x46, 0xd0, 0x36, 0xcd, 0xf5, 0xa0, 0x61, 0x55, 0x5f, 0xbd, 0x54, 0x8d, 0x97, 0xea, 0x1c, 0x21, + 0x7c, 0x07, 0x2d, 0x93, 0xa4, 0x77, 0xa0, 0x65, 0xb6, 0xc7, 0x49, 0x9a, 0x74, 0x7f, 0x9d, 0x0f, + 0x6d, 0xcc, 0xac, 0x35, 0xe8, 0xa9, 0xc8, 0xa4, 0x1b, 0x9f, 0x43, 0x4d, 0xcc, 0xac, 0x35, 0xe8, + 0x22, 0x4f, 0xd1, 0xbe, 0x7b, 0x89, 0x9a, 0x98, 0x59, 0x9b, 0xbc, 0x85, 0xee, 0xc5, 0x40, 0x5f, + 0xfc, 0x33, 0xe2, 0x83, 0xfa, 0x8b, 0x96, 0x5b, 0xe9, 0x07, 0xff, 0x83, 0xdd, 0x42, 0xdc, 0x23, + 0x93, 0x68, 0xf5, 0x33, 0xf0, 0x56, 0xeb, 0x80, 0x9c, 0xad, 0x03, 0xf2, 0x63, 0x1d, 0x90, 0x2f, + 0x9b, 0xc0, 0x3b, 0xdb, 0x04, 0xde, 0xf7, 0x4d, 0xe0, 0xbd, 0x86, 0x3f, 0xdf, 0x67, 0xda, 0xb1, + 0x5f, 0xe0, 0xc1, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x76, 0xe8, 0xa7, 0x5c, 0x03, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -322,7 +323,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MetadataClient interface { - Metadata(ctx context.Context, in *MetadataRequest, opts ...grpc.CallOption) (Metadata_MetadataClient, error) + MetricMetadata(ctx context.Context, in *MetricMetadataRequest, opts ...grpc.CallOption) (Metadata_MetricMetadataClient, error) } type metadataClient struct { @@ -333,12 +334,12 @@ func NewMetadataClient(cc *grpc.ClientConn) MetadataClient { return &metadataClient{cc} } -func (c *metadataClient) Metadata(ctx context.Context, in *MetadataRequest, opts ...grpc.CallOption) (Metadata_MetadataClient, error) { - stream, err := c.cc.NewStream(ctx, &_Metadata_serviceDesc.Streams[0], "/thanos.Metadata/Metadata", opts...) +func (c *metadataClient) MetricMetadata(ctx context.Context, in *MetricMetadataRequest, opts ...grpc.CallOption) (Metadata_MetricMetadataClient, error) { + stream, err := c.cc.NewStream(ctx, &_Metadata_serviceDesc.Streams[0], "/thanos.Metadata/MetricMetadata", opts...) if err != nil { return nil, err } - x := &metadataMetadataClient{stream} + x := &metadataMetricMetadataClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -348,17 +349,17 @@ func (c *metadataClient) Metadata(ctx context.Context, in *MetadataRequest, opts return x, nil } -type Metadata_MetadataClient interface { - Recv() (*MetadataResponse, error) +type Metadata_MetricMetadataClient interface { + Recv() (*MetricMetadataResponse, error) grpc.ClientStream } -type metadataMetadataClient struct { +type metadataMetricMetadataClient struct { grpc.ClientStream } -func (x *metadataMetadataClient) Recv() (*MetadataResponse, error) { - m := new(MetadataResponse) +func (x *metadataMetricMetadataClient) Recv() (*MetricMetadataResponse, error) { + m := new(MetricMetadataResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -367,39 +368,39 @@ func (x *metadataMetadataClient) Recv() (*MetadataResponse, error) { // MetadataServer is the server API for Metadata service. type MetadataServer interface { - Metadata(*MetadataRequest, Metadata_MetadataServer) error + MetricMetadata(*MetricMetadataRequest, Metadata_MetricMetadataServer) error } // UnimplementedMetadataServer can be embedded to have forward compatible implementations. type UnimplementedMetadataServer struct { } -func (*UnimplementedMetadataServer) Metadata(req *MetadataRequest, srv Metadata_MetadataServer) error { - return status.Errorf(codes.Unimplemented, "method Metadata not implemented") +func (*UnimplementedMetadataServer) MetricMetadata(req *MetricMetadataRequest, srv Metadata_MetricMetadataServer) error { + return status.Errorf(codes.Unimplemented, "method MetricMetadata not implemented") } func RegisterMetadataServer(s *grpc.Server, srv MetadataServer) { s.RegisterService(&_Metadata_serviceDesc, srv) } -func _Metadata_Metadata_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(MetadataRequest) +func _Metadata_MetricMetadata_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(MetricMetadataRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(MetadataServer).Metadata(m, &metadataMetadataServer{stream}) + return srv.(MetadataServer).MetricMetadata(m, &metadataMetricMetadataServer{stream}) } -type Metadata_MetadataServer interface { - Send(*MetadataResponse) error +type Metadata_MetricMetadataServer interface { + Send(*MetricMetadataResponse) error grpc.ServerStream } -type metadataMetadataServer struct { +type metadataMetricMetadataServer struct { grpc.ServerStream } -func (x *metadataMetadataServer) Send(m *MetadataResponse) error { +func (x *metadataMetricMetadataServer) Send(m *MetricMetadataResponse) error { return x.ServerStream.SendMsg(m) } @@ -409,15 +410,15 @@ var _Metadata_serviceDesc = grpc.ServiceDesc{ Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { - StreamName: "Metadata", - Handler: _Metadata_Metadata_Handler, + StreamName: "MetricMetadata", + Handler: _Metadata_MetricMetadata_Handler, ServerStreams: true, }, }, Metadata: "metadata/metadatapb/rpc.proto", } -func (m *MetadataRequest) Marshal() (dAtA []byte, err error) { +func (m *MetricMetadataRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -427,12 +428,12 @@ func (m *MetadataRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MetadataRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MetricMetadataRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MetricMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -457,7 +458,7 @@ func (m *MetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MetadataResponse) Marshal() (dAtA []byte, err error) { +func (m *MetricMetadataResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -467,12 +468,12 @@ func (m *MetadataResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MetadataResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MetricMetadataResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MetricMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -489,12 +490,12 @@ func (m *MetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MetadataResponse_Metadata) MarshalTo(dAtA []byte) (int, error) { +func (m *MetricMetadataResponse_Metadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MetadataResponse_Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MetricMetadataResponse_Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.Metadata != nil { { @@ -510,12 +511,12 @@ func (m *MetadataResponse_Metadata) MarshalToSizedBuffer(dAtA []byte) (int, erro } return len(dAtA) - i, nil } -func (m *MetadataResponse_Warning) MarshalTo(dAtA []byte) (int, error) { +func (m *MetricMetadataResponse_Warning) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MetadataResponse_Warning) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MetricMetadataResponse_Warning) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.Warning) copy(dAtA[i:], m.Warning) @@ -663,7 +664,7 @@ func encodeVarintRpc(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MetadataRequest) Size() (n int) { +func (m *MetricMetadataRequest) Size() (n int) { if m == nil { return 0 } @@ -682,7 +683,7 @@ func (m *MetadataRequest) Size() (n int) { return n } -func (m *MetadataResponse) Size() (n int) { +func (m *MetricMetadataResponse) Size() (n int) { if m == nil { return 0 } @@ -694,7 +695,7 @@ func (m *MetadataResponse) Size() (n int) { return n } -func (m *MetadataResponse_Metadata) Size() (n int) { +func (m *MetricMetadataResponse_Metadata) Size() (n int) { if m == nil { return 0 } @@ -706,7 +707,7 @@ func (m *MetadataResponse_Metadata) Size() (n int) { } return n } -func (m *MetadataResponse_Warning) Size() (n int) { +func (m *MetricMetadataResponse_Warning) Size() (n int) { if m == nil { return 0 } @@ -776,7 +777,7 @@ func sovRpc(x uint64) (n int) { func sozRpc(x uint64) (n int) { return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MetadataRequest) Unmarshal(dAtA []byte) error { +func (m *MetricMetadataRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -799,10 +800,10 @@ func (m *MetadataRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MetadataRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MetricMetadataRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MetricMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -896,7 +897,7 @@ func (m *MetadataRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *MetadataResponse) Unmarshal(dAtA []byte) error { +func (m *MetricMetadataResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -919,10 +920,10 @@ func (m *MetadataResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MetadataResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MetricMetadataResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MetricMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -958,7 +959,7 @@ func (m *MetadataResponse) Unmarshal(dAtA []byte) error { if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Result = &MetadataResponse_Metadata{v} + m.Result = &MetricMetadataResponse_Metadata{v} iNdEx = postIndex case 2: if wireType != 2 { @@ -990,7 +991,7 @@ func (m *MetadataResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Result = &MetadataResponse_Warning{string(dAtA[iNdEx:postIndex])} + m.Result = &MetricMetadataResponse_Warning{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex default: iNdEx = preIndex diff --git a/pkg/metadata/metadatapb/rpc.proto b/pkg/metadata/metadatapb/rpc.proto index 16f0706692..96ff350634 100644 --- a/pkg/metadata/metadatapb/rpc.proto +++ b/pkg/metadata/metadatapb/rpc.proto @@ -21,16 +21,16 @@ option (gogoproto.goproto_unrecognized_all) = false; option (gogoproto.goproto_sizecache_all) = false; service Metadata { - rpc Metadata(MetadataRequest) returns (stream MetadataResponse); + rpc MetricMetadata(MetricMetadataRequest) returns (stream MetricMetadataResponse); } -message MetadataRequest { +message MetricMetadataRequest { string metric = 1; int32 limit = 2; PartialResponseStrategy partial_response_strategy = 3; } -message MetadataResponse { +message MetricMetadataResponse { oneof result { /// A collection of metric metadata entries. MetricMetadata metadata = 1; diff --git a/pkg/metadata/prometheus.go b/pkg/metadata/prometheus.go index 40be80ffcb..49e6087fa0 100644 --- a/pkg/metadata/prometheus.go +++ b/pkg/metadata/prometheus.go @@ -10,7 +10,7 @@ import ( "github.com/thanos-io/thanos/pkg/promclient" ) -// Prometheus implements metadatapb.Metadata gRPC that allows to fetch metric metadata from Prometheus HTTP /api/v1/metadata endpoint. +// Prometheus implements metadatapb.Metadata gRPC service that allows to fetch metric metadata from Prometheus HTTP /api/v1/metadata endpoint. type Prometheus struct { base *url.URL client *promclient.Client @@ -24,13 +24,13 @@ func NewPrometheus(base *url.URL, client *promclient.Client) *Prometheus { } } -// Metadata returns all specified metric metadata from Prometheus. -func (p *Prometheus) Metadata(r *metadatapb.MetadataRequest, s metadatapb.Metadata_MetadataServer) error { - md, err := p.client.MetadataInGRPC(s.Context(), p.base, r.Metric, int(r.Limit)) +// MetricMetadata returns all specified metric metadata from Prometheus. +func (p *Prometheus) MetricMetadata(r *metadatapb.MetricMetadataRequest, s metadatapb.Metadata_MetricMetadataServer) error { + md, err := p.client.MetricMetadataInGRPC(s.Context(), p.base, r.Metric, int(r.Limit)) if err != nil { return err } - return s.Send(&metadatapb.MetadataResponse{Result: &metadatapb.MetadataResponse_Metadata{ + return s.Send(&metadatapb.MetricMetadataResponse{Result: &metadatapb.MetricMetadataResponse_Metadata{ Metadata: metadatapb.FromMetadataMap(md)}}) } diff --git a/pkg/metadata/prometheus_test.go b/pkg/metadata/prometheus_test.go index 78b44ab661..eab10558a7 100644 --- a/pkg/metadata/prometheus_test.go +++ b/pkg/metadata/prometheus_test.go @@ -61,7 +61,7 @@ scrape_configs: // Wait metadata response to be ready as Prometheus gets metadata after scrape. testutil.Ok(t, runutil.Retry(3*time.Second, ctx.Done(), func() error { - meta, err := c.MetadataInGRPC(ctx, u, "", -1) + meta, err := c.MetricMetadataInGRPC(ctx, u, "", -1) testutil.Ok(t, err) if len(meta) > 0 { return nil @@ -108,7 +108,7 @@ scrape_configs: }, } { t.Run(tcase.name, func(t *testing.T) { - meta, w, err := grpcClient.Metadata(ctx, &metadatapb.MetadataRequest{ + meta, w, err := grpcClient.MetricMetadata(ctx, &metadatapb.MetricMetadataRequest{ Metric: tcase.metric, Limit: tcase.limit, }) diff --git a/pkg/metadata/proxy.go b/pkg/metadata/proxy.go index 8046053582..b133f3e89f 100644 --- a/pkg/metadata/proxy.go +++ b/pkg/metadata/proxy.go @@ -39,7 +39,7 @@ func NewProxy(logger log.Logger, metadata func() []metadatapb.MetadataClient) *P } } -func (s *Proxy) Metadata(req *metadatapb.MetadataRequest, srv metadatapb.Metadata_MetadataServer) error { +func (s *Proxy) MetricMetadata(req *metadatapb.MetricMetadataRequest, srv metadatapb.Metadata_MetricMetadataServer) error { var ( g, gctx = errgroup.WithContext(srv.Context()) respChan = make(chan *metadatapb.MetricMetadata, 10) @@ -47,7 +47,7 @@ func (s *Proxy) Metadata(req *metadatapb.MetadataRequest, srv metadatapb.Metadat ) for _, metadataClient := range s.metadata() { - rs := &metadataStream{ + rs := &metricMetadataStream{ client: metadataClient, request: req, channel: respChan, @@ -71,25 +71,25 @@ func (s *Proxy) Metadata(req *metadatapb.MetadataRequest, srv metadatapb.Metadat } for _, t := range metas { - if err := srv.Send(metadatapb.NewMetadataResponse(t)); err != nil { - return status.Error(codes.Unknown, errors.Wrap(err, "send metadata response").Error()) + if err := srv.Send(metadatapb.NewMetricMetadataResponse(t)); err != nil { + return status.Error(codes.Unknown, errors.Wrap(err, "send metric metadata response").Error()) } } return nil } -type metadataStream struct { +type metricMetadataStream struct { client metadatapb.MetadataClient - request *metadatapb.MetadataRequest + request *metadatapb.MetricMetadataRequest channel chan<- *metadatapb.MetricMetadata - server metadatapb.Metadata_MetadataServer + server metadatapb.Metadata_MetricMetadataServer } -func (stream *metadataStream) receive(ctx context.Context) error { - metadataCli, err := stream.client.Metadata(ctx, stream.request) +func (stream *metricMetadataStream) receive(ctx context.Context) error { + metadataCli, err := stream.client.MetricMetadata(ctx, stream.request) if err != nil { - err = errors.Wrapf(err, "fetching metadata from metadata client %v", stream.client) + err = errors.Wrapf(err, "fetching metric metadata from metadata client %v", stream.client) if stream.request.PartialResponseStrategy == storepb.PartialResponseStrategy_ABORT { return err @@ -109,7 +109,7 @@ func (stream *metadataStream) receive(ctx context.Context) error { } if err != nil { - err = errors.Wrapf(err, "receiving metadata from metadata client %v", stream.client) + err = errors.Wrapf(err, "receiving metric metadata from metadata client %v", stream.client) if stream.request.PartialResponseStrategy == storepb.PartialResponseStrategy_ABORT { return err diff --git a/pkg/promclient/promclient.go b/pkg/promclient/promclient.go index 69b2f05589..b12226d202 100644 --- a/pkg/promclient/promclient.go +++ b/pkg/promclient/promclient.go @@ -740,7 +740,8 @@ func (c *Client) RulesInGRPC(ctx context.Context, base *url.URL, typeRules strin return m.Data.Groups, nil } -func (c *Client) MetadataInGRPC(ctx context.Context, base *url.URL, metric string, limit int) (map[string][]metadatapb.Meta, error) { +// MetricMetadataInGRPC returns the metadata from Prometheus metric metadata API. It uses gRPC errors. +func (c *Client) MetricMetadataInGRPC(ctx context.Context, base *url.URL, metric string, limit int) (map[string][]metadatapb.Meta, error) { u := *base u.Path = path.Join(u.Path, "/api/v1/metadata") q := u.Query() @@ -758,7 +759,7 @@ func (c *Client) MetadataInGRPC(ctx context.Context, base *url.URL, metric strin var v struct { Data map[string][]metadatapb.Meta `json:"data"` } - return v.Data, c.get2xxResultWithGRPCErrors(ctx, "/metadata HTTP[client]", &u, &v) + return v.Data, c.get2xxResultWithGRPCErrors(ctx, "/prom_metric_metadata HTTP[client]", &u, &v) } // ExemplarsInGRPC returns the exemplars from Prometheus exemplars API. It uses gRPC errors. diff --git a/pkg/runutil/runutil.go b/pkg/runutil/runutil.go index 04235409de..77652cbb9f 100644 --- a/pkg/runutil/runutil.go +++ b/pkg/runutil/runutil.go @@ -163,6 +163,7 @@ func ExhaustCloseWithErrCapture(err *error, r io.ReadCloser, format string, a .. // DeleteAll deletes all files and directories inside the given // dir except for the ignoreDirs directories. +// NOTE: DeleteAll is not idempotent. func DeleteAll(dir string, ignoreDirs ...string) error { entries, err := ioutil.ReadDir(dir) if os.IsNotExist(err) { diff --git a/test/e2e/metadata_api_test.go b/test/e2e/metadata_api_test.go index 2373f34d9d..056995fbfa 100644 --- a/test/e2e/metadata_api_test.go +++ b/test/e2e/metadata_api_test.go @@ -73,7 +73,7 @@ func TestMetadataAPI_Fanout(t *testing.T) { var promMeta map[string][]metadatapb.Meta // Wait metadata response to be ready as Prometheus gets metadata after scrape. testutil.Ok(t, runutil.Retry(3*time.Second, ctx.Done(), func() error { - promMeta, err = promclient.NewDefaultClient().MetadataInGRPC(ctx, mustURLParse(t, "http://"+prom1.HTTPEndpoint()), "", -1) + promMeta, err = promclient.NewDefaultClient().MetricMetadataInGRPC(ctx, mustURLParse(t, "http://"+prom1.HTTPEndpoint()), "", -1) testutil.Ok(t, err) if len(promMeta) > 0 { return nil @@ -81,7 +81,7 @@ func TestMetadataAPI_Fanout(t *testing.T) { return fmt.Errorf("empty metadata response from Prometheus") })) - thanosMeta, err := promclient.NewDefaultClient().MetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", -1) + thanosMeta, err := promclient.NewDefaultClient().MetricMetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", -1) testutil.Ok(t, err) testutil.Assert(t, len(thanosMeta) > 0, "got empty metadata response from Thanos") @@ -89,22 +89,22 @@ func TestMetadataAPI_Fanout(t *testing.T) { metadataEqual(t, thanosMeta, promMeta) // We only expect to see one metadata returned. - thanosMeta, err = promclient.NewDefaultClient().MetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", 1) + thanosMeta, err = promclient.NewDefaultClient().MetricMetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", 1) testutil.Ok(t, err) testutil.Equals(t, len(thanosMeta), 1) // We only expect to see ten metadata returned. - thanosMeta, err = promclient.NewDefaultClient().MetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", 10) + thanosMeta, err = promclient.NewDefaultClient().MetricMetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", 10) testutil.Ok(t, err) testutil.Equals(t, len(thanosMeta), 10) // No metadata returned. - thanosMeta, err = promclient.NewDefaultClient().MetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", 0) + thanosMeta, err = promclient.NewDefaultClient().MetricMetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "", 0) testutil.Ok(t, err) testutil.Equals(t, len(thanosMeta), 0) // Only prometheus_build_info metric will be returned. - thanosMeta, err = promclient.NewDefaultClient().MetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "prometheus_build_info", -1) + thanosMeta, err = promclient.NewDefaultClient().MetricMetadataInGRPC(ctx, mustURLParse(t, "http://"+q.HTTPEndpoint()), "prometheus_build_info", -1) testutil.Ok(t, err) testutil.Assert(t, len(thanosMeta) == 1 && len(thanosMeta["prometheus_build_info"]) > 0, "expected one prometheus_build_info metadata from Thanos, got %v", thanosMeta) } diff --git a/tutorials/katacoda/thanos/1-globalview/courseBase.sh b/tutorials/katacoda/thanos/1-globalview/courseBase.sh index 4d53f3e701..14a23d8254 100644 --- a/tutorials/katacoda/thanos/1-globalview/courseBase.sh +++ b/tutorials/katacoda/thanos/1-globalview/courseBase.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash docker pull quay.io/prometheus/prometheus:v2.16.0 -docker pull quay.io/thanos/thanos:v0.18.0 +docker pull quay.io/thanos/thanos:v0.19.0 diff --git a/tutorials/katacoda/thanos/1-globalview/step2.md b/tutorials/katacoda/thanos/1-globalview/step2.md index b7c0ae07fc..6967d6ebc9 100644 --- a/tutorials/katacoda/thanos/1-globalview/step2.md +++ b/tutorials/katacoda/thanos/1-globalview/step2.md @@ -10,7 +10,7 @@ component and can be invoked in a single command. Let's take a look at all the Thanos commands: ``` -docker run --rm quay.io/thanos/thanos:v0.18.0 --help +docker run --rm quay.io/thanos/thanos:v0.19.0 --help ```{{execute}} You should see multiple commands that solves different purposes. @@ -53,7 +53,7 @@ docker run -d --net=host --rm \ -v $(pwd)/prometheus0_eu1.yml:/etc/prometheus/prometheus.yml \ --name prometheus-0-sidecar-eu1 \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19090 \ --grpc-address 0.0.0.0:19190 \ @@ -68,7 +68,7 @@ docker run -d --net=host --rm \ -v $(pwd)/prometheus0_us1.yml:/etc/prometheus/prometheus.yml \ --name prometheus-0-sidecar-us1 \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19091 \ --grpc-address 0.0.0.0:19191 \ @@ -81,7 +81,7 @@ docker run -d --net=host --rm \ -v $(pwd)/prometheus1_us1.yml:/etc/prometheus/prometheus.yml \ --name prometheus-1-sidecar-us1 \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19092 \ --grpc-address 0.0.0.0:19192 \ diff --git a/tutorials/katacoda/thanos/1-globalview/step3.md b/tutorials/katacoda/thanos/1-globalview/step3.md index 40be4f6264..ce3938b320 100644 --- a/tutorials/katacoda/thanos/1-globalview/step3.md +++ b/tutorials/katacoda/thanos/1-globalview/step3.md @@ -28,7 +28,7 @@ Click below snippet to start the Querier. ``` docker run -d --net=host --rm \ --name querier \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:29090 \ --query.replica-label replica \ diff --git a/tutorials/katacoda/thanos/2-lts/courseBase.sh b/tutorials/katacoda/thanos/2-lts/courseBase.sh index e3dd261757..74fc448ad6 100644 --- a/tutorials/katacoda/thanos/2-lts/courseBase.sh +++ b/tutorials/katacoda/thanos/2-lts/courseBase.sh @@ -2,7 +2,7 @@ docker pull minio/minio:RELEASE.2019-01-31T00-31-19Z docker pull quay.io/prometheus/prometheus:v2.20.0 -docker pull quay.io/thanos/thanos:v0.18.0 +docker pull quay.io/thanos/thanos:v0.19.0 docker pull quay.io/thanos/thanosbench:v0.2.0-rc.1 mkdir /root/editor diff --git a/tutorials/katacoda/thanos/2-lts/step1.md b/tutorials/katacoda/thanos/2-lts/step1.md index 46a7045679..a1b8f4d98b 100644 --- a/tutorials/katacoda/thanos/2-lts/step1.md +++ b/tutorials/katacoda/thanos/2-lts/step1.md @@ -117,7 +117,7 @@ Similar to previous course, let's setup global view querying with sidecar: docker run -d --net=host --rm \ --name prometheus-0-eu1-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19090 \ --grpc-address 0.0.0.0:19190 \ @@ -130,7 +130,7 @@ so we will make sure we point the Querier to the gRPC endpoints of the sidecar: ``` docker run -d --net=host --rm \ --name querier \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:9091 \ --query.replica-label replica \ diff --git a/tutorials/katacoda/thanos/2-lts/step2.md b/tutorials/katacoda/thanos/2-lts/step2.md index 3cc24c6df1..281d27bb7e 100644 --- a/tutorials/katacoda/thanos/2-lts/step2.md +++ b/tutorials/katacoda/thanos/2-lts/step2.md @@ -79,7 +79,7 @@ docker run -d --net=host --rm \ -v /root/prom-eu1:/prometheus \ --name prometheus-0-eu1-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --tsdb.path /prometheus \ --objstore.config-file /etc/thanos/minio-bucket.yaml \ diff --git a/tutorials/katacoda/thanos/2-lts/step3.md b/tutorials/katacoda/thanos/2-lts/step3.md index d96fdf4e94..c383423037 100644 --- a/tutorials/katacoda/thanos/2-lts/step3.md +++ b/tutorials/katacoda/thanos/2-lts/step3.md @@ -6,7 +6,7 @@ In this step, we will learn about Thanos Store Gateway and how to deploy it. Let's take a look at all the Thanos commands: -```docker run --rm quay.io/thanos/thanos:v0.18.0 --help```{{execute}} +```docker run --rm quay.io/thanos/thanos:v0.19.0 --help```{{execute}} You should see multiple commands that solve different purposes, block storage based long-term storage for Prometheus. @@ -32,7 +32,7 @@ You can read more about [Store](https://thanos.io/tip/components/store.md/) here docker run -d --net=host --rm \ -v /root/editor/bucket_storage.yaml:/etc/thanos/minio-bucket.yaml \ --name store-gateway \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ store \ --objstore.config-file /etc/thanos/minio-bucket.yaml \ --http-address 0.0.0.0:19091 \ @@ -49,7 +49,7 @@ Currently querier does not know about store yet. Let's change it by adding Store docker stop querier && \ docker run -d --net=host --rm \ --name querier \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:9091 \ --query.replica-label replica \ diff --git a/tutorials/katacoda/thanos/2-lts/step4.md b/tutorials/katacoda/thanos/2-lts/step4.md index 001773acb7..7320dff011 100644 --- a/tutorials/katacoda/thanos/2-lts/step4.md +++ b/tutorials/katacoda/thanos/2-lts/step4.md @@ -25,7 +25,7 @@ Click below snippet to start the Compactor. docker run -d --net=host --rm \ -v /root/editor/bucket_storage.yaml:/etc/thanos/minio-bucket.yaml \ --name thanos-compact \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ compact \ --wait --wait-interval 30s \ --consistency-delay 0s \ diff --git a/tutorials/katacoda/thanos/6-query-caching/courseBase.sh b/tutorials/katacoda/thanos/6-query-caching/courseBase.sh index 804e416ebe..7fc0465d4c 100644 --- a/tutorials/katacoda/thanos/6-query-caching/courseBase.sh +++ b/tutorials/katacoda/thanos/6-query-caching/courseBase.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash docker pull quay.io/prometheus/prometheus:v2.22.2 -docker pull quay.io/thanos/thanos:v0.18.0 +docker pull quay.io/thanos/thanos:v0.19.0 docker pull yannrobert/docker-nginx diff --git a/tutorials/katacoda/thanos/6-query-caching/step1.md b/tutorials/katacoda/thanos/6-query-caching/step1.md index 824e3d1f97..021f99a3c9 100644 --- a/tutorials/katacoda/thanos/6-query-caching/step1.md +++ b/tutorials/katacoda/thanos/6-query-caching/step1.md @@ -103,7 +103,7 @@ docker run -d --net=host --rm \ -v $(pwd)/prometheus"${i}".yml:/etc/prometheus/prometheus.yml \ --name prometheus-sidecar"${i}" \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address=0.0.0.0:1909"${i}" \ --grpc-address=0.0.0.0:1919"${i}" \ @@ -129,7 +129,7 @@ And now, let's deploy Thanos Querier to have a global overview on our services. ``` docker run -d --net=host --rm \ --name querier \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:10912 \ --grpc-address 0.0.0.0:10901 \ diff --git a/tutorials/katacoda/thanos/6-query-caching/step2.md b/tutorials/katacoda/thanos/6-query-caching/step2.md index d897435efc..4ee1a602a4 100644 --- a/tutorials/katacoda/thanos/6-query-caching/step2.md +++ b/tutorials/katacoda/thanos/6-query-caching/step2.md @@ -62,7 +62,7 @@ And deploy Query Frontend: docker run -d --net=host --rm \ -v $(pwd)/frontend.yml:/etc/thanos/frontend.yml \ --name query-frontend \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query-frontend \ --http-address 0.0.0.0:20902 \ --query-frontend.compress-responses \ diff --git a/tutorials/katacoda/thanos/7-multi-tenancy/courseBase.sh b/tutorials/katacoda/thanos/7-multi-tenancy/courseBase.sh index 9d96284940..c7c24cd8b2 100644 --- a/tutorials/katacoda/thanos/7-multi-tenancy/courseBase.sh +++ b/tutorials/katacoda/thanos/7-multi-tenancy/courseBase.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash docker pull quay.io/prometheus/prometheus:v2.20.0 -docker pull quay.io/thanos/thanos:v0.18.0 +docker pull quay.io/thanos/thanos:v0.19.0 docker pull quay.io/thanos/prom-label-proxy:v0.3.0-rc.0-ext1 docker pull caddy:2.2.1 diff --git a/tutorials/katacoda/thanos/7-multi-tenancy/step1.md b/tutorials/katacoda/thanos/7-multi-tenancy/step1.md index b34c112756..dbd12b05e3 100644 --- a/tutorials/katacoda/thanos/7-multi-tenancy/step1.md +++ b/tutorials/katacoda/thanos/7-multi-tenancy/step1.md @@ -88,7 +88,7 @@ docker run -d --net=host --rm \ -v $(pwd)/editor/prometheus0_fruit.yml:/etc/prometheus/prometheus.yml \ --name prometheus-0-sidecar-fruit \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19090 \ --grpc-address 0.0.0.0:19190 \ @@ -120,7 +120,7 @@ docker run -d --net=host --rm \ -v $(pwd)/editor/prometheus0_veggie.yml:/etc/prometheus/prometheus.yml \ --name prometheus-0-sidecar-veggie \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19091 \ --grpc-address 0.0.0.0:19191 \ @@ -152,7 +152,7 @@ docker run -d --net=host --rm \ -v $(pwd)/editor/prometheus1_veggie.yml:/etc/prometheus/prometheus.yml \ --name prometheus-01-sidecar-veggie \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19092 \ --grpc-address 0.0.0.0:19192 \ @@ -170,7 +170,7 @@ Fruit: ``` docker run -d --net=host --rm \ --name querier-fruit \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:29091 \ --grpc-address 0.0.0.0:29191 \ @@ -183,7 +183,7 @@ Veggie: ``` docker run -d --net=host --rm \ --name querier-veggie \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:29092 \ --grpc-address 0.0.0.0:29192 \ diff --git a/tutorials/katacoda/thanos/7-multi-tenancy/step2.md b/tutorials/katacoda/thanos/7-multi-tenancy/step2.md index 5a63ed2dae..fc33d48568 100644 --- a/tutorials/katacoda/thanos/7-multi-tenancy/step2.md +++ b/tutorials/katacoda/thanos/7-multi-tenancy/step2.md @@ -11,7 +11,7 @@ docker stop querier-fruit && docker stop querier-veggie ``` docker run -d --net=host --rm \ --name querier-multi \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:29090 \ --grpc-address 0.0.0.0:29190 \ diff --git a/tutorials/katacoda/thanos/x-playground/courseBase.sh b/tutorials/katacoda/thanos/x-playground/courseBase.sh index 9a5e40ba35..2315b1cc54 100644 --- a/tutorials/katacoda/thanos/x-playground/courseBase.sh +++ b/tutorials/katacoda/thanos/x-playground/courseBase.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash docker pull quay.io/prometheus/prometheus:v2.20.0 -docker pull quay.io/thanos/thanos:v0.18.0 +docker pull quay.io/thanos/thanos:v0.19.0 docker pull quay.io/thanos/thanosbench:v0.2.0-rc.1 docker pull minio/minio:RELEASE.2019-01-31T00-31-19Z diff --git a/tutorials/katacoda/thanos/x-playground/step1.md b/tutorials/katacoda/thanos/x-playground/step1.md index 402ebb756a..15b075ca7f 100644 --- a/tutorials/katacoda/thanos/x-playground/step1.md +++ b/tutorials/katacoda/thanos/x-playground/step1.md @@ -169,7 +169,7 @@ docker run -d --net=host --rm \ ### Step1: Sidecar ``` -docker run -it --rm quay.io/thanos/thanos:v0.18.0 --help +docker run -it --rm quay.io/thanos/thanos:v0.19.0 --help ```{{execute}} @@ -180,7 +180,7 @@ docker run -d --net=host --rm \ -v ${CURR_DIR}/prom-eu1-replica0-config.yaml:/etc/prometheus/prometheus.yml \ --name prom-eu1-0-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19091 \ --grpc-address 0.0.0.0:19191 \ @@ -195,7 +195,7 @@ docker run -d --net=host --rm \ -v ${CURR_DIR}/prom-eu1-replica1-config.yaml:/etc/prometheus/prometheus.yml \ --name prom-eu1-1-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19092 \ --grpc-address 0.0.0.0:19192 \ @@ -210,7 +210,7 @@ docker run -d --net=host --rm \ -v ${CURR_DIR}/prom-us1-replica0-config.yaml:/etc/prometheus/prometheus.yml \ --name prom-us1-0-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --http-address 0.0.0.0:19093 \ --grpc-address 0.0.0.0:19193 \ @@ -223,7 +223,7 @@ docker run -d --net=host --rm \ ``` docker run -d --net=host --rm \ --name querier \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:9090 \ --grpc-address 0.0.0.0:19190 \ diff --git a/tutorials/katacoda/thanos/x-playground/step2.md b/tutorials/katacoda/thanos/x-playground/step2.md index efaa56c3fc..29ab1e4b12 100644 --- a/tutorials/katacoda/thanos/x-playground/step2.md +++ b/tutorials/katacoda/thanos/x-playground/step2.md @@ -65,7 +65,7 @@ docker run -d --net=host --rm \ -v ${CURR_DIR}/prom-eu1-replica0:/prometheus \ --name prom-eu1-0-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --tsdb.path /prometheus \ --objstore.config-file /etc/thanos/minio-bucket.yaml \ @@ -85,7 +85,7 @@ docker run -d --net=host --rm \ -v ${CURR_DIR}/prom-eu1-replica1:/prometheus \ --name prom-eu1-1-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --tsdb.path /prometheus \ --objstore.config-file /etc/thanos/minio-bucket.yaml \ @@ -105,7 +105,7 @@ docker run -d --net=host --rm \ -v ${CURR_DIR}/prom-us1-replica0:/prometheus \ --name prom-us1-0-sidecar \ -u root \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ sidecar \ --tsdb.path /prometheus \ --objstore.config-file /etc/thanos/minio-bucket.yaml \ @@ -130,7 +130,7 @@ Let's run Store Gateway server: docker run -d --net=host --rm \ -v ${CURR_DIR}/minio-bucket.yaml:/etc/thanos/minio-bucket.yaml \ --name store-gateway \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ store \ --objstore.config-file /etc/thanos/minio-bucket.yaml \ --http-address 0.0.0.0:19094 \ @@ -143,7 +143,7 @@ docker run -d --net=host --rm \ docker stop querier && \ docker run -d --net=host --rm \ --name querier \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ query \ --http-address 0.0.0.0:9090 \ --grpc-address 0.0.0.0:19190 \ @@ -162,7 +162,7 @@ Visit https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.co docker run -d --net=host --rm \ -v ${CURR_DIR}/minio-bucket.yaml:/etc/thanos/minio-bucket.yaml \ --name compactor \ - quay.io/thanos/thanos:v0.18.0 \ + quay.io/thanos/thanos:v0.19.0 \ compact \ --wait --wait-interval 30s \ --consistency-delay 0s \