こんにちは
この問題を解決するための情報が見つからなかったため、徹底的に検索しました。
以前から bitnami/discourse イメージ(AKS クラスターにデプロイ)と discourse-prometheus プラグインを使用していました。
最近、bitnami/discourse:2.6.7 へアップグレードしたところ、discourse-prometheus プラグインが機能しなくなり、ログには以下のようなエラーが表示されます。
App 539 output: Prometheus Exporter, failed to send message Connection refused - connect(2) for "localhost" port 9405 App 539 output: [ 2021-06-26 13:05:24.3855 539/0x00005605c6d15b38(Worker 1) utils.rb ]: *** Exception Errno::ECONNREFUSED in Rack application object (Failed to open TCP connection to localhost:9405 (Connection refused - connect(2) for "localhost" port 9405)) (process 539, thread 0x00005605c6d15b38(Worker 1)): App 539 output: from /opt/bitnami/ruby/lib/ruby/2.6.0/net/http.rb:949:in `rescue in block in connect'
Prometheus では、ターゲットがダウンしており、エラー 502 Bad gateway が表示されています。
ブラウザで /metrics にアクセスすると、「Incomplete response received from application」と表示されます。