This page looks best with JavaScript enabled

AI-Related Exporters in a Kubernetes Cluster

 ·  ☕ 17 min read

1. dcgm-exporter

dcgm-exporter is the GPU monitoring tool provided by the official NVIDIA community.

Project address https://github.com/NVIDIA/dcgm-exporter

1.1 Installation

  • Add the Helm chart repository
1
helm repo add gpu-helm-charts https://nvidia.github.io/dcgm-exporter/helm-charts
1
helm repo update
  • Install
1
2
3
4
5
helm install dcgm-exporter gpu-helm-charts/dcgm-exporter --namespace monitor --create-namespace \
      --set serviceMonitor.enabled=false \
      --set image.tag=3.3.3-3.3.0-ubuntu22.04 \
      --set nodeSelector."accelerator\/provider"=nvidia-gpu \
      --version 3.3.1

You need to label the NVIDIA GPU nodes

1
kubectl label node <node-name> accelerator/provider=nvidia-gpu

1.2 Metrics

  • GPU utilization
Metric nameMetric typeUnitDescription
DCGM_FI_DEV_GPU_UTILGauge%GPU utilization
DCGM_FI_DEV_MEM_COPY_UTILGauge%GPU memory copy utilization
DCGM_FI_DEV_ENC_UTILGauge%GPU encoder utilization
DCGM_FI_DEV_DEC_UTILGauge%GPU decoder utilization
  • Memory
Metric nameMetric typeUnitDescription
DCGM_FI_DEV_FB_FREEGaugeMiBRemaining GPU frame buffer
DCGM_FI_DEV_FB_USEDGaugeMiBGPU frame buffer usage

Below is the Markdown table of the metric information you provided:

  • Frequency
Metric nameMetric typeUnitDescription
DCGM_FI_DEV_SM_CLOCKGaugeMHzGPU SM clock frequency
DCGM_FI_DEV_MEM_CLOCKGaugeMHzGPU memory clock frequency
  • Profiling
Metric nameMetric typeUnitDescription
DCGM_FI_PROF_GR_ENGINE_ACTIVEGauge%Fraction of time within an interval that the Graphics or Compute engine is Active
DCGM_FI_PROF_SM_ACTIVEGauge%Fraction of time within an interval that at least one warp is Active on an SM (average)
DCGM_FI_PROF_SM_OCCUPANCYGauge%Ratio of warps resident on an SM to the maximum warps that SM can hold (average)
DCGM_FI_PROF_PIPE_TENSOR_ACTIVEGauge%Fraction of cycles in unit time that Tensor Pipes are Active on average
DCGM_FI_PROF_DRAM_ACTIVEGauge%Fraction of cycles that memory copies are active (a cycle is 100% if it has one DRAM instruction)
DCGM_FI_PROF_PIPE_FP64_ACTIVEGauge%Fraction of cycles in unit time that F64 Pipes are Active on average
DCGM_FI_PROF_PIPE_FP32_ACTIVEGauge%Fraction of cycles in unit time that F32 Pipes are Active on average
DCGM_FI_PROF_PIPE_FP16_ACTIVEGauge%Fraction of cycles in unit time that F16 Pipes are Active on average
DCGM_FI_PROF_NVLINK_RX_BYTESCounterB/sData traffic received over NVLink
DCGM_FI_PROF_NVLINK_TX_BYTESCounterB/sData traffic transmitted over NVLink
DCGM_FI_PROF_PCIE_RX_BYTESCounterB/sBytes received over the PCIe bus
DCGM_FI_PROF_PCIE_TX_BYTESCounterB/sBytes transmitted over the PCIe bus
DCGM_FI_DEV_PCIE_REPLAY_COUNTERCountertimesRetry count on the GPU PCIe bus
DCGM_FI_DEV_NVLINK_BANDWIDTH_TOTALCounter-Total NVLink bandwidth counter for all GPU lanes
  • Temperature and power
Metric nameMetric typeUnitDescription
DCGM_FI_DEV_GPU_TEMPGaugeCurrent GPU temperature
DCGM_FI_DEV_MEMORY_TEMPGaugeCurrent GPU memory temperature
DCGM_FI_DEV_POWER_USAGEGaugeWCurrent GPU power usage
DCGM_FI_DEV_TOTAL_ENERGY_CONSUMPTIONCountermJTotal energy since GPU boot
  • XID errors and violations
Metric nameMetric typeUnitDescription
DCGM_FI_DEV_XID_ERRORSGauge-Most recent error code
DCGM_CUSTOM_XID_ERRORS_TOTAL_COUNTERCounter-Total number of error codes
DCGM_FI_DEV_POWER_VIOLATIONCounterμsCumulative duration of violations caused by the power limit
DCGM_FI_DEV_THERMAL_VIOLATIONCounterμsCumulative duration of violations caused by thermal limits
DCGM_FI_DEV_SYNC_BOOST_VIOLATIONCounterμsCumulative duration of violations caused by the sync boost limit
DCGM_FI_DEV_BOARD_LIMIT_VIOLATIONCounterμsCumulative duration of violations caused by the board limit
DCGM_FI_DEV_LOW_UTIL_VIOLATIONCounterμsCumulative duration of violations caused by the low utilization limit
DCGM_FI_DEV_RELIABILITY_VIOLATIONCounterμsCumulative duration of violations caused by the board reliability limit
  • Retired memory pages
Metric nameMetric typeUnitDescription
DCGM_FI_DEV_RETIRED_SBECountercountMemory pages retired due to single-bit errors
DCGM_FI_DEV_RETIRED_DBECountercountMemory pages retired due to double-bit errors
  • Other
Metric nameMetric typeUnitDescription
DCGM_FI_DEV_VGPU_LICENSE_STATUSGauge-vGPU license status
DCGM_FI_DEV_UNCORRECTABLE_REMAPPED_ROWSCounter-Rows remapped due to uncorrectable errors
DCGM_FI_DEV_CORRECTABLE_REMAPPED_ROWSCounter-Rows remapped due to correctable errors
DCGM_FI_DEV_ROW_REMAP_FAILUREGauge

2. npu-exporter

NPU-Exporter is a service component developed by Huawei specifically to collect the various monitoring information and metrics of Huawei NPUs and package them into a Prometheus-specific data format. Project address https://github.com/Ascend/ascend-npu-exporter

2.1 Installation

1
kubectl apply -f https://raw.githubusercontent.com/shaowenchen/ops-hub/master/observation/v5.0.RC3-npu-exporter.yaml

You need to label the Huawei NPU nodes

1
kubectl label node <node-name> accelerator/provider=huawei-npu

The Container Runtime here is Docker; if it is Containerd you need to change it in the startup parameters.

2.2 Metrics

  • Processor information
Metric nameUnitDescription
machine_npu_numscountNumber of Ascend AI processors.
  • Network information
Metric nameValueDescription
npu_chip_info_bandwidth_rxMB/sReal-time receive rate of the Ascend AI processor network port (only supported on Atlas training series products). The labels contain the following fields:
npu_chip_info_bandwidth_txMB/sReal-time send rate of the Ascend AI processor network port (only supported on Atlas training series products). The labels contain the following fields:
npu_chip_info_link_status1: UP, 0: DOWNLink status of the Ascend AI processor network port (only supported on Atlas training series products). The labels contain the following fields:
npu_chip_info_network_status1: healthy, 0: unhealthyNetwork health status of the Ascend AI processor (only supported on Atlas training series products). The labels contain the following fields:
  • Error and health information
Metric nameValueDescription
npu_chip_info_error_codeSee the notesAscend AI processor error code. The labels contain the following fields: A -1 shown in the last column indicates a DCMI interface call error, possibly caused by a driver fault; 0 means no error code. For details of the error codes, see the “Atlas A2 Center Inference and Training Hardware Black Box Error Code Information List”
npu_chip_info_name-Ascend AI processor name and ID. The labels contain the following fields:
npu_chip_info_health_status1: healthy, 0: unhealthyAscend AI processor health status. The labels contain the following fields:
  • Performance information
