In der Hoffnung, dass sich jemand hier mit Prometheus auskennt, stehe ich vor folgendes Problem. Ich möchte mit Prometheus Statistiken auslesen. Nun ist es so, dass UI den Kernel so richtig vermurkst hat. Bei der Abfrage von: $ sudo ethtool -S eth9 bekomme ich folgende Ausgabe:
Code: sudo ethtool -S eth9
NIC statistics:
queue_0_tx_packets: 302035
queue_0_tx_bytes: 174790334
queue_0_tx_tso_small_mss: 0
queue_0_tx_tso_mss_seg_pad_bad: 0
queue_1_tx_packets: 583775
queue_1_tx_bytes: 542243127
queue_1_tx_tso_small_mss: 1
queue_1_tx_tso_mss_seg_pad_bad: 0
queue_2_tx_packets: 410365
queue_2_tx_bytes: 285917907
queue_2_tx_tso_small_mss: 1
queue_2_tx_tso_mss_seg_pad_bad: 0
queue_3_tx_packets: 236626
queue_3_tx_bytes: 127383898
queue_3_tx_tso_small_mss: 0
queue_3_tx_tso_mss_seg_pad_bad: 0
queue_0_rx_packets: 468645
queue_0_rx_bytes: 430355626
queue_0_rx_skb_alloc_fail: 0
queue_0_rx_dma_mapping_err: 0
queue_0_rx_small_copy_len_pkt: 145211
queue_0_rx_buf_alloc_fail: 0
queue_0_rx_partial_rx_ring_refi: 0
queue_1_rx_packets: 976039
queue_1_rx_bytes: 1150807006
queue_1_rx_skb_alloc_fail: 0
queue_1_rx_dma_mapping_err: 0
queue_1_rx_small_copy_len_pkt: 156209
queue_1_rx_buf_alloc_fail: 0
queue_1_rx_partial_rx_ring_refi: 0
queue_2_rx_packets: 608534
queue_2_rx_bytes: 700075764
queue_2_rx_skb_alloc_fail: 0
queue_2_rx_dma_mapping_err: 0
queue_2_rx_small_copy_len_pkt: 113751
queue_2_rx_buf_alloc_fail: 0
queue_2_rx_partial_rx_ring_refi: 0
queue_3_rx_packets: 870218
queue_3_rx_bytes: 938795256
queue_3_rx_skb_alloc_fail: 0
queue_3_rx_dma_mapping_err: 0
queue_3_rx_small_copy_len_pkt: 176147
queue_3_rx_buf_alloc_fail: 0
queue_3_rx_partial_rx_ring_refi: 0
Alles anzeigen
Die Ausgabe auf ein Debian Server erhalte ich diese:
Code: sudo ethtool -S enp2s0
NIC statistics:
tx_queue_0_packets: 1445238
tx_queue_0_bytes: 139732235
tx_queue_0_restart: 0
tx_queue_1_packets: 866229
tx_queue_1_bytes: 128148615
tx_queue_1_restart: 0
tx_queue_2_packets: 874752
tx_queue_2_bytes: 108163927
tx_queue_2_restart: 0
tx_queue_3_packets: 477611
tx_queue_3_bytes: 92946675
tx_queue_3_restart: 0
rx_queue_0_packets: 1817748
rx_queue_0_bytes: 1823103919
rx_queue_0_drops: 0
rx_queue_0_csum_err: 0
rx_queue_0_alloc_failed: 0
rx_queue_1_packets: 6326488
rx_queue_1_bytes: 8739366882
rx_queue_1_drops: 0
rx_queue_1_csum_err: 3
rx_queue_1_alloc_failed: 0
rx_queue_2_packets: 28761254
rx_queue_2_bytes: 29957333800
rx_queue_2_drops: 0
rx_queue_2_csum_err: 2
rx_queue_2_alloc_failed: 0
rx_queue_3_packets: 8235740
rx_queue_3_bytes: 7449069331
rx_queue_3_drops: 0
rx_queue_3_csum_err: 0
rx_queue_3_alloc_failed: 0
Alles anzeigen
Mittels metric_relabel_config soll ich die Einträge richtig einpflegen können. Ich habe es in meiner prometheus.yml eingetragen, jedoch greift diese Regel nicht! Kann mir jmd sagen was ich übersehe?
Hier ein Auszug meiner prometheus.yml
Code
- job_name: 'Node-Exporter'
static_configs:
- targets: ['192.168.1.2:9100']
metric_relabel_configs:
- source_labels:
- '__name__'
regex: 'node_ethtool_queue_([0-9]+)_(received|transmitted)_(.+)'
target_label: '__name__'
replacement: 'node_ethtool_$2_queue_$1_$3'
- source_labels:
- '__name__'
regex: 'node_ethtool_queue_.+'
action: drop
Alles anzeigen