mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-07 20:14:24 +08:00
remove features and deployments fields
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.2
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v5.29.3
|
// protoc v5.29.3
|
||||||
// source: proto/telemetry.proto
|
// source: telemetry.proto
|
||||||
|
|
||||||
package proto
|
package proto
|
||||||
|
|
||||||
@@ -32,10 +32,6 @@ type TelemetryData struct {
|
|||||||
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
|
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
|
||||||
// Operating system (e.g., "linux/amd64")
|
// Operating system (e.g., "linux/amd64")
|
||||||
Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"`
|
Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"`
|
||||||
// Enabled features (e.g., ["filer", "s3api", "mq"])
|
|
||||||
Features []string `protobuf:"bytes,4,rep,name=features,proto3" json:"features,omitempty"`
|
|
||||||
// Deployment type ("standalone", "cluster", "master-only", "volume-only")
|
|
||||||
Deployment string `protobuf:"bytes,5,opt,name=deployment,proto3" json:"deployment,omitempty"`
|
|
||||||
// Number of volume servers in the cluster
|
// Number of volume servers in the cluster
|
||||||
VolumeServerCount int32 `protobuf:"varint,6,opt,name=volume_server_count,json=volumeServerCount,proto3" json:"volume_server_count,omitempty"`
|
VolumeServerCount int32 `protobuf:"varint,6,opt,name=volume_server_count,json=volumeServerCount,proto3" json:"volume_server_count,omitempty"`
|
||||||
// Total disk usage across all volume servers (in bytes)
|
// Total disk usage across all volume servers (in bytes)
|
||||||
@@ -53,7 +49,7 @@ type TelemetryData struct {
|
|||||||
func (x *TelemetryData) Reset() {
|
func (x *TelemetryData) Reset() {
|
||||||
*x = TelemetryData{}
|
*x = TelemetryData{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_proto_telemetry_proto_msgTypes[0]
|
mi := &file_telemetry_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -66,7 +62,7 @@ func (x *TelemetryData) String() string {
|
|||||||
func (*TelemetryData) ProtoMessage() {}
|
func (*TelemetryData) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *TelemetryData) ProtoReflect() protoreflect.Message {
|
func (x *TelemetryData) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_proto_telemetry_proto_msgTypes[0]
|
mi := &file_telemetry_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -79,7 +75,7 @@ func (x *TelemetryData) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use TelemetryData.ProtoReflect.Descriptor instead.
|
// Deprecated: Use TelemetryData.ProtoReflect.Descriptor instead.
|
||||||
func (*TelemetryData) Descriptor() ([]byte, []int) {
|
func (*TelemetryData) Descriptor() ([]byte, []int) {
|
||||||
return file_proto_telemetry_proto_rawDescGZIP(), []int{0}
|
return file_telemetry_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TelemetryData) GetClusterId() string {
|
func (x *TelemetryData) GetClusterId() string {
|
||||||
@@ -103,20 +99,6 @@ func (x *TelemetryData) GetOs() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TelemetryData) GetFeatures() []string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Features
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *TelemetryData) GetDeployment() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Deployment
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *TelemetryData) GetVolumeServerCount() int32 {
|
func (x *TelemetryData) GetVolumeServerCount() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.VolumeServerCount
|
return x.VolumeServerCount
|
||||||
@@ -171,7 +153,7 @@ type TelemetryRequest struct {
|
|||||||
func (x *TelemetryRequest) Reset() {
|
func (x *TelemetryRequest) Reset() {
|
||||||
*x = TelemetryRequest{}
|
*x = TelemetryRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_proto_telemetry_proto_msgTypes[1]
|
mi := &file_telemetry_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -184,7 +166,7 @@ func (x *TelemetryRequest) String() string {
|
|||||||
func (*TelemetryRequest) ProtoMessage() {}
|
func (*TelemetryRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *TelemetryRequest) ProtoReflect() protoreflect.Message {
|
func (x *TelemetryRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_proto_telemetry_proto_msgTypes[1]
|
mi := &file_telemetry_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -197,7 +179,7 @@ func (x *TelemetryRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use TelemetryRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use TelemetryRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*TelemetryRequest) Descriptor() ([]byte, []int) {
|
func (*TelemetryRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_proto_telemetry_proto_rawDescGZIP(), []int{1}
|
return file_telemetry_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TelemetryRequest) GetData() *TelemetryData {
|
func (x *TelemetryRequest) GetData() *TelemetryData {
|
||||||
@@ -220,7 +202,7 @@ type TelemetryResponse struct {
|
|||||||
func (x *TelemetryResponse) Reset() {
|
func (x *TelemetryResponse) Reset() {
|
||||||
*x = TelemetryResponse{}
|
*x = TelemetryResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_proto_telemetry_proto_msgTypes[2]
|
mi := &file_telemetry_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -233,7 +215,7 @@ func (x *TelemetryResponse) String() string {
|
|||||||
func (*TelemetryResponse) ProtoMessage() {}
|
func (*TelemetryResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *TelemetryResponse) ProtoReflect() protoreflect.Message {
|
func (x *TelemetryResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_proto_telemetry_proto_msgTypes[2]
|
mi := &file_telemetry_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -246,7 +228,7 @@ func (x *TelemetryResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use TelemetryResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use TelemetryResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*TelemetryResponse) Descriptor() ([]byte, []int) {
|
func (*TelemetryResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_proto_telemetry_proto_rawDescGZIP(), []int{2}
|
return file_telemetry_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TelemetryResponse) GetSuccess() bool {
|
func (x *TelemetryResponse) GetSuccess() bool {
|
||||||
@@ -263,69 +245,66 @@ func (x *TelemetryResponse) GetMessage() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_proto_telemetry_proto protoreflect.FileDescriptor
|
var File_telemetry_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_proto_telemetry_proto_rawDesc = []byte{
|
var file_telemetry_proto_rawDesc = []byte{
|
||||||
0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72,
|
0x0a, 0x0f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
|
0x6f, 0x12, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x22, 0xce, 0x02, 0x0a,
|
||||||
0x72, 0x79, 0x22, 0xfe, 0x02, 0x0a, 0x0d, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79,
|
0x0d, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d,
|
||||||
0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f,
|
0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a,
|
||||||
0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a,
|
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x03, 0x20,
|
||||||
0x02, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x1a, 0x0a,
|
0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x6f, 0x6c, 0x75, 0x6d,
|
||||||
0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52,
|
0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06,
|
||||||
0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76,
|
||||||
0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64,
|
0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
||||||
0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x6f, 0x6c,
|
0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||||
0x75, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x79, 0x74, 0x65,
|
||||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x65,
|
0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d,
|
||||||
0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74,
|
0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74,
|
||||||
0x61, 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20,
|
0x6f, 0x74, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||||
0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x79,
|
0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09,
|
||||||
0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x75, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x12, 0x21, 0x0a, 0x0c, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e,
|
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x43, 0x6f,
|
||||||
0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
|
||||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x75,
|
0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||||
0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75,
|
0x70, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x40, 0x0a,
|
||||||
0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72,
|
0x10, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
0x74, 0x12, 0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
0x18, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x54, 0x65, 0x6c, 0x65,
|
||||||
0x61, 0x6d, 0x70, 0x22, 0x40, 0x0a, 0x10, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79,
|
0x6d, 0x65, 0x74, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
0x47, 0x0a, 0x11, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,
|
||||||
0x79, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52,
|
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18,
|
||||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, 0x11, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
|
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75,
|
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68,
|
||||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63,
|
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73,
|
||||||
0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
|
0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x30,
|
0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x61,
|
0x6f, 0x33,
|
||||||
0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73,
|
|
||||||
0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_proto_telemetry_proto_rawDescOnce sync.Once
|
file_telemetry_proto_rawDescOnce sync.Once
|
||||||
file_proto_telemetry_proto_rawDescData = file_proto_telemetry_proto_rawDesc
|
file_telemetry_proto_rawDescData = file_telemetry_proto_rawDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_proto_telemetry_proto_rawDescGZIP() []byte {
|
func file_telemetry_proto_rawDescGZIP() []byte {
|
||||||
file_proto_telemetry_proto_rawDescOnce.Do(func() {
|
file_telemetry_proto_rawDescOnce.Do(func() {
|
||||||
file_proto_telemetry_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_telemetry_proto_rawDescData)
|
file_telemetry_proto_rawDescData = protoimpl.X.CompressGZIP(file_telemetry_proto_rawDescData)
|
||||||
})
|
})
|
||||||
return file_proto_telemetry_proto_rawDescData
|
return file_telemetry_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_proto_telemetry_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
var file_telemetry_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||||
var file_proto_telemetry_proto_goTypes = []any{
|
var file_telemetry_proto_goTypes = []any{
|
||||||
(*TelemetryData)(nil), // 0: telemetry.TelemetryData
|
(*TelemetryData)(nil), // 0: telemetry.TelemetryData
|
||||||
(*TelemetryRequest)(nil), // 1: telemetry.TelemetryRequest
|
(*TelemetryRequest)(nil), // 1: telemetry.TelemetryRequest
|
||||||
(*TelemetryResponse)(nil), // 2: telemetry.TelemetryResponse
|
(*TelemetryResponse)(nil), // 2: telemetry.TelemetryResponse
|
||||||
}
|
}
|
||||||
var file_proto_telemetry_proto_depIdxs = []int32{
|
var file_telemetry_proto_depIdxs = []int32{
|
||||||
0, // 0: telemetry.TelemetryRequest.data:type_name -> telemetry.TelemetryData
|
0, // 0: telemetry.TelemetryRequest.data:type_name -> telemetry.TelemetryData
|
||||||
1, // [1:1] is the sub-list for method output_type
|
1, // [1:1] is the sub-list for method output_type
|
||||||
1, // [1:1] is the sub-list for method input_type
|
1, // [1:1] is the sub-list for method input_type
|
||||||
@@ -334,13 +313,13 @@ var file_proto_telemetry_proto_depIdxs = []int32{
|
|||||||
0, // [0:1] is the sub-list for field type_name
|
0, // [0:1] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_proto_telemetry_proto_init() }
|
func init() { file_telemetry_proto_init() }
|
||||||
func file_proto_telemetry_proto_init() {
|
func file_telemetry_proto_init() {
|
||||||
if File_proto_telemetry_proto != nil {
|
if File_telemetry_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_proto_telemetry_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
file_telemetry_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*TelemetryData); i {
|
switch v := v.(*TelemetryData); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -352,7 +331,7 @@ func file_proto_telemetry_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_proto_telemetry_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
file_telemetry_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*TelemetryRequest); i {
|
switch v := v.(*TelemetryRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -364,7 +343,7 @@ func file_proto_telemetry_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_proto_telemetry_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
file_telemetry_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*TelemetryResponse); i {
|
switch v := v.(*TelemetryResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -381,18 +360,18 @@ func file_proto_telemetry_proto_init() {
|
|||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_proto_telemetry_proto_rawDesc,
|
RawDescriptor: file_telemetry_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 3,
|
NumMessages: 3,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_proto_telemetry_proto_goTypes,
|
GoTypes: file_telemetry_proto_goTypes,
|
||||||
DependencyIndexes: file_proto_telemetry_proto_depIdxs,
|
DependencyIndexes: file_telemetry_proto_depIdxs,
|
||||||
MessageInfos: file_proto_telemetry_proto_msgTypes,
|
MessageInfos: file_telemetry_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_proto_telemetry_proto = out.File
|
File_telemetry_proto = out.File
|
||||||
file_proto_telemetry_proto_rawDesc = nil
|
file_telemetry_proto_rawDesc = nil
|
||||||
file_proto_telemetry_proto_goTypes = nil
|
file_telemetry_proto_goTypes = nil
|
||||||
file_proto_telemetry_proto_depIdxs = nil
|
file_telemetry_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
@@ -15,11 +15,11 @@ message TelemetryData {
|
|||||||
// Operating system (e.g., "linux/amd64")
|
// Operating system (e.g., "linux/amd64")
|
||||||
string os = 3;
|
string os = 3;
|
||||||
|
|
||||||
// Enabled features (e.g., ["filer", "s3api", "mq"])
|
// Field 4 reserved (was features)
|
||||||
repeated string features = 4;
|
reserved 4;
|
||||||
|
|
||||||
// Deployment type ("standalone", "cluster", "master-only", "volume-only")
|
// Field 5 reserved (was deployment)
|
||||||
string deployment = 5;
|
reserved 5;
|
||||||
|
|
||||||
// Number of volume servers in the cluster
|
// Number of volume servers in the cluster
|
||||||
int32 volume_server_count = 6;
|
int32 volume_server_count = 6;
|
||||||
|
@@ -123,10 +123,7 @@ func (h *Handler) ServeIndex(w http.ResponseWriter, r *http.Request) {
|
|||||||
<canvas id="osChart" width="400" height="200"></canvas>
|
<canvas id="osChart" width="400" height="200"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chart-container">
|
|
||||||
<div class="chart-title">Deployment Types</div>
|
|
||||||
<canvas id="deploymentChart" width="400" height="200"></canvas>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="chart-container">
|
<div class="chart-container">
|
||||||
<div class="chart-title">Volume Servers Over Time</div>
|
<div class="chart-title">Volume Servers Over Time</div>
|
||||||
@@ -178,8 +175,7 @@ func (h *Handler) ServeIndex(w http.ResponseWriter, r *http.Request) {
|
|||||||
// OS chart
|
// OS chart
|
||||||
createPieChart('osChart', 'Operating System Distribution', stats.os_distribution || {});
|
createPieChart('osChart', 'Operating System Distribution', stats.os_distribution || {});
|
||||||
|
|
||||||
// Deployment chart
|
|
||||||
createPieChart('deploymentChart', 'Deployment Types', stats.deployments || {});
|
|
||||||
|
|
||||||
// Server count over time
|
// Server count over time
|
||||||
if (metrics.dates && metrics.server_counts) {
|
if (metrics.dates && metrics.server_counts) {
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -47,27 +46,27 @@ func NewPrometheusStorage() *PrometheusStorage {
|
|||||||
volumeServerCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
volumeServerCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||||
Name: "seaweedfs_telemetry_volume_servers",
|
Name: "seaweedfs_telemetry_volume_servers",
|
||||||
Help: "Number of volume servers per cluster",
|
Help: "Number of volume servers per cluster",
|
||||||
}, []string{"cluster_id", "version", "os", "deployment"}),
|
}, []string{"cluster_id", "version", "os"}),
|
||||||
totalDiskBytes: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
totalDiskBytes: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||||
Name: "seaweedfs_telemetry_disk_bytes",
|
Name: "seaweedfs_telemetry_disk_bytes",
|
||||||
Help: "Total disk usage in bytes per cluster",
|
Help: "Total disk usage in bytes per cluster",
|
||||||
}, []string{"cluster_id", "version", "os", "deployment"}),
|
}, []string{"cluster_id", "version", "os"}),
|
||||||
totalVolumeCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
totalVolumeCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||||
Name: "seaweedfs_telemetry_volume_count",
|
Name: "seaweedfs_telemetry_volume_count",
|
||||||
Help: "Total number of volumes per cluster",
|
Help: "Total number of volumes per cluster",
|
||||||
}, []string{"cluster_id", "version", "os", "deployment"}),
|
}, []string{"cluster_id", "version", "os"}),
|
||||||
filerCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
filerCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||||
Name: "seaweedfs_telemetry_filer_count",
|
Name: "seaweedfs_telemetry_filer_count",
|
||||||
Help: "Number of filer servers per cluster",
|
Help: "Number of filer servers per cluster",
|
||||||
}, []string{"cluster_id", "version", "os", "deployment"}),
|
}, []string{"cluster_id", "version", "os"}),
|
||||||
brokerCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
brokerCount: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||||
Name: "seaweedfs_telemetry_broker_count",
|
Name: "seaweedfs_telemetry_broker_count",
|
||||||
Help: "Number of broker servers per cluster",
|
Help: "Number of broker servers per cluster",
|
||||||
}, []string{"cluster_id", "version", "os", "deployment"}),
|
}, []string{"cluster_id", "version", "os"}),
|
||||||
clusterInfo: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
clusterInfo: promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||||
Name: "seaweedfs_telemetry_cluster_info",
|
Name: "seaweedfs_telemetry_cluster_info",
|
||||||
Help: "Cluster information (always 1, labels contain metadata)",
|
Help: "Cluster information (always 1, labels contain metadata)",
|
||||||
}, []string{"cluster_id", "version", "os", "deployment", "features"}),
|
}, []string{"cluster_id", "version", "os"}),
|
||||||
telemetryReceived: promauto.NewCounter(prometheus.CounterOpts{
|
telemetryReceived: promauto.NewCounter(prometheus.CounterOpts{
|
||||||
Name: "seaweedfs_telemetry_reports_received_total",
|
Name: "seaweedfs_telemetry_reports_received_total",
|
||||||
Help: "Total number of telemetry reports received",
|
Help: "Total number of telemetry reports received",
|
||||||
@@ -86,7 +85,6 @@ func (s *PrometheusStorage) StoreTelemetry(data *proto.TelemetryData) error {
|
|||||||
"cluster_id": data.ClusterId,
|
"cluster_id": data.ClusterId,
|
||||||
"version": data.Version,
|
"version": data.Version,
|
||||||
"os": data.Os,
|
"os": data.Os,
|
||||||
"deployment": data.Deployment,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s.volumeServerCount.With(labels).Set(float64(data.VolumeServerCount))
|
s.volumeServerCount.With(labels).Set(float64(data.VolumeServerCount))
|
||||||
@@ -95,14 +93,10 @@ func (s *PrometheusStorage) StoreTelemetry(data *proto.TelemetryData) error {
|
|||||||
s.filerCount.With(labels).Set(float64(data.FilerCount))
|
s.filerCount.With(labels).Set(float64(data.FilerCount))
|
||||||
s.brokerCount.With(labels).Set(float64(data.BrokerCount))
|
s.brokerCount.With(labels).Set(float64(data.BrokerCount))
|
||||||
|
|
||||||
// Features as JSON string for the label
|
|
||||||
featuresJSON, _ := json.Marshal(data.Features)
|
|
||||||
infoLabels := prometheus.Labels{
|
infoLabels := prometheus.Labels{
|
||||||
"cluster_id": data.ClusterId,
|
"cluster_id": data.ClusterId,
|
||||||
"version": data.Version,
|
"version": data.Version,
|
||||||
"os": data.Os,
|
"os": data.Os,
|
||||||
"deployment": data.Deployment,
|
|
||||||
"features": string(featuresJSON),
|
|
||||||
}
|
}
|
||||||
s.clusterInfo.With(infoLabels).Set(1)
|
s.clusterInfo.With(infoLabels).Set(1)
|
||||||
|
|
||||||
@@ -188,7 +182,6 @@ func (s *PrometheusStorage) updateStats() {
|
|||||||
activeInstances := 0
|
activeInstances := 0
|
||||||
versions := make(map[string]int)
|
versions := make(map[string]int)
|
||||||
osDistribution := make(map[string]int)
|
osDistribution := make(map[string]int)
|
||||||
deployments := make(map[string]int)
|
|
||||||
|
|
||||||
for _, instance := range s.instances {
|
for _, instance := range s.instances {
|
||||||
if instance.ReceivedAt.After(last30Days) {
|
if instance.ReceivedAt.After(last30Days) {
|
||||||
@@ -198,7 +191,6 @@ func (s *PrometheusStorage) updateStats() {
|
|||||||
activeInstances++
|
activeInstances++
|
||||||
versions[instance.TelemetryData.Version]++
|
versions[instance.TelemetryData.Version]++
|
||||||
osDistribution[instance.TelemetryData.Os]++
|
osDistribution[instance.TelemetryData.Os]++
|
||||||
deployments[instance.TelemetryData.Deployment]++
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +204,6 @@ func (s *PrometheusStorage) updateStats() {
|
|||||||
"active_instances": activeInstances,
|
"active_instances": activeInstances,
|
||||||
"versions": versions,
|
"versions": versions,
|
||||||
"os_distribution": osDistribution,
|
"os_distribution": osDistribution,
|
||||||
"deployments": deployments,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +222,6 @@ func (s *PrometheusStorage) CleanupOldInstances(maxAge time.Duration) {
|
|||||||
"cluster_id": instance.TelemetryData.ClusterId,
|
"cluster_id": instance.TelemetryData.ClusterId,
|
||||||
"version": instance.TelemetryData.Version,
|
"version": instance.TelemetryData.Version,
|
||||||
"os": instance.TelemetryData.Os,
|
"os": instance.TelemetryData.Os,
|
||||||
"deployment": instance.TelemetryData.Deployment,
|
|
||||||
}
|
}
|
||||||
s.volumeServerCount.Delete(labels)
|
s.volumeServerCount.Delete(labels)
|
||||||
s.totalDiskBytes.Delete(labels)
|
s.totalDiskBytes.Delete(labels)
|
||||||
|
@@ -151,8 +151,6 @@ func testProtobufMarshaling() error {
|
|||||||
ClusterId: "test-cluster-12345",
|
ClusterId: "test-cluster-12345",
|
||||||
Version: "test-3.45",
|
Version: "test-3.45",
|
||||||
Os: "linux/amd64",
|
Os: "linux/amd64",
|
||||||
Features: []string{"filer", "s3api"},
|
|
||||||
Deployment: "test",
|
|
||||||
VolumeServerCount: 2,
|
VolumeServerCount: 2,
|
||||||
TotalDiskBytes: 1000000,
|
TotalDiskBytes: 1000000,
|
||||||
TotalVolumeCount: 10,
|
TotalVolumeCount: 10,
|
||||||
@@ -197,8 +195,6 @@ func testTelemetryClient() error {
|
|||||||
testData := &proto.TelemetryData{
|
testData := &proto.TelemetryData{
|
||||||
Version: "test-3.45",
|
Version: "test-3.45",
|
||||||
Os: "linux/amd64",
|
Os: "linux/amd64",
|
||||||
Features: []string{"filer", "s3api", "mq"},
|
|
||||||
Deployment: "integration-test",
|
|
||||||
VolumeServerCount: 3,
|
VolumeServerCount: 3,
|
||||||
TotalDiskBytes: 1073741824, // 1GB
|
TotalDiskBytes: 1073741824, // 1GB
|
||||||
TotalVolumeCount: 50,
|
TotalVolumeCount: 50,
|
||||||
|
@@ -149,14 +149,6 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se
|
|||||||
ms.telemetryCollector.SetVersion(version.VERSION_NUMBER)
|
ms.telemetryCollector.SetVersion(version.VERSION_NUMBER)
|
||||||
ms.telemetryCollector.SetOS(runtime.GOOS + "/" + runtime.GOARCH)
|
ms.telemetryCollector.SetOS(runtime.GOOS + "/" + runtime.GOARCH)
|
||||||
|
|
||||||
// Determine features and deployment type
|
|
||||||
features := []string{"master"}
|
|
||||||
if len(peers) > 1 {
|
|
||||||
features = append(features, "cluster")
|
|
||||||
}
|
|
||||||
ms.telemetryCollector.SetFeatures(features)
|
|
||||||
ms.telemetryCollector.SetDeployment(telemetry.DetermineDeployment(true, false, len(peers)))
|
|
||||||
|
|
||||||
// Start periodic telemetry collection (every 24 hours)
|
// Start periodic telemetry collection (every 24 hours)
|
||||||
ms.telemetryCollector.StartPeriodicCollection(24 * time.Hour)
|
ms.telemetryCollector.StartPeriodicCollection(24 * time.Hour)
|
||||||
}
|
}
|
||||||
|
@@ -14,8 +14,6 @@ type Collector struct {
|
|||||||
topo *topology.Topology
|
topo *topology.Topology
|
||||||
cluster *cluster.Cluster
|
cluster *cluster.Cluster
|
||||||
masterServer interface{} // Will be set to *weed_server.MasterServer to access client tracking
|
masterServer interface{} // Will be set to *weed_server.MasterServer to access client tracking
|
||||||
features []string
|
|
||||||
deployment string
|
|
||||||
version string
|
version string
|
||||||
os string
|
os string
|
||||||
}
|
}
|
||||||
@@ -27,23 +25,11 @@ func NewCollector(client *Client, topo *topology.Topology, cluster *cluster.Clus
|
|||||||
topo: topo,
|
topo: topo,
|
||||||
cluster: cluster,
|
cluster: cluster,
|
||||||
masterServer: nil,
|
masterServer: nil,
|
||||||
features: []string{},
|
|
||||||
deployment: "unknown",
|
|
||||||
version: "unknown",
|
version: "unknown",
|
||||||
os: "unknown",
|
os: "unknown",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetFeatures sets the list of enabled features
|
|
||||||
func (c *Collector) SetFeatures(features []string) {
|
|
||||||
c.features = features
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDeployment sets the deployment type (standalone, cluster, etc.)
|
|
||||||
func (c *Collector) SetDeployment(deployment string) {
|
|
||||||
c.deployment = deployment
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetVersion sets the SeaweedFS version
|
// SetVersion sets the SeaweedFS version
|
||||||
func (c *Collector) SetVersion(version string) {
|
func (c *Collector) SetVersion(version string) {
|
||||||
c.version = version
|
c.version = version
|
||||||
@@ -82,7 +68,7 @@ func (c *Collector) StartPeriodicCollection(interval time.Duration) {
|
|||||||
|
|
||||||
// Send initial telemetry after a short delay
|
// Send initial telemetry after a short delay
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(30 * time.Second) // Wait for cluster to stabilize
|
time.Sleep(61 * time.Second) // Wait for cluster to stabilize
|
||||||
c.CollectAndSendAsync()
|
c.CollectAndSendAsync()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@@ -99,11 +85,9 @@ func (c *Collector) StartPeriodicCollection(interval time.Duration) {
|
|||||||
// collectData gathers telemetry data from the topology
|
// collectData gathers telemetry data from the topology
|
||||||
func (c *Collector) collectData() *proto.TelemetryData {
|
func (c *Collector) collectData() *proto.TelemetryData {
|
||||||
data := &proto.TelemetryData{
|
data := &proto.TelemetryData{
|
||||||
Version: c.version,
|
Version: c.version,
|
||||||
Os: c.os,
|
Os: c.os,
|
||||||
Features: c.features,
|
Timestamp: time.Now().Unix(),
|
||||||
Deployment: c.deployment,
|
|
||||||
Timestamp: time.Now().Unix(),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.topo != nil {
|
if c.topo != nil {
|
||||||
@@ -199,20 +183,3 @@ func (c *Collector) getAllBrokerGroups() []string {
|
|||||||
// In a more sophisticated implementation, we could enumerate all groups
|
// In a more sophisticated implementation, we could enumerate all groups
|
||||||
return []string{""}
|
return []string{""}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DetermineDeployment determines the deployment type based on configuration
|
|
||||||
func DetermineDeployment(isMasterEnabled, isVolumeEnabled bool, peerCount int) string {
|
|
||||||
if isMasterEnabled && isVolumeEnabled {
|
|
||||||
if peerCount > 1 {
|
|
||||||
return "cluster"
|
|
||||||
}
|
|
||||||
return "standalone"
|
|
||||||
}
|
|
||||||
if isMasterEnabled {
|
|
||||||
return "master-only"
|
|
||||||
}
|
|
||||||
if isVolumeEnabled {
|
|
||||||
return "volume-only"
|
|
||||||
}
|
|
||||||
return "unknown"
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user