Metric nameUnitDescription
npu_chip_info_powerWatts (W)Ascend AI processor power consumption (for 910 and 310 it is processor power; for 310P it is board power). The labels contain the following fields:
npu_chip_info_temperatureCelsius (℃)Ascend AI processor temperature. The labels contain the following fields:
npu_chip_info_utilization%Ascend AI processor AI Core utilization. The labels contain the following fields:
npu_chip_info_aicore_current_freqMHzCurrent AI Core frequency of the Ascend AI processor. The labels contain the following fields:
  • Memory information
Metric nameUnitDescription
npu_chip_info_used_memoryMBUsed DDR memory of the Ascend AI processor. The labels contain the following fields:
npu_chip_info_total_memoryMBTotal DDR memory of the Ascend AI processor. The labels contain the following fields:
npu_chip_info_hbm_used_memoryMBUsed HBM memory of the Ascend AI processor (exclusive to Atlas training series products). The labels contain the following fields:
npu_chip_info_hbm_total_memoryMBTotal HBM memory of the Ascend AI processor (exclusive to Atlas training series products). The labels contain the following fields:
container_npu_total_memoryMBTotal NPU memory with container information, whole cards only. The container information contains the following fields:
container_npu_used_memoryMBUsed NPU memory with container information, whole cards only. The container information contains the following fields:
vnpu_pod_total_memoryKBTotal memory owned by the vNPU: (supported only on Atlas inference series products)
vnpu_pod_used_memoryKBMemory in use by the vNPU: (supported only on Atlas inference series products)
  • Container and virtual NPU information
Metric nameUnitDescription
npu_exporter_version_info-NPU-Exporter version information.
npu_container_info-NPU container information; the output contains the following fields:
container_npu_total_memoryMBTotal NPU memory with container information, whole cards only. The container information contains the following fields:
container_npu_used_memoryMBUsed NPU memory with container information, whole cards only. The container information contains the following fields:
container_npu_utilization%NPU utilization with container information, whole cards only. The container information contains the following fields:
vnpu_pod_aicore_utilization%AI Core utilization of the vNPU: (supported only on Atlas inference series products)
vnpu_pod_total_memoryKBTotal memory owned by the vNPU: (supported only on Atlas inference series products)
vnpu_pod_used_memoryKBMemory in use by the vNPU: (supported only on Atlas inference series products)

3. node-exporter

node-exporter is a tool open-sourced by Prometheus for collecting various host metrics.

Project address https://github.com/prometheus/node_exporter

3.1 Installation

When Prometheus Server is installed, node-exporter is usually already installed by default, so there is no need to install it again.

  • Add the Helm chart repository
1
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
1
helm repo update
  • Install
1
helm install prometheus-node-exporter prometheus-community/prometheus-node-exporter --namespace monitor --create-namespace

3.2 Metrics

Below is the Markdown table after removing the category column:

  • CPU
Metric nameTypeDescription
node_cpu_seconds_totalCounterNode CPU usage time (unit: seconds)
  • Memory
Metric nameTypeDescription
node_memory_MemTotal_bytesGaugeTotal node memory size (unit: bytes)
node_memory_MemFree_bytesGaugeFree node memory size (unit: bytes)
node_memory_Buffers_bytesGaugeNode buffer size (unit: bytes)
node_memory_Cached_bytesGaugeNode page cache size (unit: bytes)
  • Disk
Metric nameTypeDescription
node_filesystem_avail_bytesGaugeFree space available to users on the partition (unit: bytes)
node_filesystem_size_bytesGaugeTotal capacity of the partition space (unit: bytes)
node_filesystem_free_bytesGaugeFree physical space on the partition (unit: bytes)
node_disk_read_bytes_totalCounterTotal bytes read from the partition (unit: bytes)
node_disk_written_bytes_totalCounterTotal bytes written to the partition (unit: bytes)
node_disk_reads_completed_totalCounterTotal number of reads on the partition
node_disk_writes_completed_totalCounterTotal number of writes on the partition
  • Network
