From 9da896f1a1f392e9315153cdfe9ff6c2e080c06a Mon Sep 17 00:00:00 2001 From: dedemorton Date: Wed, 16 Oct 2024 19:04:28 -0700 Subject: [PATCH] Update metrics and add legacy section --- .../monitor-infra/host-metrics.asciidoc | 44 +++++++-- .../infra-monitoring/host-metrics.mdx | 97 ++++++++++++++----- 2 files changed, 113 insertions(+), 28 deletions(-) diff --git a/docs/en/observability/monitor-infra/host-metrics.asciidoc b/docs/en/observability/monitor-infra/host-metrics.asciidoc index 036f007482..0e60e56180 100644 --- a/docs/en/observability/monitor-infra/host-metrics.asciidoc +++ b/docs/en/observability/monitor-infra/host-metrics.asciidoc @@ -9,6 +9,7 @@ Learn about key host metrics displayed in the {infrastructure-app}: * <> * <> * <> +* <> [discrete] @@ -34,11 +35,11 @@ Learn about key host metrics displayed in the {infrastructure-app}: |=== | Metric | Description -| **CPU Usage (%)** | Percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. This includes both time spent on user space and kernel space. +| **CPU Usage (%)** | Average of percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. Includes both time spent on user space and kernel space. 100% means all CPUs of the host are busy. -100% means all CPUs of the host are busy. +**Field Calculation**: `average(system.cpu.total.norm.pct)` -**Field Calculation:** `(average(system.cpu.user.pct) + average(system.cpu.system.pct)) / max(system.cpu.cores)` +For legacy metric calculations, refer to <>. | **CPU Usage - iowait (%)** | The percentage of CPU time spent in wait (on disk). @@ -159,12 +160,15 @@ A high level indicates a situation of memory saturation for the host. For exampl | **Network Inbound (RX)** | Number of bytes that have been received per second on the public interfaces of the hosts. -**Field Calculation:** `average(host.network.ingress.bytes) * 8 / (max(metricset.period, kql='host.network.ingress.bytes: *') / 1000)` +**Field Calculation**: `sum(host.network.ingress.bytes) * 8 / 1000` -| **Network Inbound (TX)** | Number of bytes that have been sent per second on the public interfaces of the hosts. +For legacy metric calculations, refer to <>. -**Field Calculation:** `average(host.network.egress.bytes) * 8 / (max(metricset.period, kql='host.network.egress.bytes: *') / 1000)` +| **Network Outbound (TX)** | Number of bytes that have been sent per second on the public interfaces of the hosts. +**Field Calculation**: `sum(host.network.egress.bytes) * 8 / 1000` + +For legacy metric calculations, refer to <>. |=== [discrete] @@ -204,3 +208,31 @@ A high level indicates a situation of memory saturation for the host. For exampl **Field Calculation:** `counter_rate(max(system.diskio.write.bytes), kql='system.diskio.write.bytes: *')` |=== + +[discrete] +[[legacy-metrics]] +== Legacy metrics + +Over time, we may change the formula used to calculate a specific metric. +To avoid affecting your existing rules, instead of changing the actual metric definition, +we create a new metric and refer to the old one as "legacy." + +The UI and any new rules you create will use the new metric definition. +However, any alerts that use the old definition will refer to the metric as "legacy." + +[options="header"] +|=== +| Metric | Description + +| **CPU Usage (legacy)** | Percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. This includes both time spent on user space and kernel space. 100% means all CPUs of the host are busy. + +**Field Calculation:** `(average(system.cpu.user.pct) + average(system.cpu.system.pct)) / max(system.cpu.cores)` + +| **Network Inbound (RX) (legacy)** | Number of bytes that have been received per second on the public interfaces of the hosts. + +**Field Calculation:** `average(host.network.ingress.bytes) * 8 / (max(metricset.period, kql='host.network.ingress.bytes: *') / 1000)` + +| **Network Outbound (TX) (legacy)** | Number of bytes that have been sent per second on the public interfaces of the hosts. + +**Field Calculation:** `average(host.network.egress.bytes) * 8 / (max(metricset.period, kql='host.network.egress.bytes: *') / 1000)` +|=== diff --git a/docs/en/serverless/infra-monitoring/host-metrics.mdx b/docs/en/serverless/infra-monitoring/host-metrics.mdx index f1bf55b307..d5807486fe 100644 --- a/docs/en/serverless/infra-monitoring/host-metrics.mdx +++ b/docs/en/serverless/infra-monitoring/host-metrics.mdx @@ -17,6 +17,7 @@ Learn about key host metrics displayed in the Infrastructure UI: * Log * Network * Disk +* Legacy
@@ -57,20 +58,20 @@ Learn about key host metrics displayed in the Infrastructure UI: } ]}> - **CPU Usage (%)** + **CPU Usage (%)** - Percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. This includes both time spent on user space and kernel space. + Average of percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. Includes both time spent on user space and kernel space. 100% means all CPUs of the host are busy. - 100% means all CPUs of the host are busy. - - **Field Calculation**: `(average(system.cpu.user.pct) + average(system.cpu.system.pct)) / max(system.cpu.cores)` + **Field Calculation**: `average(system.cpu.total.norm.pct)` + + For legacy metric calculations, refer to Legacy metrics. **CPU Usage - iowait (%)** The percentage of CPU time spent in wait (on disk). - + **Field Calculation**: `average(system.cpu.iowait.pct) / max(system.cpu.cores)` @@ -78,7 +79,7 @@ Learn about key host metrics displayed in the Infrastructure UI: **CPU Usage - irq (%)** The percentage of CPU time spent servicing and handling hardware interrupts. - + **Field Calculation**: `average(system.cpu.irq.pct) / max(system.cpu.cores)` @@ -86,7 +87,7 @@ Learn about key host metrics displayed in the Infrastructure UI: **CPU Usage - nice (%)** The percentage of CPU time spent on low-priority processes. - + **Field Calculation**: `average(system.cpu.nice.pct) / max(system.cpu.cores)` @@ -94,7 +95,7 @@ Learn about key host metrics displayed in the Infrastructure UI: **CPU Usage - softirq (%)** The percentage of CPU time spent servicing and handling software interrupts. - + **Field Calculation**: `average(system.cpu.softirq.pct) / max(system.cpu.cores)` @@ -102,7 +103,7 @@ Learn about key host metrics displayed in the Infrastructure UI: **CPU Usage - steal (%)** The percentage of CPU time spent in involuntary wait by the virtual CPU while the hypervisor was servicing another processor. Available only on Unix. - + **Field Calculation**: `average(system.cpu.steal.pct) / max(system.cpu.cores)` @@ -110,7 +111,7 @@ Learn about key host metrics displayed in the Infrastructure UI: **CPU Usage - system (%)** The percentage of CPU time spent in kernel space. - + **Field Calculation**: `average(system.cpu.system.pct) / max(system.cpu.cores)` @@ -118,7 +119,7 @@ Learn about key host metrics displayed in the Infrastructure UI: **CPU Usage - user (%)** The percentage of CPU time spent in user space. On multi-core systems, you can have percentages that are greater than 100%. For example, if 3 cores are at 60% use, then the system.cpu.user.pct will be 180%. - + **Field Calculation**: `average(system.cpu.user.pct) / max(system.cpu.cores)` @@ -202,18 +203,18 @@ Learn about key host metrics displayed in the Infrastructure UI: **Memory Free (excluding cache)** Total available memory excluding the page cache. - + **Field Calculation**: `system.memory.free` - + **Memory Total** Total memory capacity. - + **Field Calculation**: `avg(system.memory.total)` - + **Memory Usage (%)** @@ -225,12 +226,12 @@ Learn about key host metrics displayed in the Infrastructure UI: **Field Calculation**: `average(system.memory.actual.used.pct)` - + **Memory Used** Main memory usage excluding page cache. - + **Field Calculation**: `average(system.memory.actual.used.bytes)` @@ -279,15 +280,19 @@ Learn about key host metrics displayed in the Infrastructure UI: Number of bytes that have been received per second on the public interfaces of the hosts. - **Field Calculation**: `average(host.network.ingress.bytes) * 8 / (max(metricset.period, kql='host.network.ingress.bytes: *') / 1000)` + **Field Calculation**: `sum(host.network.ingress.bytes) * 8 / 1000` + + For legacy metric calculations, refer to Legacy metrics. - **Network Inbound (TX)** + **Network Outbound (TX)** Number of bytes that have been sent per second on the public interfaces of the hosts. - **Field Calculation**: `average(host.network.egress.bytes) * 8 / (max(metricset.period, kql='host.network.egress.bytes: *') / 1000)` + **Field Calculation**: `sum(host.network.egress.bytes) * 8 / 1000` + + For legacy metric calculations, refer to Legacy metrics. @@ -360,4 +365,52 @@ Learn about key host metrics displayed in the Infrastructure UI: **Field Calculation**: `counter_rate(max(system.diskio.write.bytes), kql='system.diskio.write.bytes: *')` - \ No newline at end of file + + +
+ +## Legacy metrics + +Over time, we may change the formula used to calculate a specific metric. +To avoid affecting your existing rules, instead of changing the actual metric definition, +we create a new metric and refer to the old one as "legacy." + +The UI and any new rules you create will use the new metric definition. +However, any alerts that use the old definition will refer to the metric as "legacy." + + + + **CPU Usage (legacy)** + + Percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. This includes both time spent on user space and kernel space. + 100% means all CPUs of the host are busy. + + **Field Calculation**: `(average(system.cpu.user.pct) + average(system.cpu.system.pct)) / max(system.cpu.cores)` + + + + **Network Inbound (RX) (legacy)** + + Number of bytes that have been received per second on the public interfaces of the hosts. + + **Field Calculation**: `average(host.network.ingress.bytes) * 8 / (max(metricset.period, kql='host.network.ingress.bytes: *') / 1000)` + + + + **Network Outbound (TX) (legacy)** + + Number of bytes that have been sent per second on the public interfaces of the hosts. + + **Field Calculation**: `average(host.network.egress.bytes) * 8 / (max(metricset.period, kql='host.network.egress.bytes: *') / 1000)` + + +