feat(monitoring): add Geneve and bond MTU drift alerts (#3888)
Signed-off-by: Dong Ma <dong.ma@vexxhost.com> Signed-off-by: Mohammed Naser <mnaser@vexxhost.com> Co-authored-by: Mohammed Naser <mnaser@vexxhost.com>
This commit is contained in:
1 parent
f2f1a8e939
commit
2e1ca7cdf3
7 files changed
+156
-2
No files matched your search
@@ -710,6 +710,79 @@ talking with ``etcd`` with the following commands:
|
||||
--from-file=/etc/kubernetes/pki/etcd/healthcheck-client.crt \
|
||||
--from-file=/etc/kubernetes/pki/etcd/healthcheck-client.key
|
||||
|
||||
``GeneveTransmitErrors``
|
||||
========================
|
||||
|
||||
This alert fires when a ``node-exporter`` device meets both of these
|
||||
conditions:
|
||||
|
||||
- The ``ethtool`` collector reports it as a ``Geneve`` interface.
|
||||
- The ``netdev`` collector reports more than 1.67 transmit errors per second
|
||||
over a 5-minute window, sustained for 15 minutes.
|
||||
|
||||
That rate equates to about 100 errors per minute.
|
||||
|
||||
This is a symptom proxy for tenant overlay transmit failures on a compute host.
|
||||
It's not specific to one root cause: the Linux ``Geneve`` transmit path
|
||||
increments errors when encapsulation or underlay transmit fails.
|
||||
|
||||
**Likely Root Causes**
|
||||
|
||||
- Underlay bond or path ``MTU`` is too small for encapsulated ``Geneve``
|
||||
traffic.
|
||||
- Route lookup or underlay connectivity failure for the tunnel destination.
|
||||
- ``Geneve`` socket or ``Open vSwitch`` ``datapath`` problem on the affected
|
||||
host.
|
||||
- ``NIC`` driver, firmware, or offload issue on the underlay link.
|
||||
|
||||
**Diagnostic and Remediation Steps**
|
||||
|
||||
1. Identify the affected node, ``Geneve`` device, and error rate:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
kubectl -n monitoring exec svc/kube-prometheus-stack-prometheus -- \
|
||||
promtool query instant http://localhost:9090 \
|
||||
'(rate(node_network_transmit_errs_total[5m])
|
||||
* on(instance, device) group_left(driver)
|
||||
node_ethtool_info{driver="geneve"})'
|
||||
|
||||
2. On the node, inspect the ``Geneve`` interface reported by the alert:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
ip -d link show <geneve-device>
|
||||
|
||||
For ``OVN``/``Open vSwitch``, the system ``Geneve`` device usually appears as
|
||||
``genev_sys_<udp-port>`` and shows ``geneve external``. Other ``Geneve``
|
||||
interfaces, such as ``Cilium`` tunnel devices, may also match this alert
|
||||
because the selector intentionally uses the ``ethtool`` ``driver="geneve"``
|
||||
label rather than an interface-name convention.
|
||||
|
||||
3. Confirm the underlay ``MTU`` is large enough for the encapsulated traffic:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
ip -d link show bond0
|
||||
ip -d link show bond0.4092
|
||||
|
||||
If the bond ``MTU`` is below the fleet-canonical value (typically 9216 on
|
||||
jumbo deployments), correct the ``netplan`` or interfaces configuration and
|
||||
reapply, then verify with ``ip -d link show bond0``.
|
||||
|
||||
4. Check for an existing ``MTU`` consistency alert, such as
|
||||
``CephNodeInconsistentMTU``, and compare ``node_network_mtu_bytes`` across
|
||||
peers if multiple hosts show the same symptoms.
|
||||
|
||||
5. If ``MTU`` is correct, inspect ``Open vSwitch`` and the underlay device for
|
||||
``datapath`` or offload failures:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
ovs-appctl dpctl/show -s
|
||||
ovs-vsctl show
|
||||
ethtool -S bond0
|
||||
|
||||
``GoldpingerHighErrorRate``
|
||||
===========================
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds ``GeneveTransmitErrors``, a Prometheus alert for sustained transmit
|
||||
errors on devices reported by ``node_ethtool_info{driver="geneve"}`` to
|
||||
catch host-local ``Geneve`` encapsulation or underlay transmit failures
|
||||
that can affect tenant overlay traffic.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Enables the ``node-exporter`` ``ethtool`` collector and updates network
|
||||
collector filters to export ``Geneve`` tunnel interfaces.
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
prometheusAlerts+: {
|
||||
groups: [
|
||||
{
|
||||
name: 'geneve',
|
||||
rules: [
|
||||
{
|
||||
alert: 'GeneveTransmitErrors',
|
||||
expr: |||
|
||||
(
|
||||
rate(node_network_transmit_errs_total{job="node-exporter"}[5m])
|
||||
* on(instance, device) group_left(driver)
|
||||
node_ethtool_info{job="node-exporter", driver="geneve"}
|
||||
) > 1.67
|
||||
|||,
|
||||
'for': '15m',
|
||||
labels: { severity: 'warning' },
|
||||
annotations: {
|
||||
summary: 'Geneve overlay: transmit failures may affect tenant traffic on a compute host',
|
||||
description: '{{ $labels.instance }} interface {{ $labels.device }} has averaged {{ printf "%.2f" $value }} transmit errors per second over the last 5 minutes (threshold > 1.67/s, ~100/min). Normal behavior is zero sustained transmit errors on Geneve tunnel interfaces.',
|
||||
runbook_url: 'https://vexxhost.github.io/atmosphere/admin/monitoring.html#genevetransmiterrors',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
@@ -103,6 +103,7 @@ local mixins = {
|
||||
},
|
||||
},
|
||||
coredns: (import 'coredns.libsonnet'),
|
||||
geneve: (import 'geneve.libsonnet'),
|
||||
kube: (import 'vendor/github.com/kubernetes-monitoring/kubernetes-mixin/mixin.libsonnet') + {
|
||||
_config+:: {
|
||||
kubeApiserverSelector: 'job="apiserver"',
|
||||
|
||||
@@ -1010,3 +1010,42 @@ tests:
|
||||
summary: "CoreDNS: instance has disappeared from Prometheus target discovery"
|
||||
description: "CoreDNS has disappeared from Prometheus target discovery for more than 15 minutes. This could indicate a crashed CoreDNS pod or a misconfigured scrape target."
|
||||
runbook_url: "https://vexxhost.github.io/atmosphere/admin/monitoring.html#corednsdown"
|
||||
|
||||
# GeneveTransmitErrors - should NOT fire when error rate is below threshold
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- series: 'node_network_transmit_errs_total{job="node-exporter",instance="192.0.2.10:9100",device="tenant-geneve0"}'
|
||||
values: '0+0x30'
|
||||
- series: 'node_ethtool_info{job="node-exporter",instance="192.0.2.10:9100",device="tenant-geneve0",driver="geneve"}'
|
||||
values: '1x30'
|
||||
alert_rule_test:
|
||||
- eval_time: 20m
|
||||
alertname: GeneveTransmitErrors
|
||||
exp_alerts: []
|
||||
|
||||
# GeneveTransmitErrors - should fire when sustained error rate exceeds 1.67/s for 15m
|
||||
# Counter increments by 200/min = 3.33/s, well above 1.67/s threshold.
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- series: 'node_network_transmit_errs_total{job="node-exporter",instance="192.0.2.10:9100",device="tenant-geneve0"}'
|
||||
values: '0+200x30'
|
||||
- series: 'node_ethtool_info{job="node-exporter",instance="192.0.2.10:9100",device="tenant-geneve0",driver="geneve"}'
|
||||
values: '1x30'
|
||||
- series: 'node_network_transmit_errs_total{job="node-exporter",instance="192.0.2.11:9100",device="eth0"}'
|
||||
values: '0+200x30'
|
||||
- series: 'node_ethtool_info{job="node-exporter",instance="192.0.2.11:9100",device="eth0",driver="mlx5_core"}'
|
||||
values: '1x30'
|
||||
alert_rule_test:
|
||||
- eval_time: 25m
|
||||
alertname: GeneveTransmitErrors
|
||||
exp_alerts:
|
||||
- exp_labels:
|
||||
job: node-exporter
|
||||
instance: 192.0.2.10:9100
|
||||
device: tenant-geneve0
|
||||
driver: geneve
|
||||
severity: P3
|
||||
exp_annotations:
|
||||
summary: "Geneve overlay: transmit failures may affect tenant traffic on a compute host"
|
||||
description: "192.0.2.10:9100 interface tenant-geneve0 has averaged 3.33 transmit errors per second over the last 5 minutes (threshold > 1.67/s, ~100/min). Normal behavior is zero sustained transmit errors on Geneve tunnel interfaces."
|
||||
runbook_url: "https://vexxhost.github.io/atmosphere/admin/monitoring.html#genevetransmiterrors"
|
||||
@@ -663,8 +663,9 @@ _kube_prometheus_stack_helm_values:
|
||||
- --collector.diskstats.ignored-devices=^(ram|loop|nbd|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$
|
||||
- --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|fuse.squashfuse_ll|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
|
||||
- --collector.filesystem.mount-points-exclude=^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+|var/lib/kubelet/plugins/kubernetes.io/csi/.+|run/containerd/.+)($|/)
|
||||
- --collector.netclass.ignored-devices=^(lxc|cilium_|qbr|qvb|qvo|tap|ovs-system|br|tbr|gre_sys|[0-9a-f]+_eth|vxlan).*$
|
||||
- --collector.netdev.device-exclude=^(lxc|cilium_|qbr|qvb|qvo|tap|ovs-system|br|tbr|gre_sys|[0-9a-f]+_eth|vxlan).*$
|
||||
- --collector.ethtool
|
||||
- --collector.netclass.ignored-devices=^(lxc|cilium_(host|net)|qbr|qvb|qvo|tap|ovs-system|br|tbr|gre_sys|[0-9a-f]+_eth|vxlan).*$
|
||||
- --collector.netdev.device-exclude=^(lxc|cilium_(host|net)|qbr|qvb|qvo|tap|ovs-system|br|tbr|gre_sys|[0-9a-f]+_eth|vxlan).*$
|
||||
- --collector.processes
|
||||
- --collector.systemd
|
||||
- --collector.stat.softirq
|
||||
|
||||
Reference in new issue
Block a user