EKS

package
v1.10.10 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodNetworkRXBytes = "pod_network_rx_bytes"
	PodNetworkTXBytes = "pod_network_tx_bytes"
)
View Source
const (
	PodNetworkRXByte = "pod_network_rx_bytes"
	PodNetworkTXByte = "pod_network_tx_bytes"
)
View Source
const (
	NodeCPUMetricName     = "node_cpu_utilization"
	NodeMemoryMetricName  = "node_memory_utilization"
	NodeStorageMetricName = "node_filesystem_utilization"
)

Variables

View Source
var AwsxEKSAllocatableCpuCmd = &cobra.Command{
	Use:   "allocatable_cpu_panel",
	Short: "get allocatable cpu metrics data",
	Long:  `command to get allocatable cpu 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 := GetAllocatableCPUData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting allocatable cpu: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSAllocatableMemCmd = &cobra.Command{
	Use:   "allocatable_mem_panel",
	Short: "get allocatable memory metrics data",
	Long:  `command to get allocatable memory 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 := GetAllocatableMemData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting allocatable memory: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSCpuLimitsCmd = &cobra.Command{
	Use:   "cpu_limits_panel",
	Short: "get cpu limits metrics data",
	Long:  `command to get cpu limits 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 := GetCPULimitsData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu limits data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSCpuRequestsCmd = &cobra.Command{
	Use:   "cpu_requests_panel",
	Short: "get cpu requests metrics data",
	Long:  `command to get cpu requests 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 := GetCPURequestData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu requests data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSCpuUtilizationCmd = &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 := GetEKScpuUtilizationPanel(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 AwsxEKSCpuUtilizationGraphCmd = &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 := GetCPUUtilizationData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu utilization graph data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSCpuUtilizationNodeGraphCmd = &cobra.Command{
	Use:   "cpu_utilization_node_graph_panel",
	Short: "get cpu utilization node graph metrics data",
	Long:  `command to get cpu utilization node 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 := GetCPUUtilizationNodeData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu utilization node graph data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSDiskIOPerformanceCmd = &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 := GetEKSDiskIOPerformancePanel(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 AwsxEKSDiskUtilizationCmd = &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 := GetEKScpuUtilizationPanel(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 AwsxEKSIncidentResponseTimeCmd = &cobra.Command{
	Use:   "incident_response_time_panel",
	Short: "get incident response time metrics data",
	Long:  `command to get incident response time 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 {
				log.Println("Error displaying help: ", err)
				return
			}
			return
		}
		if !authFlag {
			log.Println("Authentication failed.")
			return
		}

		responseType, _ := cmd.PersistentFlags().GetString("responseType")
		jsonResp, cloudwatchMetricResp, err := GetIncidentResponseTimeData(cmd, clientAuth, nil)
		if err != nil {
			log.Println("Error getting incident response time data: ", err)
			return
		}
		if responseType == "frame" {
			fmt.Println(cloudwatchMetricResp)
		} else {
			fmt.Println(jsonResp)
		}
	},
}
View Source
var AwsxEKSMemoryLimitsCmd = &cobra.Command{
	Use:   "memory_limits_panel",
	Short: "get memory_limits metrics data",
	Long:  `command to get memory_limits 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 := GetMemoryLimitsData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting memory_limits: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSMemoryRequestsCmd = &cobra.Command{
	Use:   "memory_requests_panel",
	Short: "get memory_requests metrics data",
	Long:  `command to get memory_requests 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 := GetMemoryRequestData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting memory_requests: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSMemoryUsageCmd = &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 := GetMemoryUsageData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting memory_usage: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSMemoryUtilizationCmd = &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 := GeteksMemoryUtilizationPanel(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting memory utilization: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSMemoryUtilizationGraphCmd = &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 := GetMemoryUtilizationGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting memory_utilization: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNetworkAvailabilityCmd = &cobra.Command{
	Use:   "network_availability_panel",
	Short: "get network_availability graph metrics data",
	Long:  `command to get network_availability 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 := GetNetworkAvailabilityData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting Network availability data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNetworkInOutCmd = &cobra.Command{
	Use:   "Network_in_out_panel",
	Short: "get Network in out graph metrics data",
	Long:  `command to get Network in out 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 := GetNetworkInOutData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting Network in out data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNetworkThroughputCmd = &cobra.Command{
	Use:   "network_throughput_panel",
	Short: "get Network throughput graph metrics data",
	Long:  `command to get Network throughput 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 := 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 AwsxEKSNetworkThroughputSingleCmd = &cobra.Command{
	Use:   "network_throughput_single_panel",
	Short: "get Network throughput single graph metrics data",
	Long:  `command to get Network throughput single 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 := GetNetworkThroughputSinglePanel(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 AwsxEKSNetworkUtilizationCmd = &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 data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeCapacityCmd = &cobra.Command{
	Use:   "node_capacity_panel",
	Short: "get node capacity metrics data",
	Long:  `command to get node capacity 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")
			nodeCapacityPanel, err := GetNodeCapacityPanel(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting node capacity data: ", err)
				return
			}

			jsonResp := nodeCapacityPanel.JsonData
			cloudwatchMetricResp := nodeCapacityPanel.RawData

			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeConditionCmd = &cobra.Command{
	Use:   "node_condition_panel",
	Short: "get node condition metrics data",
	Long:  `command to get node condition 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 := GetNodeConditionPanel(cmd, clientAuth)
			if err != nil {
				log.Println("Error getting Node condition data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeDowntimeCmd = &cobra.Command{
	Use:   "node_downtime_panel",
	Short: "get node downtime metrics data",
	Long:  `command to get node downtime 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 := GetNodeDowntimePanel(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting Node downtime data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeEventLogsCmd = &cobra.Command{
	Use:   "node_event_logs_panel",
	Short: "get node event logs data",
	Long:  `command to get node event logs 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 := GetNodeEventLogsSinglePanel(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting Node event logs data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeFailureCmd = &cobra.Command{
	Use:   "node_failure_panel",
	Short: "Get node failure metrics data",
	Long:  `Command to get node failure 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 := GetNodeFailureData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting node failure data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeRecoveryPanelCmd = &cobra.Command{
	Use:   "node_recovery_time_panel",
	Short: "get node recovery time metrics data",
	Long:  `command to get node recovery time 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 := GetNodeRecoveryTime(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting node recovery time data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeStabilityCmd = &cobra.Command{
	Use:   "node_stability_panel",
	Short: "get node stability metrics data",
	Long:  `command to get node stability 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 := GetCPULimitsData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu limits data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSNodeUptimeCmd = &cobra.Command{
	Use:   "node_uptime_panel",
	Short: "get node uptime metrics data",
	Long:  `command to get node uptime 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 := GetNodeUptimePanel(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting Node uptime data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSServiceAvailabilityCmd = &cobra.Command{
	Use:   "service_availability_panel",
	Short: "get service availability metrics data",
	Long:  `command to get service availability 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 := GetServiceAvailabilityData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting Service availability data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEKSStorageUtilizationCmd = &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 storage utilization: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxEksDataTransferRateCmd = &cobra.Command{
	Use:   "data_transfer_rate_panel",
	Short: "get EKS data transfer rate metrics data",
	Long:  `command to get EKS data transfer rate 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 := GetEksDataTransferRatePanel(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting EKS data transfer rate data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxResourceUtilizationCmd = &cobra.Command{
	Use:   "resource_utilization_patterns_panel",
	Short: "get resource utilization metrics data",
	Long:  `command to get resource 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 := GetResourceUtilizationData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting resource utilization  data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}

Functions

func GetAllocatableCPUData added in v1.1.5

func GetAllocatableCPUData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetAllocatableCPUMetricData added in v1.1.5

func GetAllocatableCPUMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetAllocatableMemData added in v1.5.0

func GetAllocatableMemData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetAllocatableMemMetricData added in v1.5.0

func GetAllocatableMemMetricData(clientAuth *model.Auth, instanceId string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetCPULimitsData added in v1.1.5

func GetCPULimitsData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetCPULimitsMetricData added in v1.1.5

func GetCPULimitsMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetCPURequestData

func GetCPURequestData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetCPURequestMetricData

func GetCPURequestMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetCPUUtilizationData added in v1.1.5

func GetCPUUtilizationData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetCPUUtilizationMetricData added in v1.1.5

func GetCPUUtilizationMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetCPUUtilizationNodeData added in v1.2.1

func GetCPUUtilizationNodeData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetCPU_UtilizationMetricData added in v1.1.6

func GetCPU_UtilizationMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetCpuUtilizationMetricData

func GetCpuUtilizationMetricData(clientAuth *model.Auth, instanceID, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetDiskIOPerformanceMetricData added in v1.4.7

func GetDiskIOPerformanceMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetDiskSizeMetricData added in v1.2.1

func GetDiskSizeMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetDiskUtilizationData added in v1.2.1

func GetDiskUtilizationData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetDiskUtilizationMetricData added in v1.2.1

func GetDiskUtilizationMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetEKSDiskIOPerformancePanel added in v1.4.7

func GetEKSDiskIOPerformancePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetEKScpuUtilizationPanel

func GetEKScpuUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetEksMetrics added in v1.5.0

func GetEksMetrics(clientAuth *model.Auth, clusterName string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetIncidentResponseTimeData added in v1.4.8

func GetIncidentResponseTimeData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetIncidentResponseTimeMetricData added in v1.4.8

func GetIncidentResponseTimeMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (map[string]*cloudwatch.GetMetricDataOutput, error)

func GetMemoryLimitsData added in v1.1.6

func GetMemoryLimitsData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetMemoryLimitsMetricData added in v1.1.6

func GetMemoryLimitsMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetMemoryRequestData added in v1.1.6

func GetMemoryRequestData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetMemoryRequestMetricData added in v1.1.6

func GetMemoryRequestMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetMemoryUsageData added in v1.1.6

func GetMemoryUsageData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetMemoryUsageMetricData added in v1.1.6

func GetMemoryUsageMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetMemoryUtilizationGraphData added in v1.1.6

func GetMemoryUtilizationGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetMemoryUtilizationGraphMetricData added in v1.1.6

func GetMemoryUtilizationGraphMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetMetricData added in v1.1.6

func GetMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNetworkAvailabilityMetricData added in v1.1.7

func GetNetworkAvailabilityMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNetworkInOutData added in v1.1.6

func GetNetworkInOutData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetNetworkInOutMetricData added in v1.1.6

func GetNetworkInOutMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNetworkMetricData

func GetNetworkMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNetworkThroughputPanel added in v1.1.6

func GetNetworkThroughputPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetNetworkThroughputSinglePanel added in v1.1.7

func GetNetworkThroughputSinglePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, string, error)

func GetNetworkUtilizationPanel

func GetNetworkUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetNodeCapacityMetricData added in v1.1.6

func GetNodeCapacityMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNodeConditionData added in v1.4.7

func GetNodeConditionData(clientAuth *model.Auth, instanceId string, startTime, endTime *time.Time) ([]*cloudwatch.MetricDataResult, error)

func GetNodeDowntimeMetrics added in v1.1.7

func GetNodeDowntimeMetrics(clientAuth *model.Auth, instanceId string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNodeEventLogsSinglePanel added in v1.1.7

func GetNodeEventLogsSinglePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, string, error)

func GetNodeFailureData added in v1.7.3

func GetNodeFailureData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetNodeMetrics added in v1.1.7

func GetNodeMetrics(clientAuth *model.Auth, instanceId string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNodeReadyMetricData added in v1.7.3

func GetNodeReadyMetricData(clientAuth *model.Auth, instanceId string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetNodeStabilityData added in v1.6.3

func GetNodeStabilityData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetNodeStabilityMetricData added in v1.6.3

func GetNodeStabilityMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetResourceUtilizationData added in v1.5.0

func GetResourceUtilizationData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetResourceUtilizationMetricData added in v1.5.0

func GetResourceUtilizationMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetServiceAvailabilityMetricData added in v1.1.7

func GetServiceAvailabilityMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetStorageMetricData

func GetStorageMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetStorageUtilizationPanel

func GetStorageUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GeteksContainerMetricData

func GeteksContainerMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GeteksMemoryUtilizationPanel

func GeteksMemoryUtilizationPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetmetricData added in v1.1.7

func GetmetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, metricName string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

Function to fetch CloudWatch metric data

func GetnodefailureMetricData added in v1.7.3

func GetnodefailureMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func NodeCapacityparseTime added in v1.1.6

func NodeCapacityparseTime(startTimeStr, endTimeStr string) (*time.Time, *time.Time)

func ParseTime added in v1.1.7

func ParseTime(startTimeStr, endTimeStr string) (*time.Time, *time.Time)

Function to parse time strings and return time pointers

func Parsetime added in v1.1.7

func Parsetime(startTimeStr, endTimeStr string) (*time.Time, *time.Time)

Function to parse time strings and return time pointers

func ProcessMemoryLimitsRawData added in v1.1.6

func ProcessMemoryLimitsRawData(result *cloudwatch.GetMetricDataOutput) memoryLimitResult

func ProcessMemoryRequestRawData added in v1.1.6

func ProcessMemoryRequestRawData(result *cloudwatch.GetMetricDataOutput) memoryResult

func ProcessNetworkAvailabilityRawData added in v1.1.7

func ProcessNetworkAvailabilityRawData(result *cloudwatch.GetMetricDataOutput, index int) float64

func ProcessServiceAvailabilityRawData added in v1.1.7

func ProcessServiceAvailabilityRawData(result *cloudwatch.GetMetricDataOutput, index int) float64

Types

type AllocateMemResult added in v1.5.0

type AllocateMemResult struct {
	AllocatableMemory []TimeSeriesMemData `json:"AllocatableMemory"`
}

type AllocateResult added in v1.1.5

type AllocateResult struct {
	AllocatableCPU []TimeSeriesData `json:"AllocatableCPU"`
}

type CPULimitsResult added in v1.1.5

type CPULimitsResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"CPU limits"`
}

type CPUUtilizationResult added in v1.1.5

type CPUUtilizationResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"CPU Utilization"`
}

type CPU_UtilizationResult added in v1.1.6

type CPU_UtilizationResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"CPU Utilization"`
}

type DataTransferRateDataPoint added in v1.5.0

type DataTransferRateDataPoint struct {
	Timestamp   time.Time `json:"Timestamp"`
	TransferIn  float64   `json:"TransferIn"`
	TransferOut float64   `json:"TransferOut"`
}

func GetEksDataTransferRatePanel added in v1.5.0

func GetEksDataTransferRatePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, []DataTransferRateDataPoint, error)

type DiskIOPerformanceResult added in v1.4.7

type DiskIOPerformanceResult struct {
	TotalOps []struct {
		Timestamp time.Time
		Value     float64
	} `json:"total_ops"`
}

type DiskUtilizationResult added in v1.2.1

type DiskUtilizationResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"DiskUtilization"`
}

type IncidentResponseResult added in v1.4.8

type IncidentResponseResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"incident response time"`
}

type MemoryResult

type MemoryResult struct {
	CurrentUsage float64 `json:"CurrentUsage"`
	AverageUsage float64 `json:"AverageUsage"`
	MaxUsage     float64 `json:"MaxUsage"`
}

type MemoryUsageResult added in v1.1.6

type MemoryUsageResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"Memory Usage"`
}

func ProcessMemoryUsageRawData added in v1.1.6

func ProcessMemoryUsageRawData(result *cloudwatch.GetMetricDataOutput) MemoryUsageResult

type MemoryUtilizationResult added in v1.1.6

type MemoryUtilizationResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"Memory utilization"`
}

type NetworKThroughputResult added in v1.1.7

type NetworKThroughputResult struct {
	Throughput []struct {
		Timestamp time.Time
		Value     float64
	} `json:"Throughput"`
}

type NetworkAvailabilityResult added in v1.1.7

type NetworkAvailabilityResult struct {
	Availability float64 `json:"Availability"`
}

type NetworkInOutResult added in v1.1.6

type NetworkInOutResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"Network in and Network out"`
}

type NetworkResultMB added in v1.6.9

type NetworkResultMB struct {
	InboundTraffic  float64 `json:"InboundTraffic"`
	OutboundTraffic float64 `json:"OutboundTraffic"`
	DataTransferred float64 `json:"DataTransferred"`
}

type NetworkThroughputResult added in v1.1.6

type NetworkThroughputResult struct {
	NetworkIn []struct {
		Timestamp time.Time
		Value     float64
	} `json:"NetworkIn"`
	NetworkOut []struct {
		Timestamp time.Time
		Value     float64
	} `json:"NetworkOut"`
}

type NodeCapacityMetrics added in v1.1.6

type NodeCapacityMetrics struct {
	CPUUsage     float64 `json:"Cpu_Usage"`
	MemoryUsage  float64 `json:"Memory_Usage"`
	StorageAvail float64 `json:"Storage_Avail"`
}

type NodeCapacityPanel added in v1.1.6

type NodeCapacityPanel struct {
	RawData  map[string]*cloudwatch.GetMetricDataOutput `json:"raw_data"`
	JsonData string                                     `json:"json_data"`
}

func GetNodeCapacityPanel added in v1.1.6

func GetNodeCapacityPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (*NodeCapacityPanel, error)

type NodeConditionPanel added in v1.4.7

type NodeConditionPanel struct {
	DiskPressureAvg   float64 `json:"disk_pressure_avg"`
	MemoryPressureAvg float64 `json:"memory_pressure_avg"`
	PIDPressureAvg    float64 `json:"pid_pressure_avg"`
}

func GetNodeConditionPanel added in v1.4.7

func GetNodeConditionPanel(cmd *cobra.Command, clientAuth *model.Auth) (map[string]float64, *NodeConditionPanel, error)

type NodeDowntimeDataPoint added in v1.1.7

type NodeDowntimeDataPoint struct {
	Timestamp    time.Time `json:"Timestamp"`
	NodeDowntime float64   `json:"NodeDowntime"`
}

func GetNodeDowntimePanel added in v1.1.7

func GetNodeDowntimePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, []NodeDowntimeDataPoint, error)

type NodeEventLog added in v1.1.7

type NodeEventLog struct {
	Timestamp       int64  `json:"Timestamp"`
	EventType       string `json:"EventType"`
	SourceComponent string `json:"SourceComponent"`
	EventMessage    string `json:"EventMessage"`
}

NodeEventLog represents a node event log entry.

func GetNodeEventLogs added in v1.1.7

func GetNodeEventLogs(clientAuth *model.Auth, instanceId string, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) ([]NodeEventLog, error)

Function to fetch node event logs

type NodeRecoveryData added in v1.7.3

type NodeRecoveryData struct {
	Timestamp    time.Time     `json:"timestamp"`
	RecoveryTime time.Duration `json:"recovery_time"`
}

func GetNodeRecoveryTime added in v1.7.3

func GetNodeRecoveryTime(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, []NodeRecoveryData, error)

func ProcessNodeReadyData added in v1.7.3

func ProcessNodeReadyData(result *cloudwatch.GetMetricDataOutput) []NodeRecoveryData

type NodeStabilityResult added in v1.6.3

type NodeStabilityResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"NodeStabilityindex"`
}

type NodeUptimeDataPoint added in v1.1.7

type NodeUptimeDataPoint struct {
	Timestamp  time.Time `json:"Timestamp"`
	NodeUptime float64   `json:"NodeUptime"`
}

func GetNodeUptimePanel added in v1.1.7

func GetNodeUptimePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, []NodeUptimeDataPoint, error)

type ResourceUtilizationResult added in v1.5.0

type ResourceUtilizationResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"CPU Utilization"`
}

type Result

type Result struct {
	CurrentUsage float64 `json:"CurrentUsage"`
	AverageUsage float64 `json:"AverageUsage"`
	MaxUsage     float64 `json:"MaxUsage"`
}

type StorageUtilizationResult

type StorageUtilizationResult struct {
	RootVolumeUsage float64 `json:"rootVolumeUsage"`
	EBSVolume1Usage float64 `json:"ebsVolume1Usage"`
	EBSVolume2Usage float64 `json:"ebsVolume2Usage"`
}

type TimeSeriesData added in v1.1.5

type TimeSeriesData struct {
	Timestamp      time.Time
	AllocatableCPU float64
}

type TimeSeriesDataPoint added in v1.1.7

type TimeSeriesDataPoint struct {
	Timestamp    time.Time `json:"Timestamp"`
	Availability float64   `json:"Availability"`
}

func GetNetworkAvailabilityData added in v1.1.7

func GetNetworkAvailabilityData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, []TimeSeriesDataPoint, error)

type TimeSeriesMemData added in v1.5.0

type TimeSeriesMemData struct {
	Timestamp      time.Time
	AllocatableMem float64
}

type TimeseriesDataPoint added in v1.1.7

type TimeseriesDataPoint struct {
	Timestamp    time.Time `json:"Timestamp"`
	Availability float64   `json:"Availability"`
}

func GetServiceAvailabilityData added in v1.1.7

func GetServiceAvailabilityData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, []TimeseriesDataPoint, error)

Jump to

Keyboard shortcuts

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