@kyanny's blog

My thoughts, my life. Views/opinions are my own.

TIL: Prometheus の collectd_exporter と collectd の write_prometheus plugin は実質同じ

prometheus/collectd_exporter

github.com

  • Prometheus サーバー本体と別に exporter プロセスを実行する
  • 9103/tcp をリッスンするので Prometheus から scrape させる
  • collectd からのデータ転送は collectd 側のプラグインで設定する

Write Prometheus plugin

github.com

  • collectd 自体に 9103/tcp をリッスンさせて Prometheus から直接 scrape させる

The Write Prometheus plugin starts an internal webserver on port 9103 (configurable) and accepts scrape requests from Prometheus, an open-source monitoring system. This plugin is similar in scope to the collectd_exporter written by the Prometheus team and uses the same naming schema so it can be used as a drop-in alternative.

使い分け

  • Prometheus から collectd に直接アクセスできるなら write_prometheus プラグインが手軽そう
    • collectd へのアクセスに認証をかけている場合はどう設定するのだろう?
    • シンプルなぶん、込み入った設定には向かない?
  • collectd_exporter は TLS と Basic 認証をサポートしているので、やはり込み入ったことをしたい場合はこちらを使うのが良いのかも?