_
_
Back to Blog
ServiceNow
IT Operations Management

Google Stackdriver & ServiceNow: Seamless Integration

Google Cloud Platform (GCP) cloud discovery is an out-of-the-box solution, see why.
5
min read
|
by
Valdas Simanauskas
September 14, 2023

Google Cloud Platform (GCP) cloud discovery is an out-of-the-box solution to discovering GCP projects and resources. In tandem with Google Stackdriver, it can auto-update the data within the CMDB without waiting for cloud discovery to run based on life-cycle state or configuration changes within GCP.

After GCP cloud discovery is successfully configured and has the “Pull Events” setting configured, the Stackdriver integration periodically runs a scheduled job called “GCP-Events Job” to capture logged events within GCP. As long as the Stackdriver API and Cloud Logging API are turned on in GCP for the project/resource we discovered in cloud discovery, Stackdriver will pick up most events logged based on the resource type field within GCP.

Stackdriver compares the resource type found in GCP (Logs Explorer) and between the values defined in the gcp_supported_resource_type probe parameter. If the two match, Stackdriver will create an event.

An event then gets generated in the sn_cmp_cloud_event table. A discovery pattern will get triggered based on the resource type it found earlier. For example, the gce_instance resource is a cloud resource that fires off the “Google Cloud Platform(GCP) - Virtual Server discovery pattern.

This discovery pattern will find CIs that the pattern normally would and update the CI record and Stackdriver event accordingly.  The OOTB gcp_supported_resource_type probe parameter can be modified to include more resource types that aren’t typically discovered.  Include this new resource in the probe parameter “value” field. A new cloud resource type must correspond to this new resource and a discovery pattern attached to it.

By setting up and understanding Stackdriver, it allows an organization to get real-time CI data loaded into their CMDB. If there is a resource that isn’t configured OOTB, understanding how cloud resource types are defined and used within Stackdriver will allow for any resource type to be discovered and populated within the CMDB.

Written by
Valdas Simanauskas
Boston, USA
A ServiceNow Engineer with a strong drive for knowledge. He excels in utilizing ServiceNow in his projects. Away from work, he's keen on exploring new frontiers.
you might also like
back to blog