metrics

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MetricsRetentionTimeRaw string `json:"metricsRetentionTimeRaw,omitempty"`
	MetricsRetentionTime5m  string `json:"metricsRetentionTime5m,omitempty"`
	MetricsRetentionTime1h  string `json:"metricsRetentionTime1h,omitempty"`
}

func (Config) Validate

func (r Config) Validate() error

Validate validates the retention data

type GetConfigResponse

type GetConfigResponse struct {
	Message                 string `json:"message,omitempty"`
	MetricsRetentionTimeRaw string `json:"metricsRetentionTimeRaw,omitempty"`
	MetricsRetentionTime5m  string `json:"metricsRetentionTime5m,omitempty"`
	MetricsRetentionTime1h  string `json:"metricsRetentionTime1h,omitempty"`
}

type MetricsService

type MetricsService common.Service

MetricsService is the service that handles CRUD functionality for Argus metrics storage

func New

New returns a new handler for the service

func (*MetricsService) GetConfig

func (svc *MetricsService) GetConfig(ctx context.Context, projectID, instanceID string) (res GetConfigResponse, err error)

GetConfig returns argus metrics storage config See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_metrics-storage-retentions_list

func (*MetricsService) UpdateConfig

func (svc *MetricsService) UpdateConfig(ctx context.Context, projectID, instanceID string, cfg Config) (res UpdateConfigResponse, err error)

UpdateConfig updates argus metrics storage config See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_metrics-storage-retentions_update

type UpdateConfigResponse

type UpdateConfigResponse struct {
	Message string `json:"message,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL