From 4a48f6b18942e1d2a536e0e53c88725f74ee5bbc Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 14 Nov 2023 22:41:25 +0800 Subject: [PATCH] Add missing metrics (#27) --- docs/node-observ-lib/panels.libsonnet | 9 +++++++-- docs/node-observ-lib/targets.libsonnet | 20 +++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/node-observ-lib/panels.libsonnet b/docs/node-observ-lib/panels.libsonnet index aa0269d34f..ddee5a910f 100644 --- a/docs/node-observ-lib/panels.libsonnet +++ b/docs/node-observ-lib/panels.libsonnet @@ -441,7 +441,7 @@ local utils = commonlib.utils; memorySharedAndMapped: commonlib.panels.memory.timeSeries.usageBytes.new( 'Memory shared and mapped', - targets=[t.memoryMappedBytes, t.memoryShmemBytes, t.memoryShmemBytes, t.memoryShmemHugePagesBytes], + targets=[t.memoryMappedBytes, t.memoryShmemBytes, t.memoryShmemPmdMappedBytes, t.memoryShmemHugePagesBytes], description=||| - Mapped: This refers to the memory used in mapped page files that have been memory mapped, such as libraries. - Shmem: This is the memory used by shared memory, which is shared between multiple processes, including RAM disks. @@ -1073,7 +1073,12 @@ local utils = commonlib.utils; local override = g.panel.timeSeries.standardOptions.override; commonlib.panels.network.timeSeries.packets.new( 'UDP datagrams', - targets=[t.networkNetstatIPInUDPPerSec, t.networkNetstatIPOutUDPPerSec], + targets=[ + t.networkNetstatIPInUDPPerSec, + t.networkNetstatIPOutUDPPerSec, + t.networkNetstatIPInUDP6PerSec, + t.networkNetstatIPOutUDP6PerSec, + ], description='Rate of UDP datagrams received and transmitted.' ) + commonlib.panels.network.timeSeries.traffic.withNegateOutPackets() diff --git a/docs/node-observ-lib/targets.libsonnet b/docs/node-observ-lib/targets.libsonnet index 34629934ac..142526155c 100644 --- a/docs/node-observ-lib/targets.libsonnet +++ b/docs/node-observ-lib/targets.libsonnet @@ -491,13 +491,13 @@ local lokiQuery = g.query.loki; diskIOreadBytesPerSec: prometheusQuery.new( prometheusDatasource, - 'irate(node_disk_reads_completed_total{%(queriesSelector)s, %(diskDeviceSelector)s}[$__rate_interval])' % variables { diskDeviceSelector: config.diskDeviceSelector }, + 'irate(node_disk_read_bytes_total{%(queriesSelector)s, %(diskDeviceSelector)s}[$__rate_interval])' % variables { diskDeviceSelector: config.diskDeviceSelector }, ) + prometheusQuery.withLegendFormat('{{ device }} read'), diskIOwriteBytesPerSec: prometheusQuery.new( prometheusDatasource, - 'irate(node_disk_writes_completed_total{%(queriesSelector)s, %(diskDeviceSelector)s}[$__rate_interval])' % variables { diskDeviceSelector: config.diskDeviceSelector }, + 'irate(node_disk_written_bytes_total{%(queriesSelector)s, %(diskDeviceSelector)s}[$__rate_interval])' % variables { diskDeviceSelector: config.diskDeviceSelector }, ) + prometheusQuery.withLegendFormat('{{ device }} written'), diskIOutilization: @@ -661,7 +661,7 @@ local lokiQuery = g.query.loki; networkArpEntries: prometheusQuery.new( prometheusDatasource, - 'node_network_arp{%(queriesSelector)s}' % variables, + 'node_arp_entries{%(queriesSelector)s}' % variables, ), networkMtuBytes: prometheusQuery.new( @@ -998,6 +998,20 @@ local lokiQuery = g.query.loki; ) + prometheusQuery.withLegendFormat('UDP transmitted'), + networkNetstatIPInUDP6PerSec: + prometheusQuery.new( + prometheusDatasource, + 'irate(node_netstat_Udp6_InDatagrams{%(queriesSelector)s}[$__rate_interval])' % variables + ) + + prometheusQuery.withLegendFormat('UDP6 received'), + + networkNetstatIPOutUDP6PerSec: + prometheusQuery.new( + prometheusDatasource, + 'irate(node_netstat_Udp6_OutDatagrams{%(queriesSelector)s}[$__rate_interval])' % variables + ) + + prometheusQuery.withLegendFormat('UDP6 transmitted'), + //UDP errors networkNetstatUDPLiteInErrorsPerSec: prometheusQuery.new(