Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager コマンド・定義ファイル・APIリファレンス


5.20.2 Prometheus serverのヘルスチェック

機能

Prometheus serverのヘルスチェックを行います。

ステータスコードは常に200を返却します。

形式
リクエスト行
GET /-/healthy HTTP/1.1
リクエストヘッダー

ヘッダー名

設定値

Host

APIの接続先のPrometheus serverのホストの情報を,ヘッダーの値として次の形式で指定します。

ホスト名またはIPアドレス:ポート番号

:ポート番号」は省略可能です。

  • ホスト名またはIPアドレス

    Prometheus serverのホスト名またはIPv4アドレスを指定します。

  • ポート番号

    Prometheus serverに接続する際に使用するポート番号を指定します。

このヘッダーは省略不可です。

リクエストのメッセージボディー

なし。

ステータスコード

常に200を返却します。

使用例

OSSのcurlコマンドを利用して,このAPIを実行した場合の使用例を,次に示します。

Prometheus serverが正常に動作している場合:

>curl -I --request GET "http://localhost:20713/-/healthy"
HTTP/1.1 200 OK
Date: Sat, 07 Aug 2021 01:20:57 GMT
Content-Length: 23
Content-Type: text/plain; charset=utf-8
>

Prometheus serverが正常に動作していない場合:

>curl -I --request GET "http://localhost:20713/-/healthy"
curl: (7) Failed to connect to localhost port 20713: Connection refused
>