Configuring Rancher Observer jobs

Using the Rancher Observer, you can define a full load job that will read data from Rancher through the REST API and generate a topology.

Before you begin

Important: The Rancher Observer supports the on-premise Rancher version 2.3.2 and API version 3.0.

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

Ensure you have the Rancher details to hand, such as the Rancher host IP, accessKey, secretKey and clusterId, before running the observer job.

About this task

The Rancher Observer supports a transient (one-off) Load job that loads all requested topology data via Rancher REST API to build the topology, and then exit.

You define and start the following job. You must edit the parameters in the configuration file before running this job.
Full Topology Upload job
By default, these jobs are one-off, transient jobs that perform a full upload of all requested topology data as soon as they are triggered.
You can also run these jobs (again) manually from the Observer UI, or schedule them to run at set times when configuring them.

Procedure

  1. On the Observer jobs page, perform one of the following actions:
    To edit an existing job
    Open the List of options overflow menu next to the job and click View & edit.
    To create a new job
    Click Add a new job + and select the Rancher Observer tile.
  2. Enter or edit the following parameters, then click Save to save your job and begin retrieving information:
    Table 1. Rancher Observer Load job parameters
    Parameter Action Details
    Rancher Host IP Enter the Rancher host IP address. Required
    Rancher Access Key ID Supply the Rancher access key. Required
    Rancher Secret Access Key Supply the Rancher secret key. Required. Use plain text.
    Rancher Cluster ID Enter the cluster ID to be discovered Required
    Enable/Disable Secure Host Connection to Rancher's Host Set to 'true' to secure the connection. Alternatively, set to 'false' to bypass secure host connection. Required
    Certificate If you have set the enable_secure_host_connection parameter to true, you must specify a certificate by name to load into the trustStore.
    Required. For more information, see Configuring observer job security.
    On-prem
    Create and store the certificate in the ASM_HOME/security directory.
    OCP
    Obtain the authentication certificate using OpenSSL and store it as a secret.
    SSL TrustStore File Specify the trustStore filename.
    Tip: You can use the observer name (<observer>.jks) for example rancher.jks.
    Required if you have set the enable_secure_host_connection parameter to true. For both on-prem and OCP, provide the JKS name, and the observer will then create the JKS file accordingly.
    Password SSL TrustStore File Specify the password to decrypt the HTTPS trust store file. Required. Use plain text.
    Access scope

    Enter text to provide a scope for the resources.

    Access scope can help map alerts to resources when resources in different scopes share the same parameters, such as matchTokens.

    Optional.
    Tip: You can define access scope for locations, project names, namespaces, etc.
    Generate debug support file
    Set the optional Generate debug support file parameter to 'True' in order to capture the output of the next scheduled job run as a file. This file will be stored with an observer's log files and can be used to debug observer issues, for example at the request of your designated Support team, or while using a test environment. For one-off jobs (that is, Load jobs), this parameter reverts to 'False' after the next completed run. To examine the output produced, you can load the generated debug file using the File Observer. The file is saved to the following locations:
    On-prem
    $ASM_HOME/logs/<obs>-observer/
    On OCP
    /var/log/itsm/<obs>-observer
    Optional
    Observer job description Enter additional information to describe the job. Optional
    Job schedule

    Specify when the job should run, and whether it should run at regular intervals.

    By default the job runs immediately, and only once.

    Optionally you can specify a future date and time for the job to run, and then set it to run at regular intervals after that.

    Optional. Transient (one-off) jobs only.

    If you set a job schedule, the run intervals must be at least 90 seconds apart, and if you set them at less than 15 minutes, a warning is displayed, as the frequency can impact system performance.

    SSL requirements: To acquire SSL certificates and build SSL truststores, use the relevant instructions in the following section: Configuring observer job security

Results

The job gathers information and updates the topology.

What to do next

See the related links for information on using rules for this observer.