Skip to content

Instantly share code, notes, and snippets.

@akhilerm
Created August 24, 2025 17:37
Show Gist options
  • Select an option

  • Save akhilerm/625d12b805d482cd577311be3a4f7551 to your computer and use it in GitHub Desktop.

Select an option

Save akhilerm/625d12b805d482cd577311be3a4f7551 to your computer and use it in GitHub Desktop.
Sample crictl metricsp output
{
"podMetrics": [
{
"podSandboxId": "0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"metrics": [
{
"name": "container_network_receive_bytes_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "142887"
}
},
{
"name": "container_network_receive_packets_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "811"
}
},
{
"name": "container_network_receive_packets_dropped_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "0"
}
},
{
"name": "container_network_receive_errors_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "0"
}
},
{
"name": "container_network_transmit_bytes_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "1462"
}
},
{
"name": "container_network_transmit_packets_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "19"
}
},
{
"name": "container_network_transmit_packets_dropped_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "0"
}
},
{
"name": "container_network_transmit_errors_total",
"timestamp": "1756056774580590522",
"metricType": "COUNTER",
"labelValues": [
"nginx-sandbox-15",
"default",
"0c7b70cf580b2baccbfffd1fb5957ead926c631a04eba44ed62345d140aea379",
"eth0"
],
"value": {
"value": "0"
}
}
],
"containerMetrics": [
{
"containerId": "7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f",
"metrics": [
{
"name": "container_cpu_usage_seconds_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_cpu_user_seconds_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_cpu_system_seconds_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_cpu_cfs_periods_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_cpu_cfs_throttled_periods_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_cpu_cfs_throttled_seconds_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_memory_usage_bytes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "421888"
}
},
{
"name": "container_memory_max_usage_bytes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "18446744073709551615"
}
},
{
"name": "container_memory_working_set_bytes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "409600"
}
},
{
"name": "container_memory_rss",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "204800"
}
},
{
"name": "container_memory_cache",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "12288"
}
},
{
"name": "container_memory_kernel_usage",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "16384"
}
},
{
"name": "container_memory_mapped_file",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_memory_swap",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_memory_failcnt",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_memory_total_active_file_bytes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_memory_total_inactive_file_bytes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "12288"
}
},
{
"name": "container_memory_failures_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f",
"pjfault",
"container"
],
"value": {
"value": "930"
}
},
{
"name": "container_memory_failures_total",
"timestamp": "1756056774584195787",
"metricType": "COUNTER",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f",
"pjmajfault",
"container"
],
"value": {
"value": "0"
}
},
{
"name": "container_fs_usage_bytes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "16384"
}
},
{
"name": "container_fs_limit_bytes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_fs_inodes_total",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_fs_inodes_free",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "0"
}
},
{
"name": "container_processes",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "1"
}
},
{
"name": "container_threads_max",
"timestamp": "1756056774584195787",
"metricType": "GAUGE",
"labelValues": [
"busybox-1",
"nginx-sandbox-15",
"default",
"7613723e64a368cf734bec462e97b776460312244d7081aa434da40f68d4b28f"
],
"value": {
"value": "36952"
}
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment