Help us shape the future of Go! Take the 2026 Go Developer Survey

windows

package
v1.300048.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR       = "ERROR"
	WARNING     = "WARNING"
	INFORMATION = "INFORMATION"
)
View Source
const (
	DefaultFilePathWindowsConfiguration = "C:\\Program Files\\Amazon\\SSM\\Plugins\\awsCloudWatch\\AWS.EC2.Windows.CloudWatch.json"
)

Variables

View Source
var Processor processors.Processor = &processor{}

Functions

func AreTwoConfigurationsEqual

func AreTwoConfigurationsEqual(config1 NewCwConfig, config2 NewCwConfig) bool

func ReadConfigFromPathAsString added in v1.247350.0

func ReadConfigFromPathAsString(path string) (str string, err error)

Types

type FilesEntry

type FilesEntry struct {
	CollectList []NewCwConfigLog `json:"collect_list,omitempty"`
}

type LogsCollectedEntry

type LogsCollectedEntry struct {
	Files         *FilesEntry         `json:"files,omitempty"`
	WindowsEvents *WindowsEventsEntry `json:"windows_events,omitempty"`
}

type LogsEntry

type LogsEntry struct {
	LogsCollected LogsCollectedEntry `json:"logs_collected,omitempty"`
}

type MetricsEntry

type MetricsEntry struct {
	MetricsCollect   map[string]interface{} `json:"metrics_collected"`
	GlobalDimensions struct {
		ImageID              string `json:"ImageId"`
		InstanceID           string `json:"InstanceId"`
		InstanceType         string `json:"InstanceType"`
		AutoScalingGroupName string `json:"AutoScalingGroupName"`
	} `json:"append_dimensions"`
}

type NewCwConfig

type NewCwConfig struct {
	Agent   map[string]interface{} `json:"agent"`
	Metrics *MetricsEntry          `json:"metrics,omitempty"`
	Logs    *LogsEntry             `json:"logs,omitempty"`
}

func MapOldWindowsConfigToNewConfig

func MapOldWindowsConfigToNewConfig(oldConfig OldSsmCwConfig) (newConfig NewCwConfig)

func ReadNewConfigFromPath

func ReadNewConfigFromPath(path string) (config NewCwConfig, err error)

type NewCwConfigLog

type NewCwConfigLog struct {
	FilePath                string `json:"file_path"`
	CloudwatchLogGroupName  string `json:"log_group_name"`
	CloudwatchLogStreamName string `json:"log_stream_name"`
	TimeZone                string `json:"timezone"`
}

type NewCwConfigMetric

type NewCwConfigMetric struct {
	Counters  []map[string]interface{}
	Instances []string
}

type NewCwConfigWindowsEventLog

type NewCwConfigWindowsEventLog struct {
	EventName               string   `json:"event_name"`
	EventLevels             []string `json:"event_levels"`
	CloudwatchLogGroupName  string   `json:"log_group_name"`
	CloudwatchLogStreamName string   `json:"log_stream_name"`
	EventFormat             string   `json:"event_format"`
}

type OldSsmCwConfig

type OldSsmCwConfig struct {
	IsEnabled           bool `json:"IsEnabled"`
	EngineConfiguration struct {
		PollInterval string `json:"PollInterval"`
		Components   []struct {
			ID         string `json:"Id"`
			FullName   string `json:"FullName"`
			Parameters struct {
				// Windows log events
				LogName string `json:"LogName"`
				Levels  string `json:"Levels"`
				// logs
				LogDirectoryPath string `json:"LogDirectoryPath"`
				TimestampFormat  string `json:"TimestampFormat"`
				Encoding         string `json:"Encoding"`
				Filter           string `json:"Filter"`
				CultureName      string `json:"CultureName"`
				TimeZoneKind     string `json:"TimeZoneKind"`
				LineCount        string `json:"LineCount"`
				// metrics
				CategoryName   string `json:"CategoryName"`
				CounterName    string `json:"CounterName"`
				InstanceName   string `json:"InstanceName"`
				MetricName     string `json:"MetricName"`
				Unit           string `json:"Unit"`
				DimensionName  string `json:"DimensionName"`
				DimensionValue string `json:"DimensionValue"`
				// output logs
				AccessKey string `json:"AccessKey"`
				SecretKey string `json:"SecretKey"`
				Region    string `json:"Region"`
				LogGroup  string `json:"LogGroup"`
				LogStream string `json:"LogStream"`
				// output metrics
				NameSpace string `json:"NameSpace"`
			} `json:"Parameters"`
		} `json:"Components"`
		Flows struct {
			Flows []string `json:"Flows"`
		} `json:"Flows"`
	} `json:"EngineConfiguration"`
}

func ReadOldConfigFromPath

func ReadOldConfigFromPath(path string) (config OldSsmCwConfig, err error)

type WindowsEventsEntry

type WindowsEventsEntry struct {
	CollectList []NewCwConfigWindowsEventLog `json:"collect_list,omitempty"`
}

Jump to

Keyboard shortcuts

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