Metric nameTypeDescription
node_network_receive_bytes_totalCounterTotal bytes of received traffic (unit: bytes)
node_network_transmit_bytes_totalCounterTotal bytes of transmitted traffic (unit: bytes)
node_network_receive_packets_totalCounterTotal packets of received traffic (unit: packets)
node_network_transmit_packets_totalCounterTotal packets of transmitted traffic (unit: packets)
node_network_receive_drop_totalCounterTotal dropped packets of received traffic (unit: packets)
node_network_transmit_drop_totalCounterTotal dropped packets of transmitted traffic (unit: packets)

4 node-problem-detector

Node Problem Detector, NPD for short, is a Kubernetes cluster node monitoring plugin used for node fault detection.

Project address https://github.com/kubernetes/node-problem-detector

4.1 Installation

  • Add the Helm chart repository
1
helm repo add deliveryhero https://charts.deliveryhero.io/
1
helm repo update
  • Install
1
helm install node-problem-detector deliveryhero/node-problem-detector --namespace monitor --create-namespace

4.2 Metrics

  • Disk
Metric nameTypeDescription
node_filesystem_avail_bytesGaugeFree space available to users on the partition (unit: bytes)
node_filesystem_size_bytesGaugeTotal capacity of the partition space (unit: bytes)
node_filesystem_free_bytesGaugeFree physical space on the partition (unit: bytes)
node_disk_read_bytes_totalCounterTotal bytes read from the partition (unit: bytes)
node_disk_written_bytes_totalCounterTotal bytes written to the partition (unit: bytes)
node_disk_reads_completed_totalCounterTotal number of reads on the partition
node_disk_writes_completed_totalCounterTotal number of writes on the partition
  • Network
Metric nameTypeDescription
node_network_receive_bytes_totalCounterTotal bytes of received traffic (unit: bytes)
node_network_transmit_bytes_totalCounterTotal bytes of transmitted traffic (unit: bytes)
node_network_receive_packets_totalCounterTotal packets of received traffic (unit: packets)
node_network_transmit_packets_totalCounterTotal packets of transmitted traffic (unit: packets)
node_network_receive_drop_totalCounterTotal dropped packets of received traffic (unit: packets)
node_network_transmit_drop_totalCounterTotal dropped packets of transmitted traffic (unit: packets)
  • CPU
Metric nameTypeDescription
cpu_load_1mGaugeCPU load average (1 minute)
cpu_load_5mGaugeCPU load average (5 minutes)
cpu_load_15mGaugeCPU load average (15 minutes)
cpu_runnable_task_countGaugeAverage number of runnable tasks (over the past minute)
cpu_usage_timeCounterCPU usage time (by state)
  • Memory
Metric nameTypeDescription
memory_bytes_usedGaugeMemory usage (by state)
memory_anonymous_usedGaugeAnonymous memory usage (by state)
memory_dirty_usedGaugeDirty page memory usage
memory_page_cache_usedGaugePage cache memory usage (by state)
memory_unevictable_usedGaugeUnevictable memory usage
  • System
Metric nameTypeDescription
host_uptimeGaugeOperating system uptime
system_cpu_statCounterCPU time in different states
system_interrupts_totalCounterTotal interrupt service count (cumulative)
system_os_featureGaugeOperating system feature enabled state
system_processes_totalCounterTotal number of processes since boot (cumulative)
system_procs_blockedGaugeNumber of currently blocked processes
system_procs_runningGaugeNumber of currently running processes
  • Problem count
Metric nameTypeDescription
problem_counterCounterNumber of occurrences of a specific problem type
  • Problem state
Metric nameTypeDescription
problem_gaugeGaugeState of a specific problem type

5. process-exporter

process-exporter is mainly used to monitor the state of processes on a host, but unfortunately it has not been updated for a long time.

Project address https://github.com/mumoshu/prometheus-process-exporter , dashboard https://grafana.com/grafana/dashboards/8378-system-processes-metrics/

5.1 Installation

  • Install
