Defining GoogleCloud Observer jobs

Using the GoogleCloud Observer, you can define a full load job that will read services data from the Google Cloud Platform's Compute Services through Google's Compute Services SDK, and then generate a topology.

Before you begin

Important: The Google Cloud Observer supports the cloud/SaaS Google Cloud version.

The GoogleCloud Observer is installed as part of the core installation procedure.

The GoogleCloud Observer supports GoogleCloud's compute services. Ensure you have the GoogleCloud details in hand, such as the Project ID, Service Account Key File and Zone, before running the observer job.

Remember: Swagger documentation for the observer is available at the following default location: https://<your host>/1.0/googlecloud-observer/swagger

About this task

The GoogleCloud Observer supports a transient (one-off) Load job that loads all requested topology data via Google's Compute Services SDK to build the topology, and then exit.

googlecloud_observer_common.sh
The configuration file you use to customize GoogleCloud Observer settings.
The parameters defined here are then used by the googlecloud_observer_load_start.sh to trigger the GoogleCloud Observer jobs.
Tip: Alternatively, you can set the appropriate environment variables. If an environment variable is set, it takes precedence over the configuration file settings.
You define and start the following job. You must edit the parameters in the configuration file before running this job.
Full Topology Upload job
A transient (one-off) job that loads all requested topology data.
This job is started by the googlecloud_observer_load_start.sh script.
Note: You must create a service account key file or use an existing one to allow the GoogleCloud Observer to discover resources from GoogleCloud.

Procedure

To create a service account key file

  1. From the Google Cloud Platform dashboard, under your 'Project ID', go to APIs and Services and then choose Credentials. A number of authentication methods are displayed.
  2. Select the Service account authentication service
  3. From Create Credential, choose Service Account Key.
  4. Select the Compute Engine default service account and the JSON format, then click Create. A .json file will be created.
  5. Download the .json file.
    • For on-prem, store the .json file under /opt/ibm/netcool/asm/security
    • For ICP/OCP, follow these steps to store the service account key file as a secret.
    The filename will be used in the observer parameter (service_account_key_file) for the full load job.

To edit the parameters in the configuration file

  1. Open the googlecloud_observer_common.sh configuration file and edit (at least) the following Load parameters:
    project_id
    Google Cloud Platform Compute Service's Project ID
    zone
    Google Cloud Platform Compute Service's zone to discover
    service_account_key_file
    Google Cloud Platform Compute Service's Service Account Key File
    (For on-prem) copy the json file to the $ASM_HOME/security directory.

To start the Load job

  1. To start the GoogleCloud Observer Full Topology Upload job, use the following command:
    $ASM_HOME/bin/googlecloud_observer_load_start.sh

Results

This job loads all requested topology data, and runs only once. Run this job whenever you need GoogleCloud topology data refreshed.
Note: While the job is running, the status of discovered resources may appear as 'indeterminate' in the topology until the full upload is complete.

What to do next

You can also use the following scripts:
googlecloud_observer_load_stop.sh
Stops the Load job
googlecloud_observer_job_list.sh
Lists the status of current jobs
googlecloud_observer_log_level.sh
Sets the log level
Remember: In addition to being configurable from the Observer Configuration UI, all on-prem observer jobs also have scripts to start and stop all available jobs, to list the status of a current job, and to set its logging levels. Scripts can be run with -h or --help to display help information, and with -v or --verbose to print out the details of the actions performed by the script, including the full cURL command. For the on-prem version of Agile Service Manager, observer scripts are configured for specific jobs by editing the script configuration files.