Google - GCP パターンディスカバリーエラー Issue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } <!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } --> 概要 ServiceNow Store で入手可能な Google Cloud Platform (GCP) ディスカバリーパターン、GCP サーバーレスのインストール/構成 パターン: Google Cloud Platform ディスカバリー ディスカバリーで利用可能なパターンは次のとおりです。 Google Cloud Platform (GCP):ストレージGoogle Cloud Platform (GCP):仮想サーバーGoogle Cloud Platform (GCP):ディスクタイプGoogle Cloud Platform (GCP):外部 IP アドレスGoogle Cloud Platform (GCP):ロードバランサー:HTTPGoogle Cloud Platform (GCP):ロードバランサー:TCP:UDPGoogle Cloud Platform (GCP):論理データセンターGoogle Cloud Platform (GCP):ネットワーキングGoogle Cloud Platform (GCP):SSH キー ユーザー/アドミンは、要件に従って、上記のすべてのパターンまたは特定のパターンのいずれかを選択してアクティブにすることができます。 問題/エラー GCP ディスカバリーパターンが次のエラーで失敗する 2019-04-29 06:29:15: Exception occurred while executing operation Cloud REST Query. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud request failed. URL: https://www.googleapis.com/compute/v1/projects/GCP/regions?maxResults=500 Status: 400 Response: HTTP/1.1 400 Bad Request [Vary: X-Origin, Content-Type: application/json; charset=UTF-8, 環境 アプリケーション「ディスカバリーとサービスマッピングパターン」とともにインストールされるインスタンス Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } ドキュメントのとおり、GCP ディスカバリーは London P7 および Madrid P2 からサポートされています。 Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } GCP 認証情報の不一致が原因でパターンが失敗しました。 Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } GCP API 認証情報を設定するには、以下の情報が必要です。 "https://<Instancename>.service-now.com/gcp_credentials.do" Client_email = メールSecret_Key = 秘密キー 上記の両方の詳細は、GCP で ServiceAccount を作成するときに入力され、JSON の出力は次のようになります { "type": "service_account", "project_id": "project-id", "private_key_id": "some_number", "private_key": "-----BEGIN PRIVATE KEY-----\n.... =\n-----END PRIVATE KEY-----\n", "client_email": "<api-name>api@project-id.iam.gserviceaccount.com", "client_id": "...", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/...<api-name>api%40project-id.iam.gserviceaccount.com" } 上記の JSON の出力から、「Private_Key」と「Client_Email」が必要です GCP ServiceAccount を構成するには、以下の情報が必要です。 "https://<Instancename>.service-now.com/cmdb_ci_cloud_service_account.do" アカウント ID = プロジェクト名認証情報 = 上記のように作成したもの (GCP API)データセンター = 常に「cmdb_ci_google_datacenter」 アカウント ID はプロジェクト名であり、「Private_Key」と「Client_Email」の ServiceAccount を作成するときに、ユーザーが作成するプロジェクトを最初に要求します。プロジェクト名は上記の JSON では利用できないため、プロジェクト名に対して作成する必要がある認証情報アドミンは、JSON で指定されたプロジェクト ID を使用したプロジェクト名を使用して認証情報を検証する必要があります サーバーレスディスカバリーでの GCP パターンの構成。 https://<instacnename>.service-now.com/discovery_schedule_list.do?sysparm_query=discover%3DHostless&sysparm_first_row=1&sysparm_view= ナビゲーター >> ディスカバリースケジュール >> GCP サーバーレススケジュール >> サーバーなし実行パターン 上記のようにいずれかのパターンを開き、[ディスカバリーパターンランチャーパラメーター] の下のフィールドに入力するかを確認します パラメーターの値を正確に入力します。値は大文字と小文字を区別することに注意してください。 Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 参照: クラウド API サービスへの認証GCP アドミンに連絡して、必要なすべての情報を取得してください