1
kubectl apply -f https://raw.githubusercontent.com/shaowenchen/ops-hub/master/observation/process-exporter.yaml
  • How the metrics are configured
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
apiVersion: v1
data:
  process-exporter.yaml: |-
    process_names:
    - name: "{{.Matches}}"
      cmdline:
      - 'python'
    - name: "{{.Matches}}"
      cmdline:
      - 'triton'    
kind: ConfigMap
metadata:
  name: process-exporter-config
  namespace: monitor
Match templateDescription
{{.Comm}}Contains the name of the original executable, i.e. /proc//stat
{{.ExeBase}}Contains the name of the executable (default)
{{.ExeFull}}Contains the path of the executable
{{.Username}}Contains the username
{{.Matches}}Contains all matches produced by the regular expressions (recommended)
{{.PID}}Contains the PID of the process; one PID contains only one process (not recommended)
{{.StartTime}}Contains the start time of the process (not recommended)

5.2 Metrics

Metric nameDescription
namedprocess_namegroup_num_procsNumber of running processes
namedprocess_namegroup_statesNumber of processes in Running/Sleeping/Other/Zombie state
namedprocess_namegroup_cpu_seconds_totalReads the CPU utime and stime state time of the process from /proc/[pid]/stat
namedprocess_namegroup_read_bytes_totalReads the bytes read by the process from /proc/[pid]/io
namedprocess_namegroup_write_bytes_totalReads the bytes written by the process from /proc/[pid]/io
namedprocess_namegroup_memory_bytesReads the memory bytes used by the process
namedprocess_namegroup_open_filedescReads the number of file descriptors used by the process
namedprocess_namegroup_thread_countNumber of running threads
namedprocess_namegroup_thread_cpu_seconds_totalReads the CPU state time of the thread
namedprocess_namegroup_thread_io_bytes_totalReads the IO bytes of the thread

6. nvidia gpu exporter

nvidia gpu exporter is a tool that obtains GPU metrics through nvidia-smi

Project address https://github.com/utkuozdemir/nvidia_gpu_exporter , dashboard address https://grafana.com/grafana/dashboards/14574-nvidia-gpu-metrics/

6.1 Installation

  • Add the Helm chart repository
1
helm repo add utkuozdemir https://utkuozdemir.org/helm-charts
1
helm repo update
  • Install
1
2
3
4
helm install nvidia-gpu-exporter utkuozdemir/nvidia-gpu-exporter \
      --namespace monitor --create-namespace \
      --set nodeSelector."accelerator\/provider"=nvidia-gpu \
      --set serviceMonitor.enabled=false

You need to label the NVIDIA GPU nodes

1
kubectl label node <node-name> accelerator/provider=nvidia-gpu

6.2 Metrics

