0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

prometheusのkeep/drop

Posted at

前提:ifHCInOctetsにはifIndexとifNameの紐づけを行っている
・keepするmibを2種類に制限 'sysUpTime|ifHCInOctets'
・更にifNameに特定の文字列を含むmetricsのみに制限

    metric_relabel_configs:
  - source_labels: [__name__]
    regex: 'sysUpTime|ifHCInOctets'
    action: keep
  - source_labels: [ifName]
    regex: '|wlan.*|enp.*'
    action: keep

・ここには登場していないが、ifHCOutOctetsは破棄される
・ifHCInOctetsの'|wlan.|enp.'はkeepされる
・ifIndexを含んでいないsysUpTimeもkeepされる

以下でも、sysUpTimeは拾える。
ifNameを持っていないメトリクスの場合は、keep/dropの判断対象外

    metric_relabel_configs:
  - source_labels: [ifName]
    regex: '|wlan.*|enp.*'
    action: keep
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?