HTTP 応答コードチェック

  • リリースバージョン: Washingtondc
  • 更新日 2024年02月01日
  • 読む1読むのに数分
  • Agent Client Collector は、HTTP 応答コードに次の追加チェックを提供します。このチェックはどのポリシーにも関連付けられていません。

    表 : 1. HTTP 応答コードチェック
    タイプ 名前 説明 使用方法と使用例 出力
    イベント util.check-http-response-code URL 応答コードが正規表現と一致しない場合は、重大なイベントを発生させます。

    セキュアなパラメーターを使用して資格情報 (ユーザー名とパスワード) を渡します。

    -u, --url  URL needs to be updated in the Monitoring HTTP Entrypoint/cmdb_ci_endpoint_http_list.do for the CI
    -r, --response-code  Regex string to match the response code. Otherwise, a critical event is raised. Default: 200
    -f, --follow_redirects Follows redirect URLs
    

    使用例:command: check-response-code.rb -u 'https://servicenow.com' -r 2.. -f

    CheckResponseCode OK : URL is in OK state. HTTP Response code is 200, matches regex