Metric nameTypeUnitDescription
nvidia_smi_accounting_buffer_sizegaugeAccounting buffer size
nvidia_smi_accounting_modegaugeAccounting mode
nvidia_smi_clocks_applications_graphics_clock_hzgaugeMHzApplication graphics clock frequency
nvidia_smi_clocks_applications_memory_clock_hzgaugeMHzApplication memory clock frequency
nvidia_smi_clocks_current_graphics_clock_hzgaugeMHzCurrent graphics clock frequency
nvidia_smi_clocks_current_memory_clock_hzgaugeMHzCurrent memory clock frequency
nvidia_smi_clocks_current_sm_clock_hzgaugeMHzCurrent streaming multiprocessor clock frequency
nvidia_smi_clocks_current_video_clock_hzgaugeMHzCurrent video clock frequency
nvidia_smi_clocks_default_applications_graphics_clock_hzgaugeMHzDefault application graphics clock frequency
nvidia_smi_clocks_default_applications_memory_clock_hzgaugeMHzDefault application memory clock frequency
nvidia_smi_clocks_max_graphics_clock_hzgaugeMHzMaximum graphics clock frequency
nvidia_smi_clocks_max_memory_clock_hzgaugeMHzMaximum memory clock frequency
nvidia_smi_clocks_max_sm_clock_hzgaugeMHzMaximum streaming multiprocessor clock frequency
nvidia_smi_clocks_throttle_reasons_activegaugeActive throttle reason
nvidia_smi_clocks_throttle_reasons_applications_clocks_settinggaugeApplication clocks setting throttle reason
nvidia_smi_clocks_throttle_reasons_gpu_idlegaugeGPU idle throttle reason
nvidia_smi_clocks_throttle_reasons_hw_power_brake_slowdowngaugeHardware power brake slowdown throttle reason
nvidia_smi_clocks_throttle_reasons_hw_slowdowngaugeHardware slowdown throttle reason
nvidia_smi_clocks_throttle_reasons_hw_thermal_slowdowngaugeHardware thermal slowdown throttle reason
nvidia_smi_clocks_throttle_reasons_supportedgaugeSupported throttle reasons
nvidia_smi_clocks_throttle_reasons_sw_power_capgaugeSoftware power cap throttle reason
nvidia_smi_clocks_throttle_reasons_sw_thermal_slowdowngaugeSoftware thermal slowdown throttle reason
nvidia_smi_clocks_throttle_reasons_sync_boostgaugeSync boost throttle reason
nvidia_smi_command_exit_codegaugeExit code of the last scrape command
nvidia_smi_compute_capgaugeCompute capability
nvidia_smi_compute_modegaugeCompute mode
nvidia_smi_countgaugeCount
nvidia_smi_display_activegaugeDisplay active state
nvidia_smi_display_modegaugeDisplay mode
nvidia_smi_ecc_errors_corrected_aggregate_device_memorygaugeTotal corrected device memory ECC errors
nvidia_smi_ecc_errors_corrected_aggregate_dramgaugeTotal corrected DRAM ECC errors
nvidia_smi_ecc_errors_corrected_aggregate_totalgaugeTotal corrected ECC errors
nvidia_smi_ecc_errors_corrected_volatile_device_memorygaugeCorrected volatile device memory ECC errors
nvidia_smi_ecc_errors_corrected_volatile_dramgaugeCorrected volatile DRAM ECC errors
nvidia_smi_ecc_errors_corrected_volatile_totalgaugeTotal corrected volatile ECC errors
nvidia_smi_ecc_errors_uncorrected_aggregate_device_memorygaugeTotal uncorrected device memory ECC errors
nvidia_smi_ecc_errors_uncorrected_aggregate_dramgaugeTotal uncorrected DRAM ECC errors
nvidia_smi_ecc_errors_uncorrected_aggregate_totalgaugeTotal uncorrected ECC errors
nvidia_smi_ecc_errors_uncorrected_volatile_device_memorygaugeUncorrected volatile device memory ECC errors
nvidia_smi_ecc_errors_uncorrected_volatile_dramgaugeUncorrected volatile DRAM ECC errors
nvidia_smi_ecc_errors_uncorrected_volatile_totalgaugeTotal uncorrected volatile ECC errors
nvidia_smi_ecc_mode_currentgaugeCurrent ECC mode
nvidia_smi_ecc_mode_pendinggaugePending ECC mode
nvidia_smi_encoder_stats_average_fpsgaugeAverage encoder FPS
nvidia_smi_encoder_stats_average_latencygaugeAverage encoder latency
nvidia_smi_encoder_stats_session_countgaugeNumber of encoder sessions
nvidia_smi_enforced_power_limit_wattsgaugeWEnforced power limit
nvidia_smi_gpu_infogaugeGPU information
nvidia_smi_indexgaugeIndex
nvidia_smi_inforom_eccgaugeECC information ROM
nvidia_smi_inforom_oemgaugeOEM information ROM
nvidia_smi_memory_free_bytesgaugeMiBFree memory
nvidia_smi_memory_reserved_bytesgaugeMiBReserved memory
nvidia_smi_memory_total_bytesgaugeMiBTotal memory
nvidia_smi_memory_used_bytesgaugeMiBUsed memory
nvidia_smi_namegaugeName
nvidia_smi_pci_busgaugePCI bus number
nvidia_smi_pci_devicegaugePCI device number
nvidia_smi_pci_device_idgaugePCI device ID
nvidia_smi_pci_domaingaugePCI domain
nvidia_smi_pci_sub_device_idgaugePCI sub-device ID
nvidia_smi_pcie_link_gen_currentgaugeCurrent PCIe link generation
nvidia_smi_pcie_link_gen_gpucurrentgaugeCurrent GPU PCIe link generation
nvidia_smi_pcie_link_gen_gpumaxgaugeMaximum GPU PCIe link generation
nvidia_smi_pcie_link_gen_hostmaxgaugeMaximum host PCIe link generation
nvidia_smi_pcie_link_gen_maxgaugeMaximum PCIe link generation
nvidia_smi_pcie_link_width_currentgaugeCurrent PCIe link width
nvidia_smi_pcie_link_width_maxgauge

