Configure Service Graph Connector for GCP using the guided setup
- UpdatedJan 30, 2025
- 8 minutes to read
- Yokohama
- Now Platform Capabilities
Set up scheduled import jobs to pull in data from a GCP project into your CMDB.
Before you begin
To use this Service Graph Connector, you need a subscription to a Subscription Unit that is based in the IT Operations Management (ITOM) Visibility application or in the ITOM Discovery application. As defined in the section titled "Managed IT Resource Types" in ServiceNow Subscription Unit Overview for your subscription, for managed IT resources that are created or modified in the CMDB by this Service Graph Connector, but that aren’t yet managed by ITOM Visibility or ITOM Discovery, these resources will increase Subscription Unit consumption from that application. Review your current Subscription Unit consumption within ITOM Visibility or ITOM Discovery to ensure available capacity.
- The Integration Commons for CMDB store app, which is automatically installed.
- The CMDB CI class models store app, which is automatically installed. See CMDB CI Class Models.
- The ITOM Discovery License plugin (com.snc.itom.discovery.license). You must activate this plugin.
- ITOM Licensing plugin (com.snc.itom.license). For more information, see Request Discovery.
- The Datastream Action plugin (com.glide.hub.action_type.datastream), which is automatically installed.
- Observability Commons for CMDB (sn_observability), which is only required for event ingestion. This app must be installed prior to installing the connector for Event Management to work. For more information, see Observability Commons for CMDB on the ServiceNow Store.
Role required: admin
Procedure
-
Ensure that the application scope is set to the Service Graph Connector for GCP application by using the application picker.
For more information, see Application picker.
- Navigate to All > Service Graph Connectors > GCP > Setup.
- On the Getting started page, select Get Started.
-
Configure the connection to send requests to the GCP application.
- In the Configure the Connection and Credentials section of the Service Graph Connector for GCP page, select Get Started.
-
Set up the GCP environment and create a Java KeyStore (JKS) certificate to encrypt the security certificates obtained from a GCP application.
Make a note of the destination keystore password. You need to specify this password while importing the JKS certificate into the Service Graph Connector for GCP application.
For instructions, see the Service Graph Connector for GCP - Setup Instructions [KB1220598] article in the Now Support Knowledge Base.Note: After you have set up the GCP environment, return to the guided setup and set the GCP Setup Instructions task in the Configure the Connection and Credentials section to complete by selecting Mark as Complete. -
Create an X.509 certificate to associate the JKS certificate for the GCP application with the Service Graph Connector for GCP.
- For the Create X.509 certificate task, select Configure.
- On the form that opens in a new tab, fill in the fields.
Table 1. X.509 Certificate form Field Description Name Name of the X.509 certificate. For example, SG-GCP-509Certificate-Org1
.Notify on expiration Users to be notified when the certificate expires. If no users are selected, the logged-in user is added by default, along with the last two logged-in users with the administrator role. Warn in days to expire Number of days to send a notification before the certificate expires. Active Option to activate the certificate. Type Certificate container that is automatically set to Java Key Store. Leave the field value set to Java Key Store. Expires in days Number of days until the certificate expires. Key store password Password to access the JKS certificate as noted down in the previous step. Short description Description of the X.509 certificate. - Select the manage attachments icon (
).
- Select Choose file to browse and upload the keystore.p12 file for the JKS certificate you created in step 4.b.
- Close the dialog box.
- Select the Validate Stores/Certificates related link.
- On successful validation, select Update to return to the guided setup page.
- Set the Create X.509 certificate task to complete by selecting Mark as Complete.
-
Edit the default connection.
- For the Edit Default Connection task, select Configure.
- In the Flow Designer, select SG-GCP Default Connection, and then select Edit.
- On the form that opens in the Edit Connection dialog box, fill in the fields.
Table 2. Edit Connection form Field Description Service Account Email Service account created in and associated with the GCP application. Keystore Name of the keystore that you created in step 4.b. Key Password Destination keystore password associated with the keystore. Organization Id ID of the organization associated with the GCP application. Discovery Scope Discovery scope of the GCP application. The available options are: - organizations
- Select organizations when the ServiceNow service account has access to data within the GCP organization.
- projects
- Select projects when the ServiceNow service account has access to data within GCP projects only.
- Select Edit and Get OAuth Token.
- After the OAuth token flow is completed successfully, close the dialog box and the browser tab, and return to the guided setup page.
- Set the Edit Default Connection task to complete by selecting Mark as Complete.
-
Test the GCP API connection to import data from the GCP application.
- For the Test the Connection task, select Configure to open the SG-GCP Default Connection page in a new browser tab.
- Test the connection by selecting the Test Connection related link.
Testing the connection may take a few moments. The page is refreshed to show the test results.
- When the Status field is set to Success, close the browser tab and return to the guided setup page.
If any of the tests have an error code or message or error sign, the connection failed and further troubleshooting is required.
- Set the Test the Connection task to complete by selecting Mark as Complete.
-
Configure the scheduled jobs to import data from the GCP application.
- For the Configure the Scheduled Imports task, select Configure to open the Scheduled Data Imports list in a new browser tab.
- Select the SG-GCP Organization scheduled job.
- On the Scheduled Data Import form, verify the field values for the scheduled job.
For more information, see Schedule a data import.
- Select Active check box to activate the SG-GCP Organization scheduled job.
- In the Run field, select Periodically to specify how often the job will run.
- Select Update.
- Return to the guided setup page.
- Set the Configure the Scheduled Imports task to complete by selecting Mark as Complete.
- (Optional)
Add multiple GCP instances.
- In the Add Multiple Instances section of the Service Graph Connector for GCP page, select Get Started.
-
Create data sources for the new GCP connection.
- Ensure that you have edit permissions for the Datasource [sys_data_source] table.
- For the Update Data Source Access task, select Configure.
- To edit the record, select the Global application scope from the application picker.
- In the Application Access related list of the Data Source form that opens in a new tab, select the Can create, Can update, and Can delete check boxes.
- Select Update.
- Return to the guided setup page.
- From the application picker, select the Service Graph Connector for GCP application scope.
- Set the Update Data Source Access task to complete by selecting Mark as Complete.
-
Create a scheduled import job for the new GCP connection.
- Ensure that you have edit permissions for the Scheduled data import [scheduled_import_set] table.
- For the Update Scheduled Data Import Access task, select Configure.
- To edit the record, select the Global application scope from the application picker.
- In the Application Access related list of the Scheduled Data Import form that opens in a new tab, select the Can create, Can update, and Can delete check boxes.
- Select Update.
- Return to the guided setup page.
- From the application picker, select the Service Graph Connector for GCP application scope.
- Set the Update Scheduled Data Import Access task to complete by selecting Mark as Complete.
-
Clear the cache on the Data Source [sys_data_source] and Scheduled Data Imports [scheduled_import_set] tables.
- For the Clear Cache for Data Source and Scheduled Data Imports tables task, select Configure.
- In the Run script text box of the background
script page, enter the following
script:
GlideTableManager.invalidateTable("sys_data_source"); GlideCacheManager.flushTable("sys_data_source"); GlideTableManager.invalidateTable("scheduled_import_set"); GlideCacheManager.flushTable("scheduled_import_set"); GlideTableManager.invalidateTable("sys_db_object"); GlideCacheManager.flushTable("sys_db_object");
- Select Run Script to run the background script in
the global scope.
The script may take several minutes to execute.
- After the script is executed, select Close.
- Return to the guided setup page.
- From the application picker, select the Service Graph Connector for GCP application scope.
- Set the Clear Cache for Data Source and Scheduled Data Imports tables task to complete by selecting Mark as Complete.
- To create an X.509 certificate for the new GCP instance, repeat the step 4.c, and then set the Create X.509 certificate task to complete by selecting Mark as Complete.
-
Add a new connection.
- For the Add New Connection task, select Configure.
- In the Flow Designer, select Add Connection.
- On the form that opens in the Create Connection dialog box, fill in the fields.
Table 3. Edit Connection form Field Description Connection Name Unique name for the new connection. Service Account Email ServiceNow service account associated with the GCP application. Keystore Name of the keystore that you created in step 5.e. Key Password Destination keystore password associated with the keystore. Organization Id ID of the organization associated with the GCP application. Discovery Scope Discovery scope of the GCP application. The available options are: - organizations
- Select organizations when the ServiceNow service account has access to data within the GCP organization.
- projects
- Select projects when the ServiceNow service account has access to data within GCP projects only.
-
Test the new connection.
- For the Test New Connection task, select Configure.
- In Service Graph Connections page that opens in a new browser tab, select the new connection that you want to test from the list of available connections.
- Test the connection by selecting the Test Connection related link.
Testing the connection may take a few moments. The page is refreshed to show the test results.
- When the Status field is set to Success, close the browser tab and return to the guided setup page.
If any of the tests have an error code or message or error sign, the connection failed and further troubleshooting is required.
- Set the Test New Connection task to complete by selecting Mark as Complete.
- To configure the scheduled jobs to import data from the new GCP instance, repeat the step 4.f, and then set the Configure the Scheduled Imports task to complete by selecting Mark as Complete.
-
Synchronize new data sources to import data from GCP instances.
- In the Advanced Setup section of the Service Graph Connector for GCP page, select Get Started.
-
Synchronize new data sources for creating all the required credentials to make the new data sources work correctly.
- For the Sync New Data source task, select Configure.
- Select Synchronize Datasources.
- Return to the guided setup page by closing the Sync New Data source window.
- Set the Sync New Data source task to complete by selecting Mark as Complete.