monitoring

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_DISK_DEVICE = "nvme0n1p1"
View Source
const DEFAULT_NETWORK_INTERFACE = "enp39s0"
View Source
const NAMESPACE = "CWAgent"

Variables

This section is empty.

Functions

func GenerateMetricsSummary

func GenerateMetricsSummary(action *githubactions.Action, metrics []string, formatter, networkInterface, diskDevice string)
func GetCloudWatchLink(action *githubactions.Action) string
func GetEC2InstanceLink(action *githubactions.Action) string

Types

type AgentConfig

type AgentConfig struct {
	MetricsCollectionInterval int `json:"metrics_collection_interval"`
}

type CloudWatchConfig

type CloudWatchConfig struct {
	Metrics MetricsConfig `json:"metrics"`
	Agent   AgentConfig   `json:"agent"`
}

type Measurement

type Measurement struct {
	Name        string
	RealName    string
	Rename      string
	Unit        string
	Aggregation string
}

func GetMeasurements

func GetMeasurements(metric string) []Measurement

GetMetricNames returns a list of metric names for a given resource type https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/metrics-collected-by-CloudWatch-agent.html

type MetricDataPoint

type MetricDataPoint struct {
	Timestamp time.Time
	Value     float64
}

type MetricSummary

type MetricSummary struct {
	Name   string
	Data   []float64
	Min    float64
	Max    float64
	Avg    float64
	Unit   string
	Source string // "AWS" or "Custom"
}

type MetricsCollector

type MetricsCollector struct {
	// contains filtered or unexported fields
}

func NewMetricsCollector

func NewMetricsCollector(action *githubactions.Action) *MetricsCollector

func (*MetricsCollector) GetMetricSummary

func (mc *MetricsCollector) GetMetricSummary(metricName, namespace string, aggregation string, dimensions []types.Dimension, startTime time.Time) *MetricSummary

type MetricsConfig

type MetricsConfig struct {
	Namespace          string                 `json:"namespace"`
	MetricsCollected   map[string]interface{} `json:"metrics_collected"`
	AppendDimensions   map[string]string      `json:"append_dimensions"`
	ForceFlushInterval int                    `json:"force_flush_interval"`
}

Jump to

Keyboard shortcuts

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