7. juicefs-exporter

When a JuiceFS file system is mounted on a host, Metrics data is already available on port 9567 by default.

Dashboard address https://github.com/juicedata/juicefs/blob/be5b6935975ea665c37f9cf5f5827e6f9474e28f/docs/en/grafana_template.json

7.1 Installation

1
kubectl apply -f https://raw.githubusercontent.com/shaowenchen/ops-hub/master/observation/host-9567-expoorter.yaml

7.2 Metrics

  • File system
Metric nameDescriptionUnit
juicefs_used_spaceTotal space usedbytes
juicefs_used_inodesTotal number of inodes
  • Operating system
Metric nameDescriptionUnit
juicefs_uptimeTotal uptimeseconds
juicefs_cpu_usageCPU usageseconds
juicefs_memoryMemory usagebytes
  • Metadata engine
Metric nameDescriptionUnit
juicefs_transaction_durations_histogram_secondsLatency distribution of transactionsseconds
juicefs_transaction_restartNumber of transaction restarts
  • FUSE
Metric nameDescriptionUnit
juicefs_fuse_read_size_bytesSize distribution of read requestsbytes
juicefs_fuse_written_size_bytesSize distribution of write requestsbytes
juicefs_fuse_ops_durations_histogram_secondsLatency distribution of all requestsseconds
juicefs_fuse_open_handlersNumber of open files and directories
  • SDK
Metric nameDescriptionUnit
juicefs_sdk_read_size_bytesSize distribution of read requestsbytes
juicefs_sdk_written_size_bytesSize distribution of write requestsbytes
juicefs_sdk_ops_durations_histogram_secondsLatency distribution of all requestsseconds
  • Cache
Metric nameDescriptionUnit
juicefs_blockcache_blocksTotal number of cached blocks
juicefs_blockcache_bytesTotal size of cached blocksbytes
juicefs_blockcache_hitsTotal number of cached block hits
juicefs_blockcache_missTotal number of cached block misses
juicefs_blockcache_writesTotal number of cache block writes
juicefs_blockcache_dropsTotal number of cache block drops
juicefs_blockcache_evictsTotal number of cache block evictions
juicefs_blockcache_hit_bytesTotal size of hit cached blocksbytes
juicefs_blockcache_miss_bytesTotal size of missed cached blocksbytes
juicefs_blockcache_write_bytesTotal size of cache block writesbytes
juicefs_blockcache_read_hist_secondsLatency distribution of cache block readsseconds
juicefs_blockcache_write_hist_secondsLatency distribution of cache block writesseconds
juicefs_staging_blocksNumber of blocks in the staging path
juicefs_staging_block_bytesTotal bytes of blocks in the staging pathseconds
juicefs_staging_block_delay_secondsTotal seconds of staging block delayseconds
  • Object storage
Metric nameDescriptionUnit
juicefs_object_request_durations_histogram_secondsLatency distribution of object storage requestsseconds
juicefs_object_request_errorsTotal number of failed requests
juicefs_object_request_data_bytesTotal data size of object storage requestsbytes
  • Internal features
