Skip to content

Commit

Permalink
Merge branch 'main' into integration--failure-test
Browse files Browse the repository at this point in the history
  • Loading branch information
bhanuba authored Oct 30, 2023
2 parents 9b640cf + b048a62 commit 9b6ea4b
Show file tree
Hide file tree
Showing 15 changed files with 151 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"logs": {
"metrics_collected": {
"kubernetes": {
"metrics_collection_interval": 30
"metrics_collection_interval": 30,
"enhanced_container_insights": true
}
},
"force_flush_interval": 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@
"Timestamp",
"Version",
"CloudWatchMetrics"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
@@ -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"
]
}
Original file line number Diff line number Diff line change
@@ -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"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@
"Service",
"kubernetes",
"CloudWatchMetrics"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -103,6 +106,5 @@
"PodName",
"Namespace",
"kubernetes"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,5 @@
"device",
"fstype",
"kubernetes"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
@@ -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"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,5 @@
"NodeName",
"kubernetes",
"CloudWatchMetrics"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@
"NodeName",
"kubernetes",
"device"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@
"kubernetes",
"device",
"fstype"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@
"NodeName",
"kubernetes",
"interface"
],
"additionalProperties": false
]
}
14 changes: 12 additions & 2 deletions test/metric_value_benchmark/eks_resources/test_schemas/pod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -94,6 +105,5 @@
"Namespace",
"kubernetes",
"CloudWatchMetrics"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,5 @@
"Namespace",
"interface",
"kubernetes"
],
"additionalProperties": false
]
}
31 changes: 20 additions & 11 deletions test/metric_value_benchmark/eks_resources/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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,
}
)

0 comments on commit 9b6ea4b

Please sign in to comment.