Documentation ¶
Index ¶
- Variables
- func GetCPUUsageIdleMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetCPUUsageIdlePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetCPUUsageNicePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetCPUUsageSysPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetCPUUsageUserPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetCloudWatchAlarms(clientAuth *model.Auth, startTime, endTime *time.Time) ([]*cloudwatch.MetricAlarm, error)
- func GetCpuSysTimeUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetCpuUsageNiceUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetCpuUsageUserMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetCpuUtilizationGraphMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetCpuUtilizationGraphPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetCpuUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetCpuUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetDiskAvailablePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetDiskIOMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetDiskReadPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetDiskReadPanelMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetDiskTotalPanelMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, *cloudwatch.GetMetricDataOutput, error)
- func GetDiskUsedPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetDiskUsedPanelMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetDiskWritePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetDiskWritePanelMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetEC2DiskIOPerformancePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetEc2CustomAlertPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
- func GetInstanceErrorRatePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
- func GetInstanceRunningHour(cmd *cobra.Command, clientAuth *model.Auth, ...) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
- func GetInstanceStartCountPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
- func GetInstanceStopCountPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
- func GetInstanceStoppedCountPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
- func GetLatencyMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetLatencyPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetMemCacheMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetMemCachePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetMemUsageFreeMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetMemUsageFreePanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetMemUsageTotal(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetMemUsageTotalMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetMemUsageUsed(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetMemUsageUsedMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetMemoryUtilizationGraphMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetMemoryUtilizationGraphPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetMemoryUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetMemoryUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkInBoundMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkInBoundPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkInBytesMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkInBytesPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkInPackerMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkInPacketsPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkMetricData(clientAuth *model.Auth, elementType string, startTime, endTime *time.Time, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkOutBoundMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkOutBoundPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkOutBytesMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkOutBytesPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkOutPacketsMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkOutPacketsPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkThroughputMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkThroughputPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkTrafficPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetNetworkUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func GetStorageUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, ...) (*cloudwatch.GetMetricDataOutput, error)
- func GetStorageUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, ...) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
- func ProcessQueryResults(results []*cloudwatchlogs.GetQueryResultsOutput) []*cloudwatchlogs.GetQueryResultsOutput
- type AlarmNotification
- type CpuUsageIdle
- type CpuUsageNice
- type CpuUsageSys
- type CpuUsageUser
- type CpuUtilizationsResult
- type DiskAvailableDataPoint
- type DiskIOPerformanceResult
- type DiskReadPanelData
- type DiskUsedPanelData
- type DiskWritePanelData
- type Ec2Latency
- type ErrorEvent
- type HostedSerivcesOverView
- type InstanceDummyData
- type InstanceInfo
- type MemCache
- type MemUsageFree
- type MemUsageTotal
- type MemUsageUsed
- type MemoryGraphUtilizationResult
- type NetworkInBytes
- type NetworkInPackets
- type NetworkInbound
- type NetworkOutBytes
- type NetworkOutPackets
- type NetworkResult
- type NetworkThroughputData
- type NetworkTraffic
- type Networkoutbound
- type Result
- type StorageResult
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsxEC2DiskIOPerformanceCmd = &cobra.Command{ Use: "disk_io_performance_panel", Short: "get disk I/O performance metrics data", Long: `command to get disk I/O performance metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetDiskReadPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting disk I/O performance metrics: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEC2NetworkTrafficCmd = &cobra.Command{ Use: "network_traffic_panel", Short: "get network traffic metrics data", Long: `command to get network traffic metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err, _ := GetNetworkTrafficPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network traffic data: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2AlarmandNotificationcmd = &cobra.Command{ Use: "alerts_and_notifications_panel", Short: "Retrieve recent alerts and notifications related to EC2 instance availability", Long: `Command to retrieve recent alerts and notifications related to EC2 instance availability`, Run: func(cmd *cobra.Command, args []string) { authFlag, clientAuth, err := handleAuth(cmd) if err != nil { log.Println("Error during authentication:", err) return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") notifications, err := GetAlertsAndNotificationsPanel(cmd, clientAuth) if err != nil { log.Println("Error getting alerts and notifications:", err) return } if responseType == "frame" { fmt.Println(notifications) } else { printTable(notifications) } } }, }
View Source
var AwsxEc2CpuSysTimeCmd = &cobra.Command{ Use: "cpu_sys_time_utilization_panel", Short: "get cpu sys time utilization metrics data", Long: `command to get cpu sys time utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetCPUUsageSysPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu sys time utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2CpuUsageIdleCmd = &cobra.Command{ Use: "cpu_usage_Idle_utilization_panel", Short: "get cpu usage idle utilization metrics data", Long: `command to get cpu usage idle utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command..") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetCPUUsageIdlePanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu usage idle utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2CpuUsageNiceCmd = &cobra.Command{ Use: "cpu_usage_nice_utilization_panel", Short: "get cpu usage nice utilization metrics data", Long: `command to get cpu usage nice utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetCPUUsageNicePanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2CpuUsageUserCmd = &cobra.Command{ Use: "cpu_usage_user_utilization_panel", Short: "get cpu usage user utilization metrics data", Long: `command to get cpu usage user utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetCPUUsageUserPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu usage user panel utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2CpuUtilizationCmd = &cobra.Command{ Use: "cpu_utilization_panel", Short: "get cpu utilization metrics data", Long: `command to get cpu utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetCpuUtilizationPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2CpuUtilizationGraphsCmd = &cobra.Command{ Use: "cpu_utilization_graph_panel", Short: "get cpu utilization graph metrics data", Long: `command to get cpu utilization graph metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetMemoryUtilizationPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization graph: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2CustomAlertPanelCmd = &cobra.Command{ Use: "custom_alert_panel", Short: "get custom alerts for EC2 security group changes", Long: `command to get custom alerts for EC2 security group changes`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from custom alert panel") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { cloudwatchMetric, err := GetEc2CustomAlertPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting custom alerts: ", err) return } fmt.Println(cloudwatchMetric) } }, }
View Source
var AwsxEc2DiskAvailableCmd = &cobra.Command{ Use: "disk_available_panel", Short: "get disk available metrics data", Long: `command to get disk available metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricData, err := GetDiskAvailablePanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting disk available utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricData) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2DiskReadCmd = &cobra.Command{ Use: "disk_read_panel", Short: "get disk read metrics data", Long: `command to get disk read metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetDiskReadPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting disk read utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2DiskUsedCmd = &cobra.Command{ Use: "disk_used_panel", Short: "get disk used metrics data", Long: `command to get disk used metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetDiskUsedPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting disk read utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2DiskWriteCmd = &cobra.Command{ Use: "disk_write_panel", Short: "get disk write metrics data", Long: `command to get disk write metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetDiskWritePanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2ErrorRatePanelCmd = &cobra.Command{ Use: "error_rate_panel", Short: "Get error rate panel metrics data", Long: `Command to get error rate panel metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("Running error rate panel command") var authFlag bool var clientAuth *model.Auth var err error authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { results, err := GetInstanceErrorRatePanel(cmd, clientAuth, nil) if err != nil { log.Println("Error in getting instance error rate panel: ", err) return } fmt.Println(results) } }, }
View Source
var AwsxEc2InstanceHealthCheckCmd = &cobra.Command{ Use: "instance_health_check_panel", Short: "get instance health check metrics data", Long: `command to get instance status metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, _, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { check, err := GetInstanceHealthCheck() if err != nil { log.Printf("Error getting instance status: %v", err) } fmt.Println(check) } }, }
View Source
var AwsxEc2InstanceRunningHourCmd = &cobra.Command{ Use: "instance_stop_count_panel", Short: "Get instance stop count metrics data", Long: `Command to get instance stop count metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("Running instance stop count panel command") var authFlag bool var clientAuth *model.Auth var err error authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { panel, err := GetInstanceRunningHour(cmd, clientAuth, nil) if err != nil { return } fmt.Println(panel) } }, }
View Source
var AwsxEc2InstanceStartCmd = &cobra.Command{ Use: "instance_start_count_panel", Short: "get instance start count metrics data", Long: `command to get instance start count metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag bool var clientAuth *model.Auth var err error authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { panel, err := GetInstanceStartCountPanel(cmd, clientAuth, nil) if err != nil { return } fmt.Println(panel) } }, }
View Source
var AwsxEc2InstanceStatusCmd = &cobra.Command{ Use: "instance_status_panel", Short: "get instance status metrics data", Long: `command to get instance status metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { instanceStatus, err := GetInstanceStatus(cmd, clientAuth) if err != nil { log.Fatalf("Error getting instance status: %v", err) } fmt.Printf("Instance ID: %s, Instance Type: %s, Availability Zone: %s, State: %s, System Checks Status: %s, Custom Alert: %t, Health Percentage: %.2f%%\n", instanceStatus.InstanceID, instanceStatus.InstanceType, instanceStatus.AvailabilityZone, instanceStatus.State, instanceStatus.SystemChecksStatus, instanceStatus.CustomAlert, instanceStatus.HealthPercentage) } }, }
View Source
var AwsxEc2InstanceStopCmd = &cobra.Command{ Use: "instance_stop_count_panel", Short: "Get instance stop count metrics data", Long: `Command to get instance stop count metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("Running instance stop count panel command") var authFlag bool var clientAuth *model.Auth var err error authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { panel, err := GetInstanceStopCountPanel(cmd, clientAuth, nil) if err != nil { return } fmt.Println(panel) } }, }
View Source
var AwsxEc2InstanceStoppedHourCmd = &cobra.Command{ Use: "instance_stop_count_panel", Short: "Get instance stop count metrics data", Long: `Command to get instance stop count metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("Running instance stop count panel command") var authFlag bool var clientAuth *model.Auth var err error authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { panel, err := GetInstanceStoppedCountPanel(cmd, clientAuth, nil) if err != nil { return } fmt.Println(panel) } }, }
View Source
var AwsxEc2LatencyCmd = &cobra.Command{ Use: "latency_panel", Short: "get latency metrics data", Long: `command to get latency metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetLatencyPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2MemCachedCmd = &cobra.Command{ Use: "memory_cached_panel", Short: "get memory cache metrics data", Long: `command to get memory cache metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetMemUsageTotal(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2MemoryUsageFreeCmd = &cobra.Command{ Use: "memory_usage_free_utilization_panel", Short: "get cpu memory usage free utilization metrics data", Long: `command to get cpu usage free utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetMemUsageFreePanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2MemoryUsageTotalCmd = &cobra.Command{ Use: "memory_usage_panel", Short: "get memory usage metrics data", Long: `command to get memory usage metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetMemUsageTotal(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2MemoryUsageUsedCmd = &cobra.Command{ Use: "memory_usage_used__utilization_panel", Short: "get memory usage used metrics data", Long: `command to get memory usage used metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetMemUsageUsed(cmd, clientAuth, nil) if err != nil { log.Println("Error getting memory usage used: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2MemoryUtilizationCmd = &cobra.Command{ Use: "memory_utilization_panel", Short: "get memory utilization metrics data", Long: `command to get memory utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetMemoryUtilizationPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting memory utilization: ", err) fmt.Println("null") return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2MemoryUtilizationGraphCmd = &cobra.Command{ Use: "memory_utilization_graph_panel", Short: "get memory utilization graph metrics data", Long: `command to get memory utilization graph metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetMemoryUtilizationPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting memory utilization graph: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkInBytesCmd = &cobra.Command{ Use: "network_inbytes_utilization_panel", Short: "get network inbytes metrics data", Long: `command to get network inbytes metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkInBytesPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network inbytes metrics data: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkInPacketsCmd = &cobra.Command{ Use: "network_inpackets_utilization_panel", Short: "get network inpackets utilization metrics data", Long: `command to get network inpackets utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkInPacketsPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network inpackets utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkInboundCmd = &cobra.Command{ Use: "network_in_bound_panel", Short: "get network in bound metrics data", Long: `command to get network in bound metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkInBoundPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network in bytes metrics data: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkOutBytesCmd = &cobra.Command{ Use: "network_outbytes_utilization_panel", Short: "get network outbytes utilization metrics data", Long: `command to get network out bytes utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkOutBytesPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting outbytes utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkOutPacketsCmd = &cobra.Command{ Use: "network_outpackets_utilization_panel", Short: "get network outpackts utilization metrics data", Long: `command to get network outpackets utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkOutPacketsPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network outpackets utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkOutboundCmd = &cobra.Command{ Use: "network_out_bound_panel", Short: "get network out bound metrics data", Long: `command to get network out bound metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkOutBoundPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network in bytes metrics data: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkThroughputCmd = &cobra.Command{ Use: "network_throughput_panel", Short: "get network throughput metrics data", Long: `command to get network throughput metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkThroughputPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network throughput data: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2NetworkUtilizationCmd = &cobra.Command{ Use: "network_utilization_panel", Short: "get network utilization metrics data", Long: `command to get network utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetNetworkUtilizationPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting network utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2StorageUtilizationCmd = &cobra.Command{ Use: "Storage_utilization_panel", Short: "get storage utilization metrics data", Long: `command to get storage utilization metrics data`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("running from child command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("Error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { responseType, _ := cmd.PersistentFlags().GetString("responseType") jsonResp, cloudwatchMetricResp, err := GetStorageUtilizationPanel(cmd, clientAuth, nil) if err != nil { log.Println("Error getting cpu utilization: ", err) return } if responseType == "frame" { fmt.Println(cloudwatchMetricResp) } else { fmt.Println(jsonResp) } } }, }
View Source
var AwsxEc2hostedServicesCmd = &cobra.Command{ Use: "EC2", Short: "A brief description of your application", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your application.`, Run: func(cmd *cobra.Command, args []string) { queryName, _ := cmd.Flags().GetString("query") elementType, _ := cmd.Flags().GetString("elementType") if queryName == "hosted_services_overview_panel" && (elementType == "EC2" || elementType == "AWS/EC2") { _, err := GetHostedServicesData(cmd) if err != nil { return } } }, }
AwsxEc2hostedServicesCmd represents the EC2 command.
View Source
var ListErrorsCmd = &cobra.Command{ Use: "listErrors", Short: "List error events", Run: func(cmd *cobra.Command, args []string) { _, err := ListErrorEvents() if err != nil { return } }, }
ListErrorsCmd represents the command to list error events.
Functions ¶
func GetCPUUsageIdleMetricData ¶ added in v1.2.2
func GetCPUUsageIdleMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetCPUUsageIdlePanel ¶ added in v1.2.2
func GetCPUUsageIdlePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetCPUUsageNicePanel ¶ added in v1.2.2
func GetCPUUsageNicePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetCPUUsageSysPanel ¶ added in v1.2.2
func GetCPUUsageSysPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetCPUUsageUserPanel ¶ added in v1.2.0
func GetCPUUsageUserPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetCloudWatchAlarms ¶ added in v1.2.4
func GetCloudWatchAlarms(clientAuth *model.Auth, startTime, endTime *time.Time) ([]*cloudwatch.MetricAlarm, error)
func GetCpuSysTimeUtilizationMetricData ¶ added in v1.2.2
func GetCpuSysTimeUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetCpuUsageNiceUtilizationMetricData ¶ added in v1.2.2
func GetCpuUsageNiceUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetCpuUsageUserMetricData ¶ added in v1.2.2
func GetCpuUsageUserMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetCpuUtilizationGraphMetricData ¶ added in v1.6.0
func GetCpuUtilizationGraphMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetCpuUtilizationGraphPanel ¶ added in v1.6.0
func GetCpuUtilizationGraphPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetCpuUtilizationMetricData ¶ added in v1.0.2
func GetCpuUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetCpuUtilizationPanel ¶ added in v1.0.7
func GetCpuUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetDiskAvailablePanel ¶ added in v1.2.2
func GetDiskAvailablePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetDiskIOMetricData ¶ added in v1.7.2
func GetDiskIOMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetDiskReadPanel ¶ added in v1.1.6
func GetDiskReadPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetDiskReadPanelMetricData ¶ added in v1.1.6
func GetDiskReadPanelMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetDiskTotalPanelMetricData ¶ added in v1.2.2
func GetDiskTotalPanelMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, *cloudwatch.GetMetricDataOutput, error)
func GetDiskUsedPanel ¶ added in v1.2.2
func GetDiskUsedPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetDiskUsedPanelMetricData ¶ added in v1.2.2
func GetDiskUsedPanelMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetDiskWritePanel ¶ added in v1.1.7
func GetDiskWritePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetDiskWritePanelMetricData ¶ added in v1.1.7
func GetDiskWritePanelMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetEC2DiskIOPerformancePanel ¶ added in v1.7.2
func GetEC2DiskIOPerformancePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetEc2CustomAlertPanel ¶ added in v1.4.8
func GetEc2CustomAlertPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
func GetInstanceErrorRatePanel ¶ added in v1.4.6
func GetInstanceErrorRatePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
func GetInstanceRunningHour ¶ added in v1.6.8
func GetInstanceRunningHour(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
func GetInstanceStartCountPanel ¶ added in v1.2.4
func GetInstanceStartCountPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
func GetInstanceStopCountPanel ¶ added in v1.2.4
func GetInstanceStopCountPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
func GetInstanceStoppedCountPanel ¶ added in v1.6.8
func GetInstanceStoppedCountPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)
func GetLatencyMetricData ¶ added in v1.2.4
func GetLatencyMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetLatencyPanel ¶ added in v1.2.4
func GetLatencyPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetMemCacheMetricData ¶ added in v1.2.2
func GetMemCacheMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetMemCachePanel ¶ added in v1.2.2
func GetMemCachePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetMemUsageFreeMetricData ¶ added in v1.2.2
func GetMemUsageFreeMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetMemUsageFreePanel ¶ added in v1.2.2
func GetMemUsageFreePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetMemUsageTotal ¶ added in v1.2.2
func GetMemUsageTotal(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetMemUsageTotalMetricData ¶ added in v1.2.2
func GetMemUsageTotalMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetMemUsageUsed ¶ added in v1.2.2
func GetMemUsageUsed(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetMemUsageUsedMetricData ¶ added in v1.2.2
func GetMemUsageUsedMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetMemoryUtilizationGraphMetricData ¶ added in v1.6.0
func GetMemoryUtilizationGraphMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetMemoryUtilizationGraphPanel ¶ added in v1.6.0
func GetMemoryUtilizationGraphPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetMemoryUtilizationMetricData ¶ added in v1.1.6
func GetMemoryUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetMemoryUtilizationPanel ¶ added in v1.1.6
func GetMemoryUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkInBoundMetricData ¶ added in v1.2.4
func GetNetworkInBoundMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkInBoundPanel ¶ added in v1.2.4
func GetNetworkInBoundPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkInBytesMetricData ¶ added in v1.1.8
func GetNetworkInBytesMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkInBytesPanel ¶ added in v1.1.8
func GetNetworkInBytesPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkInPackerMetricData ¶ added in v1.1.6
func GetNetworkInPackerMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkInPacketsPanel ¶ added in v1.1.6
func GetNetworkInPacketsPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkMetricData ¶ added in v1.1.1
func GetNetworkMetricData(clientAuth *model.Auth, elementType string, startTime, endTime *time.Time, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkOutBoundMetricData ¶ added in v1.2.4
func GetNetworkOutBoundMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkOutBoundPanel ¶ added in v1.2.4
func GetNetworkOutBoundPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkOutBytesMetricData ¶ added in v1.2.0
func GetNetworkOutBytesMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkOutBytesPanel ¶ added in v1.2.0
func GetNetworkOutBytesPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkOutPacketsMetricData ¶ added in v1.1.6
func GetNetworkOutPacketsMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkOutPacketsPanel ¶ added in v1.1.6
func GetNetworkOutPacketsPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkThroughputMetricData ¶ added in v1.2.4
func GetNetworkThroughputMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkThroughputPanel ¶ added in v1.2.4
func GetNetworkThroughputPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkTrafficPanel ¶ added in v1.7.3
func GetNetworkTrafficPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetNetworkUtilizationMetricData ¶ added in v1.2.2
func GetNetworkUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetNetworkUtilizationPanel ¶ added in v1.1.1
func GetNetworkUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func GetStorageUtilizationMetricData ¶ added in v1.7.2
func GetStorageUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)
func GetStorageUtilizationPanel ¶ added in v1.7.2
func GetStorageUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)
func ProcessQueryResults ¶ added in v1.10.0
func ProcessQueryResults(results []*cloudwatchlogs.GetQueryResultsOutput) []*cloudwatchlogs.GetQueryResultsOutput
Types ¶
type AlarmNotification ¶ added in v1.2.4
func GetAlertsAndNotificationsPanel ¶ added in v1.2.4
type CpuUsageIdle ¶ added in v1.2.2
type CpuUsageNice ¶ added in v1.2.2
type CpuUsageSys ¶ added in v1.2.2
type CpuUsageUser ¶ added in v1.2.0
type CpuUtilizationsResult ¶ added in v1.6.7
type DiskAvailableDataPoint ¶ added in v1.4.6
type DiskIOPerformanceResult ¶ added in v1.7.2
type DiskReadPanelData ¶ added in v1.1.6
type DiskUsedPanelData ¶ added in v1.2.2
type DiskWritePanelData ¶ added in v1.1.7
type Ec2Latency ¶ added in v1.2.4
type ErrorEvent ¶ added in v1.4.8
type ErrorEvent struct { EventID string `json:"event_id"` Timestamp string `json:"timestamp"` ErrorCode string `json:"error_code"` Severity string `json:"severity"` Description string `json:"description"` SourceComponent string `json:"source_component"` ActionTaken string `json:"action_taken"` ResolutionStatus string `json:"resolution_status"` AdditionalNotes string `json:"additional_notes"` }
ErrorEvent represents an error event.
func ListErrorEvents ¶ added in v1.4.8
func ListErrorEvents() ([]ErrorEvent, error)
type HostedSerivcesOverView ¶ added in v1.5.6
type HostedSerivcesOverView struct { ServiceName string `json:"serviceName"` HealthStatus string `json:"healthStatus"` ResponseTime string `json:"responseTime"` ErrorRate string `json:"errorRate"` Availability string `json:"availability"` Throughput string `json:"throughput"` }
ServiceStatus represents the status of a service.
func GetHostedServicesData ¶ added in v1.4.8
func GetHostedServicesData(cmd *cobra.Command) ([]HostedSerivcesOverView, error)
type InstanceDummyData ¶ added in v1.5.6
type InstanceDummyData struct { InstanceID string InstanceType string AvailabilityZone string InstanceStatus string CpuUtilization string DiskSpaceUtilization string SystemChecks string InstanceChecks string Alarm string SystemCheck string InstanceCheck string }
func GetInstanceHealthCheck ¶ added in v1.4.6
func GetInstanceHealthCheck() ([]InstanceDummyData, error)
type InstanceInfo ¶ added in v1.5.4
type InstanceInfo struct { InstanceID string InstanceType string AvailabilityZone string State string SystemChecksStatus string CustomAlert bool HealthPercentage float64 }
func GetInstanceStatus ¶ added in v1.2.7
type MemUsageFree ¶ added in v1.2.2
type MemUsageTotal ¶ added in v1.2.2
type MemUsageUsed ¶ added in v1.2.2
type MemoryGraphUtilizationResult ¶ added in v1.6.7
type NetworkInBytes ¶ added in v1.1.8
type NetworkInPackets ¶ added in v1.1.6
type NetworkInbound ¶ added in v1.2.4
type NetworkOutBytes ¶ added in v1.2.0
type NetworkOutPackets ¶ added in v1.1.6
type NetworkResult ¶ added in v1.1.1
type NetworkThroughputData ¶ added in v1.2.4
type NetworkTraffic ¶ added in v1.7.4
type Networkoutbound ¶ added in v1.2.4
type StorageResult ¶ added in v1.7.2
Source Files ¶
- alerts_and_notification_panel.go
- cpu_usage_idle_panel.go
- cpu_usage_nice_panel.go
- cpu_usage_sys_panel.go
- cpu_usage_user_panel.go
- cpu_utilization_graph_panel.go
- cpu_utilization_panel.go
- custom_alert_panel.go
- disk_available_panel.go
- disk_io_panel.go
- disk_reads_panel.go
- disk_used_panel.go
- disk_writes_panel.go
- error_rate_panel.go
- error_tracking_panel.go
- hosted_services_overview_panel.go
- instance_health_check_panel.go
- instance_hours_stopped_panel.go
- instance_running_hour_panel.go
- instance_start_count.go
- instance_status_panel.go
- instance_stop_count.go
- latency_panel.go
- mem_cached_panel.go
- mem_usage_free_panel.go
- mem_usage_total_panel.go
- mem_usage_used_panel.go
- memory_utilization_graph_panel.go
- memory_utilization_panel.go
- net_inbytes_panel.go
- net_inpackets_panel.go
- net_outbytes_panel.go
- net_outpackets_panel.go
- network_inbound_panel.go
- network_outbound_panel.go
- network_traffic_panel.go
- network_utilization_panel.go
- storage_utilization_panel.go
- throughput_panel.go
Click to show internal directories.
Click to hide internal directories.