prometheus 쿼리문 작성
#사용할 쿼리문-1
node_filesystem_avail_bytes{mountpoint="/",fstype!~"tmpfs|overlay|squashfs"} #사용가능용량
#사용할 쿼리문-2
node_filesystem_size_bytes{mountpoint="/",fstype!~"tmpfs|overlay|squashfs"} #전체용량
#사용중인용량
100 * (
1 -
node_filesystem_avail_bytes{
mountpoint="/",
fstype!~"tmpfs|overlay|squashfs"
}
/
node_filesystem_size_bytes{
mountpoint="/",
fstype!~"tmpfs|overlay|squashfs"
}
)
각 노드의 사용중인 용량 계산
#쿼리문
100 * (
1 -
node_filesystem_avail_bytes{
instance="20.0.0.2:9100", #노드를 식별
mountpoint="/",
fstype!~"tmpfs|overlay|squashfs"
}
/
node_filesystem_size_bytes{
instance="20.0.0.2:9100", #노드를 식별
mountpoint="/",
fstype!~"tmpfs|overlay|squashfs"
}
)
'ops > kubernetes' 카테고리의 다른 글
| 쿠버네티스가 클러스터의 노드에 taints를 적용하는 기준 (1) | 2026.01.12 |
|---|---|
| 워커노드의 disk-usage에 따라 alert발생 시키기 - 2(rule 설정) (0) | 2026.01.12 |
| ingress로 traefik 설정하기 (0) | 2026.01.12 |
| 워커노드에 node exporter 설치하기 (0) | 2026.01.11 |
| nodeSelector vs nodeName vs nodeAffinity (0) | 2026.01.07 |