8.3.8. PTP 高速イベントメトリクスのモニタリング
linuxptp-daemon が実行されているクラスターノードから PTP 高速イベントメトリクスを監視できます。事前に設定された自己更新型の Prometheus モニタリングスタックを使用して、OpenShift Container Platform Web コンソールで PTP 高速イベントメトリクスをモニタリングできます。
前提条件
-
OpenShift Container Platform CLI (
oc) がインストールされている。 -
cluster-admin権限を持つユーザーとしてログインしている。 - PTP 対応ハードウェアを搭載したノードに PTP Operator をインストールし、設定します。
手順
次のコマンドを実行して、ノードのデバッグ Pod を起動します。
$ oc debug node/<node_name>linuxptp-daemonコンテナーによって公開された PTP メトリクスを確認します。たとえば、以下のコマンドを実行します。sh-4.4# curl http://localhost:9091/metrics出力例
# HELP cne_api_events_published Metric to get number of events published by the rest api # TYPE cne_api_events_published gauge cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/gnss-status/gnss-sync-status",status="success"} 1 cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/ptp-status/lock-state",status="success"} 94 cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/ptp-status/class-change",status="success"} 18 cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state",status="success"} 27オプション:
cloud-event-proxyコンテナーのログでも PTP イベントを見つけることができます。たとえば、以下のコマンドを実行します。$ oc logs -f linuxptp-daemon-cvgr6 -n openshift-ptp -c cloud-event-proxy-
OpenShift Container Platform Web コンソールで PTP イベントを表示するには、クエリーする PTP メトリクスの名前 (例:
openshift_ptp_offset_ns) をコピーします。 -
OpenShift Container Platform Web コンソールで、Observe
Metrics をクリックします。 - PTP メトリクスを Expression フィールドに貼り付け、Run queries をクリックします。