0
1

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 5 years have passed since last update.

ICPでGrafanaのデータソースからPrometheusが消えた場合の一時的な対応

Last updated at Posted at 2018-07-30

IBM Cloud Private v2.1.0.3で、GrafanaのデータソースからPrometheusが消えるという事象が発生したので、対応方法のメモ。

原因と対策

データソースの登録はJobとして1回だけ実行されており、そもそもインストール時にGrafanaがPersistent Volumeを使用するように設定していなかったので、ICPを再起動してコンテナが再起動されると消えてしまう模様。ダッシュボードは消えていなかったが、こちらはConfigMapに保管されていた。

一時的にはデータソースを手動で追加すればよい。ここでは一時的な対応を記載する。

恒久対応としてはPVに保管するように変更する。そちらは以下のリンクを参照。

IBM Cloud PrivateでモニタリングデータをPVに保管する

データソースの手動再作成

メニューからData Sources画面に行き、「+Add data source」をクリックする。

以下の通り設定する。

image.png

項目
Name prometheus
Default true
Type Prometheus
URL https://monitoring-prometheus:9090
Basic Auth false
With Credentials false
TLS Client Auth true
With CA Cert true
Skip TLS Verification (Insecure) false

証明書はSecretに入っているので、CLIから取得してコピペする。
jsonpathでの指定の際に.をエスケープする必要があることに注意。

CA証明書

kubectl get secret -n kube-system monitoring-monitoring-ca-cert -o "jsonpath={.data['tls\.crt']}" | base64 -d

クライアント証明書

kubectl get secret -n kube-system monitoring-monitoring-client-certs -o "jsonpath={.data['tls\.crt']}" | base64 -d

クライアント鍵

kubectl get secret -n kube-system monitoring-monitoring-client-certs -o "jsonpath={.data['tls\.key']}" | base64 -d

Jobの再実行

データソースの定義はJobとして実行されているので、Jobを再実行することでも登録可能であり、Knowledge Centerにはその方法の記載があった。以下リンク先の「Grafana での Prometheus データ・ソースの手動構成」を参照。

IBM® Cloud Private モニター・サービス

参考リンク

JSONpath fails to return keys containing dots in a map

How to enable high availability for the IBM Cloud Private cluster monitoring service after initial installation

モニタリング・サービスの構成

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?