フリーで使える監視ソフトのPrometheusでlogの出力にdebugモードで詳細な情報を出させる設定についてです。
情報が海外ばかりなので、ちょっと分かりにくいですが、githubの情報が助かることが多いです。
https://github.com/prometheus/graphite_exporter/issues/7
こちらの問い合わせはdockerを使っているようです。
docker run -it prom/graphite-exporter -h
Usage of /bin/graphite_exporter:
-graphite.listen-address=":9109": TCP and UDP address on which to accept samples.
-graphite.mapping-config="": Metric mapping configuration file name.
-graphite.sample-expiry=5m0s: How long a sample is valid for.
-log.level=info: Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal, panic].
-web.listen-address=":9108": Address on which to expose metrics.
-web.telemetry-path="/metrics": Path under which to expose Prometheus metrics.
ちなみに、デバッグモードでログを観たいときに、exporter側では出力されないんでしょうか。
「グラファイトエクスポータには、デバッグレベルでログがありません。」
また、Prometheus側では、debugログを出力させることができます。サービスの起動オプションで以下を指定することで、サービス起動時にデバッグモードで起動します。
「--log.level=debug」
そして、デバッグモードを有効にした場合は、Linux、CentOSでは、それぞれ「var/log/messages」にデバッグログが出力されるようになります。grepで「debug」でひっかけるとログが見やすくなります。