wiki:linux/Prometheus

Version 3 (modified by yuna, 6 years ago) (diff)

--

Prometheus

Grafana

2つのメトリクスを1つのグラフで表示

{__name__=~"go_memstats_alloc_bytes_total|go_memstats_frees_total"}

Exporterの作り方

名前ラベルルール

名前ラベル作成のガイドがここにある。

  • 単位は、bytes、secondsを利用。
  • 累積カウントは_total。単位付きの場合は、_seconds_totalを利用1
  • percentは_ratioを利用し、0-1の値とする。

ラベル

resouce_value{quantile="0.5", type="create"} 12

のように{}の中でラベルを指定する。

  • quantileは統計値。0.5の場合、中央値、0.95の場合、95%の順位にある値を抽出。