Metric nameDescriptionUnit
juicefs_compact_size_histogram_bytesSize distribution of compacted databytes
juicefs_used_read_buffer_size_bytesSize of the buffer currently used for reads
  • Data synchronization
Metric nameDescriptionUnit
juicefs_sync_scannedNumber of all objects scanned from the source
juicefs_sync_handledNumber of objects from the source already handled
juicefs_sync_pendingNumber of objects waiting to be synchronized
juicefs_sync_copiedNumber of objects already synchronized
juicefs_sync_copied_bytesTotal size of data already synchronizedbytes
juicefs_sync_skippedNumber of objects skipped during synchronization
juicefs_sync_failedNumber of objects that failed during synchronization
juicefs_sync_deletedNumber of objects deleted during synchronization
juicefs_sync_checkedNumber of objects whose checksum was verified during synchronization
juicefs_sync_checked_bytesTotal size of data whose checksum was verified during synchronizationbytes

8. kube-state-metrics

kube-state-metrics generates Metrics data for the state of various resources by watching the Kubernetes API server.

Project address https://github.com/kubernetes/kube-state-metrics , dashboard https://grafana.com/grafana/dashboards/13332-kube-state-metrics-v2/ .

8.1 Installation

When Prometheus Server is installed, kube-state-metrics is usually already installed by default, so there is no need to install it again.

1
kubectl apply -f https://raw.githubusercontent.com/shaowenchen/ops-hub/master/observation/v2.10.0-kube-state-metrics.yaml

8.2 Metrics

  • Node
Metric nameTypeDescription
kube_node_infoGaugeQueries information about all nodes in the cluster; the sum() function gives the total number of nodes in the cluster.
kube_node_spec_unschedulableGaugeQueries whether a node can be scheduled new Pods. The sum() function gives the total number of Pods that can be scheduled in the cluster.
kube_node_status_allocatableGaugeQueries the total amount of resources available for scheduling on the node, including CPU, memory, Pods, and so on. Allows filtering by label to view a node’s specific resource capacity.
kube_node_status_capacityGaugeQueries the total amount of all resources on the node, including CPU, memory, Pods, and so on. Allows filtering by label to view a node’s specific resource capacity.
kube_node_status_conditionGaugeQueries the node’s state; based on states such as OutOfDisk, MemoryPressure, and DiskPressure you can find nodes in an abnormal state.
  • Pod
Metric nameTypeDescription
kube_pod_infoGaugeQueries information about all Pods; the sum() function gives the total number of Pods in the cluster.
kube_pod_status_phaseGaugeQueries the startup state of all Pods. The states include:
_ True: started successfully.
_ Failed: failed to start.
* Unknown: state unknown.
kube_pod_status_readyGaugeQueries all Pods in the Ready state. The sum() function gives the total number of Pods in the cluster.
kube_pod_status_scheduledGaugeQueries all Pods in the scheduled state. The sum() function gives the total number of Pods in the cluster.
  • Container
Metric nameTypeDescription
kube_pod_container_infoGaugeQueries information about all Containers. The sum() function gives the total number of Containers in the cluster.
kube_pod_container_status_readyGaugeQueries information about all Containers in the Ready state. The sum() function gives the total number of Containers in the cluster.
kube_pod_container_status_restarts_totalCountQueries the cumulative number of Container restarts in the cluster. The irate() function gives the Container restart rate in the cluster.
kube_pod_container_status_runningGaugeQueries information about all Containers in the Running state. The sum() function gives the total number of Containers in the cluster.
kube_pod_container_status_terminatedGaugeQueries information about all Containers in the Terminated state. The sum() function gives the total number of Containers in the cluster.
kube_pod_container_status_waitingGaugeQueries information about all Containers in the Waiting state. The sum() function gives the total number of Containers in the cluster.
kube_pod_container_resource_requestsGaugeQueries the container’s resource requests. Allows filtering by label to view a container’s specific resource requests.
kube_pod_container_resource_limitsGaugeQueries the container’s resource limits. Allows filtering by label to view a container’s specific resource limits.

微信公众号
WRITTEN BY
微信公众号