diff --git a/terraform/eks/daemon/default_resources/default_amazon_cloudwatch_agent.json b/terraform/eks/daemon/default_resources/default_amazon_cloudwatch_agent.json index 01d141110..2c6ee84b2 100644 --- a/terraform/eks/daemon/default_resources/default_amazon_cloudwatch_agent.json +++ b/terraform/eks/daemon/default_resources/default_amazon_cloudwatch_agent.json @@ -2,7 +2,8 @@ "logs": { "metrics_collected": { "kubernetes": { - "metrics_collection_interval": 30 + "metrics_collection_interval": 30, + "enhanced_container_insights": true } }, "force_flush_interval": 5 diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/cluster.json b/test/metric_value_benchmark/eks_resources/test_schemas/cluster.json index 6041a219f..514e9edb1 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/cluster.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/cluster.json @@ -22,6 +22,5 @@ "Timestamp", "Version", "CloudWatchMetrics" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/cluster_daemonset.json b/test/metric_value_benchmark/eks_resources/test_schemas/cluster_daemonset.json new file mode 100644 index 000000000..e8aa9420c --- /dev/null +++ b/test/metric_value_benchmark/eks_resources/test_schemas/cluster_daemonset.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "structured log schema", + "description": "json schema for the cloudwatch agent k8s structured log", + "type": "object", + "properties": { + "ClusterName":{}, + "Type":{}, + "Sources":{}, + "Timestamp":{}, + "Version":{}, + "AutoScalingGroupName":{}, + "Namespace": {}, + "NodeName": {}, + "PodName": {}, + "replicas_desired": {}, + "replicas_ready": {}, + "status_replicas_available": {}, + "status_replicas_unavailable": {} + }, + "required": [ + "ClusterName", + "Type", + "Sources", + "Timestamp", + "Version", + "AutoScalingGroupName", + "NodeName", + "PodName", + "Namespace" + ] +} \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/cluster_deployment.json b/test/metric_value_benchmark/eks_resources/test_schemas/cluster_deployment.json new file mode 100644 index 000000000..e8aa9420c --- /dev/null +++ b/test/metric_value_benchmark/eks_resources/test_schemas/cluster_deployment.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "structured log schema", + "description": "json schema for the cloudwatch agent k8s structured log", + "type": "object", + "properties": { + "ClusterName":{}, + "Type":{}, + "Sources":{}, + "Timestamp":{}, + "Version":{}, + "AutoScalingGroupName":{}, + "Namespace": {}, + "NodeName": {}, + "PodName": {}, + "replicas_desired": {}, + "replicas_ready": {}, + "status_replicas_available": {}, + "status_replicas_unavailable": {} + }, + "required": [ + "ClusterName", + "Type", + "Sources", + "Timestamp", + "Version", + "AutoScalingGroupName", + "NodeName", + "PodName", + "Namespace" + ] +} \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/cluster_service.json b/test/metric_value_benchmark/eks_resources/test_schemas/cluster_service.json index 5c8294023..2bc4ecfb4 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/cluster_service.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/cluster_service.json @@ -34,6 +34,5 @@ "Service", "kubernetes", "CloudWatchMetrics" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/container.json b/test/metric_value_benchmark/eks_resources/test_schemas/container.json index f12b4e22e..980c23526 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/container.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/container.json @@ -46,6 +46,9 @@ "container_last_termination_reason":{}, "number_of_container_restarts":{}, "container_status":{}, + "container_filesystem_usage":{}, + "container_filesystem_available":{}, + "container_filesystem_utilization":{}, "kubernetes":{ "type": "object", "properties": { @@ -103,6 +106,5 @@ "PodName", "Namespace", "kubernetes" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/container_fs.json b/test/metric_value_benchmark/eks_resources/test_schemas/container_fs.json index 50625cadc..c13fb7ff7 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/container_fs.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/container_fs.json @@ -84,6 +84,5 @@ "device", "fstype", "kubernetes" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/control_plane.json b/test/metric_value_benchmark/eks_resources/test_schemas/control_plane.json new file mode 100644 index 000000000..fe3531447 --- /dev/null +++ b/test/metric_value_benchmark/eks_resources/test_schemas/control_plane.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "structured log schema", + "description": "json schema for the cloudwatch agent k8s structured log", + "type": "object", + "properties": { + "ClusterName": {}, + "Type": {}, + "Sources": {}, + "Timestamp": {}, + "Version": {}, + "apiserver_storage_size_bytes": {}, + "apiserver_storage_db_total_size_in_bytes": {}, + "etcd_db_total_size_in_bytes": {}, + "apiserver_storage_list_duration_seconds": {}, + "apiserver_longrunning_requests": {}, + "apiserver_request_duration_seconds": {}, + "rest_client_request_duration_seconds": {}, + "apiserver_request_total": {}, + "apiserver_request_total_5xx": {}, + "apiserver_admission_controller_admission_duration_seconds": {}, + "apiserver_admission_step_admission_duration_seconds": {}, + "etcd_request_duration_seconds": {}, + "rest_client_requests_total": {}, + "apiserver_current_inflight_requests": {}, + "apiserver_current_inqueue_requests": {}, + "apiserver_admission_webhook_admission_duration_seconds": {}, + "apiserver_requested_deprecated_apis": {}, + "apiserver_flowcontrol_rejected_requests_total": {}, + "apiserver_flowcontrol_request_concurrency_limit": {}, + "CloudWatchMetrics": {} + }, + "required": [ + "ClusterName", + "Type", + "Sources", + "Timestamp", + "Version", + "CloudWatchMetrics" + ] +} \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/node.json b/test/metric_value_benchmark/eks_resources/test_schemas/node.json index 3215d0b37..e112b5f12 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/node.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/node.json @@ -78,6 +78,5 @@ "NodeName", "kubernetes", "CloudWatchMetrics" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/node_disk_io.json b/test/metric_value_benchmark/eks_resources/test_schemas/node_disk_io.json index effa56226..5f190b686 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/node_disk_io.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/node_disk_io.json @@ -47,6 +47,5 @@ "NodeName", "kubernetes", "device" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/node_fs.json b/test/metric_value_benchmark/eks_resources/test_schemas/node_fs.json index e514c13da..5417c80f5 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/node_fs.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/node_fs.json @@ -47,6 +47,5 @@ "kubernetes", "device", "fstype" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/node_net.json b/test/metric_value_benchmark/eks_resources/test_schemas/node_net.json index 4ce5aa371..8072909ef 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/node_net.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/node_net.json @@ -45,6 +45,5 @@ "NodeName", "kubernetes", "interface" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/pod.json b/test/metric_value_benchmark/eks_resources/test_schemas/pod.json index 6e78e6b1a..c202160fc 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/pod.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/pod.json @@ -45,6 +45,17 @@ "pod_number_of_running_containers":{}, "pod_number_of_containers":{}, "pod_number_of_container_restarts":{}, + "pod_container_status_running":{}, + "pod_container_status_terminated":{}, + "pod_container_status_waiting":{}, + "pod_container_status_waiting_reason_crash_loop_back_off":{}, + "pod_container_status_waiting_reason_image_pull_error":{}, + "pod_container_status_waiting_reason_start_error":{}, + "pod_container_status_waiting_reason_create_container_error":{}, + "pod_container_status_waiting_reason_create_container_config_error":{}, + "pod_container_status_terminated_reason_oom_killed":{}, + "pod_interface_network_rx_dropped":{}, + "pod_interface_network_tx_dropped":{}, "pod_status":{}, "kubernetes":{ "type": "object", @@ -94,6 +105,5 @@ "Namespace", "kubernetes", "CloudWatchMetrics" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/test_schemas/pod_net.json b/test/metric_value_benchmark/eks_resources/test_schemas/pod_net.json index f47a6091a..b4e79f6d3 100644 --- a/test/metric_value_benchmark/eks_resources/test_schemas/pod_net.json +++ b/test/metric_value_benchmark/eks_resources/test_schemas/pod_net.json @@ -55,6 +55,5 @@ "Namespace", "interface", "kubernetes" - ], - "additionalProperties": false + ] } \ No newline at end of file diff --git a/test/metric_value_benchmark/eks_resources/util.go b/test/metric_value_benchmark/eks_resources/util.go index 537183575..d4e73912a 100644 --- a/test/metric_value_benchmark/eks_resources/util.go +++ b/test/metric_value_benchmark/eks_resources/util.go @@ -8,6 +8,10 @@ import _ "embed" var ( //go:embed test_schemas/cluster.json eksClusterSchema string + //go:embed test_schemas/cluster_daemonset.json + eksClusterDaemonsetSchema string + //go:embed test_schemas/cluster_deployment.json + eksClusterDeploymentSchema string //go:embed test_schemas/cluster_namespace.json eksClusterNamespaceSchema string //go:embed test_schemas/cluster_service.json @@ -16,6 +20,8 @@ var ( eksContainerSchema string //go:embed test_schemas/container_fs.json eksContainerFSSchema string + //go:embed test_schemas/control_plane.json + eksControlPlaneSchema string //go:embed test_schemas/node.json eksNodeSchema string //go:embed test_schemas/node_disk_io.json @@ -30,16 +36,19 @@ var ( eksPodNetSchema string EksClusterValidationMap = map[string]string{ - "Cluster": eksClusterSchema, - "ClusterNamespace": eksClusterNamespaceSchema, - "ClusterService": eksClusterServiceSchema, - "Container": eksContainerSchema, - "ContainerFS": eksContainerFSSchema, - "Node": eksNodeSchema, - "NodeDiskIO": eksNodeDiskIOSchema, - "NodeFS": eksNodeFSSchema, - "NodeNet": eksNodeNetSchema, - "Pod": eksPodSchema, - "PodNet": eksPodNetSchema, + "Cluster": eksClusterSchema, + "ClusterDaemonset": eksClusterDaemonsetSchema, + "ClusterDeployment": eksClusterDeploymentSchema, + "ClusterNamespace": eksClusterNamespaceSchema, + "ClusterService": eksClusterServiceSchema, + "Container": eksContainerSchema, + "ContainerFS": eksContainerFSSchema, + "ControlPlane": eksControlPlaneSchema, + "Node": eksNodeSchema, + "NodeDiskIO": eksNodeDiskIOSchema, + "NodeFS": eksNodeFSSchema, + "NodeNet": eksNodeNetSchema, + "Pod": eksPodSchema, + "PodNet": eksPodNetSchema, } )