Skip to content

Commit

Permalink
Add missing metrics (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: Vitaly Zhuravlev <[email protected]>
  • Loading branch information
v-zhuravlev committed Nov 29, 2023
1 parent 30c3e8e commit 5e10338
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
9 changes: 7 additions & 2 deletions docs/node-observ-lib/panels.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()
Expand Down
20 changes: 17 additions & 3 deletions docs/node-observ-lib/targets.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 5e10338

Please sign in to comment.