diff --git a/charts/infra-report/values.yaml b/charts/infra-report/values.yaml index 58e7437..efc885a 100644 --- a/charts/infra-report/values.yaml +++ b/charts/infra-report/values.yaml @@ -33,12 +33,12 @@ config: TZ: "Asia/Seoul" QUERY_CPU: '100 - (avg by (node)(rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)' QUERY_MEMORY: '(1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100' - QUERY_DISK: 'sum by (mountpoint,fstype)((1 - node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"} / node_filesystem_size_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"}) * 100)' + QUERY_DISK: '(1 - node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"} / node_filesystem_size_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"}) * 100' QUERY_NAS: '((node_filesystem_size_bytes{fstype=~"nfs", node=~".*(bastion).*"} - node_filesystem_free_bytes{fstype=~"nfs", node=~".*(bastion).*"}) / node_filesystem_size_bytes{fstype=~"nfs", node=~".*(bastion).*"}) * 100' QUERY_INGRESS_RX: 'sum(rate(container_network_receive_bytes_total{namespace="ingress-nginx", pod=~"ingress-nginx-controller-.*"}[5m]))' QUERY_INGRESS_TX: 'sum(rate(container_network_transmit_bytes_total{namespace="ingress-nginx", pod=~"ingress-nginx-controller-.*"}[5m]))' - QUERY_ISTIO_RX: 'sum(rate(istio_request_bytes_sum{reporter="destination"}[5m]))' - QUERY_ISTIO_TX: 'sum(rate(istio_response_bytes_sum{reporter="destination"}[5m]))' + QUERY_ISTIO_RX: 'sum(rate(container_network_receive_bytes_total{namespace="istio-system", pod=~"istio-ingressgateway.*"}[5m]))' + QUERY_ISTIO_TX: 'sum(rate(container_network_transmit_bytes_total{namespace="istio-system", pod=~"istio-ingressgateway.*"}[5m]))' resources: requests: diff --git a/src/lib/prometheus.ts b/src/lib/prometheus.ts index 276c134..b70ffe4 100644 --- a/src/lib/prometheus.ts +++ b/src/lib/prometheus.ts @@ -45,7 +45,7 @@ export const QUERIES = { memoryUsage: process.env.QUERY_MEMORY || '(1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100', diskUsage: process.env.QUERY_DISK - || 'sum by (mountpoint,fstype)((1 - node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"} / node_filesystem_size_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"}) * 100)', + || '(1 - node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"} / node_filesystem_size_bytes{fstype!~"tmpfs|overlay|nfs",mountpoint!~"/boot.*"}) * 100', nasUsage: process.env.QUERY_NAS || '((node_filesystem_size_bytes{fstype=~"nfs", node=~".*(bastion).*"} - node_filesystem_free_bytes{fstype=~"nfs", node=~".*(bastion).*"}) / node_filesystem_size_bytes{fstype=~"nfs", node=~".*(bastion).*"}) * 100', ingressReceive: process.env.QUERY_INGRESS_RX @@ -53,7 +53,7 @@ export const QUERIES = { ingressTransmit: process.env.QUERY_INGRESS_TX || 'sum(rate(container_network_transmit_bytes_total{namespace="ingress-nginx", pod=~"ingress-nginx-controller-.*"}[5m]))', istioReceive: process.env.QUERY_ISTIO_RX - || 'sum(rate(istio_request_bytes_sum{reporter="destination"}[5m]))', + || 'sum(rate(container_network_receive_bytes_total{namespace="istio-system", pod=~"istio-ingressgateway.*"}[5m]))', istioTransmit: process.env.QUERY_ISTIO_TX - || 'sum(rate(istio_response_bytes_sum{reporter="destination"}[5m]))', + || 'sum(rate(container_network_transmit_bytes_total{namespace="istio-system", pod=~"istio-ingressgateway.*"}[5m]))', };