Documentation ¶
Overview ¶
Package v1 contains the API used to monitor deployments.
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterMonitoringServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMonitoringServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MonitoringServiceClient) error
- func RegisterMonitoringServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMonitoringServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MonitoringServiceServer) error
- func RegisterMonitoringServiceServer(s *grpc.Server, srv MonitoringServiceServer)
- type DeploymentLogsChunk
- func (*DeploymentLogsChunk) Descriptor() ([]byte, []int)deprecated
- func (x *DeploymentLogsChunk) GetChunk() []byte
- func (*DeploymentLogsChunk) ProtoMessage()
- func (x *DeploymentLogsChunk) ProtoReflect() protoreflect.Message
- func (x *DeploymentLogsChunk) Reset()
- func (x *DeploymentLogsChunk) String() string
- type DeploymentMetrics
- func (*DeploymentMetrics) Descriptor() ([]byte, []int)deprecated
- func (x *DeploymentMetrics) GetMetrics() []*DeploymentMetrics_Timeseries
- func (*DeploymentMetrics) ProtoMessage()
- func (x *DeploymentMetrics) ProtoReflect() protoreflect.Message
- func (x *DeploymentMetrics) Reset()
- func (x *DeploymentMetrics) String() string
- type DeploymentMetrics_Sample
- func (*DeploymentMetrics_Sample) Descriptor() ([]byte, []int)deprecated
- func (x *DeploymentMetrics_Sample) GetTimestamp() *timestamppb.Timestamp
- func (x *DeploymentMetrics_Sample) GetValue() float32
- func (*DeploymentMetrics_Sample) ProtoMessage()
- func (x *DeploymentMetrics_Sample) ProtoReflect() protoreflect.Message
- func (x *DeploymentMetrics_Sample) Reset()
- func (x *DeploymentMetrics_Sample) String() string
- type DeploymentMetrics_Timeseries
- func (*DeploymentMetrics_Timeseries) Descriptor() ([]byte, []int)deprecated
- func (x *DeploymentMetrics_Timeseries) GetSamples() []*DeploymentMetrics_Sample
- func (x *DeploymentMetrics_Timeseries) GetServerId() string
- func (*DeploymentMetrics_Timeseries) ProtoMessage()
- func (x *DeploymentMetrics_Timeseries) ProtoReflect() protoreflect.Message
- func (x *DeploymentMetrics_Timeseries) Reset()
- func (x *DeploymentMetrics_Timeseries) String() string
- type GetDeploymentLogsRequest
- func (*GetDeploymentLogsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetDeploymentLogsRequest) GetDeploymentId() string
- func (x *GetDeploymentLogsRequest) GetEndAt() *timestamppb.Timestamp
- func (x *GetDeploymentLogsRequest) GetFormat() string
- func (x *GetDeploymentLogsRequest) GetLimit() int32
- func (x *GetDeploymentLogsRequest) GetRole() string
- func (x *GetDeploymentLogsRequest) GetServerId() string
- func (x *GetDeploymentLogsRequest) GetStartAt() *timestamppb.Timestamp
- func (*GetDeploymentLogsRequest) ProtoMessage()
- func (x *GetDeploymentLogsRequest) ProtoReflect() protoreflect.Message
- func (x *GetDeploymentLogsRequest) Reset()
- func (x *GetDeploymentLogsRequest) String() string
- type GetDeploymentMetricsRequest
- func (*GetDeploymentMetricsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetDeploymentMetricsRequest) GetDeploymentId() string
- func (x *GetDeploymentMetricsRequest) GetEndAt() *timestamppb.Timestamp
- func (x *GetDeploymentMetricsRequest) GetMetricType() string
- func (x *GetDeploymentMetricsRequest) GetServerType() string
- func (x *GetDeploymentMetricsRequest) GetStartAt() *timestamppb.Timestamp
- func (*GetDeploymentMetricsRequest) ProtoMessage()
- func (x *GetDeploymentMetricsRequest) ProtoReflect() protoreflect.Message
- func (x *GetDeploymentMetricsRequest) Reset()
- func (x *GetDeploymentMetricsRequest) String() string
- type MonitoringServiceClient
- type MonitoringServiceServer
- type MonitoringService_GetDeploymentLogsClient
- type MonitoringService_GetDeploymentLogsServer
- type UnimplementedMonitoringServiceServer
- func (*UnimplementedMonitoringServiceServer) GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error)
- func (*UnimplementedMonitoringServiceServer) GetDeploymentLogs(*GetDeploymentLogsRequest, MonitoringService_GetDeploymentLogsServer) error
- func (*UnimplementedMonitoringServiceServer) GetDeploymentUsageMetrics(context.Context, *GetDeploymentMetricsRequest) (*DeploymentMetrics, error)
Constants ¶
const ( // FormatText defines the log format to be text FormatText = "text" // FormatJson defines the log format to be json. // In JSON format, log lines are encoded as a single line JSON object. FormatJSON = "json" )
const ( // MetricsServerTypeDBServer should be set in GetDeploymentUsageMetricsRequest to indicate // that metrics are being requested for DBServers MetricsServerTypeDBServer = "Dbserver" // MetricsServerTypeCoordinator should be set in GetDeploymentUsageMetricsRequest to indicate // that metrics are being requested for Coordinators MetricsServerTypeCoordinator = "Coordinator" // MetricsServerTypeSingle should be set in GetDeploymentUsageMetricsRequest to indicate // that metrics are being requested for Single server MetricsServerTypeSingle = "Single" // MetricTypeCPU should be set in GetDeploymentUsageMetricsRequest when CPU metrics // are being requested MetricTypeCPU = "cpu" // MetricTypeMemory should be set in GetDeploymentUsageMetricsRequest when Memory metrics // are being requested MetricTypeMemory = "memory" // MetricTypeDisk should be set in GetDeploymentUsageMetricsRequest when Disk metrics // are being requested MetricTypeDisk = "disk" )
const ( // PermissionLogsGet is needed for gettings logs from a deployment. PermissionLogsGet = "monitoring.logs.get" // PermissionLogsGet is needed for gettings metrics from a deployment. PermissionMetricsGet = "monitoring.metrics.get" )
const ( // ServerRoleAgents defines the role filter for agents ServerRoleAgents = "agents" // ServerRoleCoordinators defines the role filter for coordinators ServerRoleCoordinators = "coordinators" // ServerRoleDBServers defines the role filter for dbservers ServerRoleDBServers = "dbservers" // ServerRoleSingles defines the role filter for singles ServerRoleSingles = "singles" )
const ( // APIID contains identifier of this API APIID = "monitoring/v1" // APIMajorVersion contains major version of this API APIMajorVersion = 1 // APIMinorVersion contains minor version of this API APIMinorVersion = 5 // APIPatchVersion contains patch version of this API APIPatchVersion = 0 )
Variables ¶
var File_monitoring_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMonitoringServiceHandler ¶
func RegisterMonitoringServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMonitoringServiceHandler registers the http handlers for service MonitoringService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMonitoringServiceHandlerClient ¶
func RegisterMonitoringServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MonitoringServiceClient) error
RegisterMonitoringServiceHandlerClient registers the http handlers for service MonitoringService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MonitoringServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MonitoringServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MonitoringServiceClient" to call the correct interceptors.
func RegisterMonitoringServiceHandlerFromEndpoint ¶
func RegisterMonitoringServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMonitoringServiceHandlerFromEndpoint is same as RegisterMonitoringServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMonitoringServiceHandlerServer ¶
func RegisterMonitoringServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MonitoringServiceServer) error
RegisterMonitoringServiceHandlerServer registers the http handlers for service MonitoringService to "mux". UnaryRPC :call MonitoringServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMonitoringServiceHandlerFromEndpoint instead.
func RegisterMonitoringServiceServer ¶
func RegisterMonitoringServiceServer(s *grpc.Server, srv MonitoringServiceServer)
Types ¶
type DeploymentLogsChunk ¶
type DeploymentLogsChunk struct { // Chunk of bytes from the logs Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` // contains filtered or unexported fields }
func (*DeploymentLogsChunk) Descriptor
deprecated
func (*DeploymentLogsChunk) Descriptor() ([]byte, []int)
Deprecated: Use DeploymentLogsChunk.ProtoReflect.Descriptor instead.
func (*DeploymentLogsChunk) GetChunk ¶
func (x *DeploymentLogsChunk) GetChunk() []byte
func (*DeploymentLogsChunk) ProtoMessage ¶
func (*DeploymentLogsChunk) ProtoMessage()
func (*DeploymentLogsChunk) ProtoReflect ¶ added in v0.89.0
func (x *DeploymentLogsChunk) ProtoReflect() protoreflect.Message
func (*DeploymentLogsChunk) Reset ¶
func (x *DeploymentLogsChunk) Reset()
func (*DeploymentLogsChunk) String ¶
func (x *DeploymentLogsChunk) String() string
type DeploymentMetrics ¶ added in v0.84.0
type DeploymentMetrics struct { // Contains a list of timeseries metrics for each server (of type specified in the request). Metrics []*DeploymentMetrics_Timeseries `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` // contains filtered or unexported fields }
DeploymentMetrics contains the deployment metrics
func (*DeploymentMetrics) Descriptor
deprecated
added in
v0.84.0
func (*DeploymentMetrics) Descriptor() ([]byte, []int)
Deprecated: Use DeploymentMetrics.ProtoReflect.Descriptor instead.
func (*DeploymentMetrics) GetMetrics ¶ added in v0.84.0
func (x *DeploymentMetrics) GetMetrics() []*DeploymentMetrics_Timeseries
func (*DeploymentMetrics) ProtoMessage ¶ added in v0.84.0
func (*DeploymentMetrics) ProtoMessage()
func (*DeploymentMetrics) ProtoReflect ¶ added in v0.89.0
func (x *DeploymentMetrics) ProtoReflect() protoreflect.Message
func (*DeploymentMetrics) Reset ¶ added in v0.84.0
func (x *DeploymentMetrics) Reset()
func (*DeploymentMetrics) String ¶ added in v0.84.0
func (x *DeploymentMetrics) String() string
type DeploymentMetrics_Sample ¶ added in v0.84.0
type DeploymentMetrics_Sample struct { // Timestamp at which this sample is captured. Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Value of the given sample. Value float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Sample defines a single data point. It contains the value of the sample and the timestamp at which it was captured.
func (*DeploymentMetrics_Sample) Descriptor
deprecated
added in
v0.84.0
func (*DeploymentMetrics_Sample) Descriptor() ([]byte, []int)
Deprecated: Use DeploymentMetrics_Sample.ProtoReflect.Descriptor instead.
func (*DeploymentMetrics_Sample) GetTimestamp ¶ added in v0.84.0
func (x *DeploymentMetrics_Sample) GetTimestamp() *timestamppb.Timestamp
func (*DeploymentMetrics_Sample) GetValue ¶ added in v0.84.0
func (x *DeploymentMetrics_Sample) GetValue() float32
func (*DeploymentMetrics_Sample) ProtoMessage ¶ added in v0.84.0
func (*DeploymentMetrics_Sample) ProtoMessage()
func (*DeploymentMetrics_Sample) ProtoReflect ¶ added in v0.89.0
func (x *DeploymentMetrics_Sample) ProtoReflect() protoreflect.Message
func (*DeploymentMetrics_Sample) Reset ¶ added in v0.84.0
func (x *DeploymentMetrics_Sample) Reset()
func (*DeploymentMetrics_Sample) String ¶ added in v0.84.0
func (x *DeploymentMetrics_Sample) String() string
type DeploymentMetrics_Timeseries ¶ added in v0.84.0
type DeploymentMetrics_Timeseries struct { // ID of the server. ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` // List of metric samples for the server identified by the server_id. Samples []*DeploymentMetrics_Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples,omitempty"` // contains filtered or unexported fields }
A timeseries contains a list of samples recorded at different (regular) intervals for a single database server identified by server_id.
func (*DeploymentMetrics_Timeseries) Descriptor
deprecated
added in
v0.84.0
func (*DeploymentMetrics_Timeseries) Descriptor() ([]byte, []int)
Deprecated: Use DeploymentMetrics_Timeseries.ProtoReflect.Descriptor instead.
func (*DeploymentMetrics_Timeseries) GetSamples ¶ added in v0.84.0
func (x *DeploymentMetrics_Timeseries) GetSamples() []*DeploymentMetrics_Sample
func (*DeploymentMetrics_Timeseries) GetServerId ¶ added in v0.84.0
func (x *DeploymentMetrics_Timeseries) GetServerId() string
func (*DeploymentMetrics_Timeseries) ProtoMessage ¶ added in v0.84.0
func (*DeploymentMetrics_Timeseries) ProtoMessage()
func (*DeploymentMetrics_Timeseries) ProtoReflect ¶ added in v0.89.0
func (x *DeploymentMetrics_Timeseries) ProtoReflect() protoreflect.Message
func (*DeploymentMetrics_Timeseries) Reset ¶ added in v0.84.0
func (x *DeploymentMetrics_Timeseries) Reset()
func (*DeploymentMetrics_Timeseries) String ¶ added in v0.84.0
func (x *DeploymentMetrics_Timeseries) String() string
type GetDeploymentLogsRequest ¶
type GetDeploymentLogsRequest struct { // Identifier of the deployment to get the logs from. DeploymentId string `protobuf:"bytes,1,opt,name=deployment_id,json=deploymentId,proto3" json:"deployment_id,omitempty"` // If set, limit logs to servers of this role. Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` // Formatting for log messages. // The possible values are text and json, with default value being text. Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` // If set limits logs to the server with this ID. ServerId string `protobuf:"bytes,4,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` // The start time for the query. Defaults to one hour ago. StartAt *timestamppb.Timestamp `protobuf:"bytes,100,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` // The end time for the query. Defaults to now. EndAt *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=end_at,json=endAt,proto3" json:"end_at,omitempty"` // Limit the number of log lines. Defaults to 1000. Limit int32 `protobuf:"varint,102,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
GetDeploymentLogsRequest contains request arguments for GetDeploymentLogs.
func (*GetDeploymentLogsRequest) Descriptor
deprecated
func (*GetDeploymentLogsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetDeploymentLogsRequest.ProtoReflect.Descriptor instead.
func (*GetDeploymentLogsRequest) GetDeploymentId ¶
func (x *GetDeploymentLogsRequest) GetDeploymentId() string
func (*GetDeploymentLogsRequest) GetEndAt ¶ added in v0.43.1
func (x *GetDeploymentLogsRequest) GetEndAt() *timestamppb.Timestamp
func (*GetDeploymentLogsRequest) GetFormat ¶ added in v0.43.6
func (x *GetDeploymentLogsRequest) GetFormat() string
func (*GetDeploymentLogsRequest) GetLimit ¶ added in v0.43.1
func (x *GetDeploymentLogsRequest) GetLimit() int32
func (*GetDeploymentLogsRequest) GetRole ¶
func (x *GetDeploymentLogsRequest) GetRole() string
func (*GetDeploymentLogsRequest) GetServerId ¶ added in v0.46.1
func (x *GetDeploymentLogsRequest) GetServerId() string
func (*GetDeploymentLogsRequest) GetStartAt ¶ added in v0.43.1
func (x *GetDeploymentLogsRequest) GetStartAt() *timestamppb.Timestamp
func (*GetDeploymentLogsRequest) ProtoMessage ¶
func (*GetDeploymentLogsRequest) ProtoMessage()
func (*GetDeploymentLogsRequest) ProtoReflect ¶ added in v0.89.0
func (x *GetDeploymentLogsRequest) ProtoReflect() protoreflect.Message
func (*GetDeploymentLogsRequest) Reset ¶
func (x *GetDeploymentLogsRequest) Reset()
func (*GetDeploymentLogsRequest) String ¶
func (x *GetDeploymentLogsRequest) String() string
type GetDeploymentMetricsRequest ¶ added in v0.84.0
type GetDeploymentMetricsRequest struct { // ID of the deployment for which metrics are being requested. // This is a required field. DeploymentId string `protobuf:"bytes,1,opt,name=deployment_id,json=deploymentId,proto3" json:"deployment_id,omitempty"` // Start time for the query. // Note: maximum allowed range is 1 week. // This is a required field. StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` // The end time for the query. // Note: maximum allowed range is 1 week. // This is a required field. EndAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_at,json=endAt,proto3" json:"end_at,omitempty"` // The type of server for which metrics are being requested. // Should be one of the following values: // - Dbserver // - Coordinator // - Single ServerType string `protobuf:"bytes,4,opt,name=server_type,json=serverType,proto3" json:"server_type,omitempty"` // The type of metric being requested. // Should be one of the following values: // - cpu // - memory // - disk MetricType string `protobuf:"bytes,5,opt,name=metric_type,json=metricType,proto3" json:"metric_type,omitempty"` // contains filtered or unexported fields }
Request for getting deployment metrics
func (*GetDeploymentMetricsRequest) Descriptor
deprecated
added in
v0.84.0
func (*GetDeploymentMetricsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetDeploymentMetricsRequest.ProtoReflect.Descriptor instead.
func (*GetDeploymentMetricsRequest) GetDeploymentId ¶ added in v0.84.0
func (x *GetDeploymentMetricsRequest) GetDeploymentId() string
func (*GetDeploymentMetricsRequest) GetEndAt ¶ added in v0.84.0
func (x *GetDeploymentMetricsRequest) GetEndAt() *timestamppb.Timestamp
func (*GetDeploymentMetricsRequest) GetMetricType ¶ added in v0.84.0
func (x *GetDeploymentMetricsRequest) GetMetricType() string
func (*GetDeploymentMetricsRequest) GetServerType ¶ added in v0.84.0
func (x *GetDeploymentMetricsRequest) GetServerType() string
func (*GetDeploymentMetricsRequest) GetStartAt ¶ added in v0.84.0
func (x *GetDeploymentMetricsRequest) GetStartAt() *timestamppb.Timestamp
func (*GetDeploymentMetricsRequest) ProtoMessage ¶ added in v0.84.0
func (*GetDeploymentMetricsRequest) ProtoMessage()
func (*GetDeploymentMetricsRequest) ProtoReflect ¶ added in v0.89.0
func (x *GetDeploymentMetricsRequest) ProtoReflect() protoreflect.Message
func (*GetDeploymentMetricsRequest) Reset ¶ added in v0.84.0
func (x *GetDeploymentMetricsRequest) Reset()
func (*GetDeploymentMetricsRequest) String ¶ added in v0.84.0
func (x *GetDeploymentMetricsRequest) String() string
type MonitoringServiceClient ¶
type MonitoringServiceClient interface { // Get the current API version of this service. // Required permissions: // - None GetAPIVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error) // Fetch all logs of the deployment that matches the given request. // Required permissions: // - monitoring.logs.get on the deployment identified by the given deployment ID. GetDeploymentLogs(ctx context.Context, in *GetDeploymentLogsRequest, opts ...grpc.CallOption) (MonitoringService_GetDeploymentLogsClient, error) // Get the usage metrics for the deployment based on the given request. // Note: Only at most 1 week worth of data may be requested. // Required permissions: // - monitoring.metrics.get on the deployment identified by the given deployment ID. GetDeploymentUsageMetrics(ctx context.Context, in *GetDeploymentMetricsRequest, opts ...grpc.CallOption) (*DeploymentMetrics, error) }
MonitoringServiceClient is the client API for MonitoringService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMonitoringServiceClient ¶
func NewMonitoringServiceClient(cc grpc.ClientConnInterface) MonitoringServiceClient
type MonitoringServiceServer ¶
type MonitoringServiceServer interface { // Get the current API version of this service. // Required permissions: // - None GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error) // Fetch all logs of the deployment that matches the given request. // Required permissions: // - monitoring.logs.get on the deployment identified by the given deployment ID. GetDeploymentLogs(*GetDeploymentLogsRequest, MonitoringService_GetDeploymentLogsServer) error // Get the usage metrics for the deployment based on the given request. // Note: Only at most 1 week worth of data may be requested. // Required permissions: // - monitoring.metrics.get on the deployment identified by the given deployment ID. GetDeploymentUsageMetrics(context.Context, *GetDeploymentMetricsRequest) (*DeploymentMetrics, error) }
MonitoringServiceServer is the server API for MonitoringService service.
type MonitoringService_GetDeploymentLogsClient ¶
type MonitoringService_GetDeploymentLogsClient interface { Recv() (*DeploymentLogsChunk, error) grpc.ClientStream }
type MonitoringService_GetDeploymentLogsServer ¶
type MonitoringService_GetDeploymentLogsServer interface { Send(*DeploymentLogsChunk) error grpc.ServerStream }
type UnimplementedMonitoringServiceServer ¶
type UnimplementedMonitoringServiceServer struct { }
UnimplementedMonitoringServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMonitoringServiceServer) GetAPIVersion ¶
func (*UnimplementedMonitoringServiceServer) GetDeploymentLogs ¶
func (*UnimplementedMonitoringServiceServer) GetDeploymentLogs(*GetDeploymentLogsRequest, MonitoringService_GetDeploymentLogsServer) error
func (*UnimplementedMonitoringServiceServer) GetDeploymentUsageMetrics ¶ added in v0.84.0
func (*UnimplementedMonitoringServiceServer) GetDeploymentUsageMetrics(context.Context, *GetDeploymentMetricsRequest) (*DeploymentMetrics, error)