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
Remember: Swagger documentation for the observer is available at the following default
location: https://<your
host>/1.0/rancher-observer/swagger
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.
rancher_observer_common.sh
- The configuration file you use to customize Rancher Observer settings.
- The parameters defined here are then used by the
rancher_observer_load_start.sh
to trigger the Rancher 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
rancher_observer_load_start.sh
script and loads all
supported resources.
Procedure
To edit the parameters in the configuration file
-
Open the
rancher_observer_common.sh
configuration file and edit (at least) the
following Load parameters:
- Rancher Host IP
- The API base URL
- accessKey
- The Rancher access key
- secretKey
- The Rancher secret key (must be encrypted)
- clusterId
- The Rancher cluster ID
- enableSecuredConnection
- Set to 'true' to secure the connection.
- Set to 'false' to bypass secure host connection.
- certificate
- Optional.
- If enable_secure_host_connection is set to 'true':
- On Premise
- Enter the certificate name (in the /opt/ibm/netcool/asm/security directory)
to load into the trust store.
- On OCP
- Update the global secret with encrypted certificate information.
- See the relevant steps here.
- ssl_truststore_file
- The SSL truststore file
- password_ssl_truststore_file
- The SSL truststore password (must be encrypted)
Encryption requirement: The Load job requires the password and secret
key in the configuration file in encrypted form. To encrypt the password, run the
encrypt_password.sh
script in the
ASM_HOME/bin directory:
./bin/encrypt_password.sh
Enter and then confirm the value. The encryption
utility will return an encrypted version.
To start the Load job
-
To start the Rancher Observer Full Topology Upload job, use the following command:
$ASM_HOME/bin/rancher_observer_load_start.sh
Results
This job loads all requested topology data, and runs only once. Run this job whenever you need
Rancher topology data refreshed.
What to do next
See the related links for information on using rules for this observer.
You can also use the following scripts:
- rancher_observer_load_stop.sh
- Stops the Load job
- rancher_observer_job_list.sh
- Lists the status of current jobs
- rancher_observer_log_level.sh
- Sets the log level
Remember: As an alternative to being configured using the Observer Configuration
UI, observer jobs have scripts to start and stop all available jobs, to list the status of a current
job, and to set its logging levels. These 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.