Defining Docker Observer jobs
Using the Docker Observer functionality, you can discover Docker network resources, including Docker Swarm clusters, and then visualize this data as a topology view in the Agile Service Manager UI. In addition, it also discovers Docker clusters managed by Docker UCP.
Before you begin
Important: The Docker Observer supports Docker version 3.1.0.
Note: Docker UCP v3.1.0 supports only TLS 1.2 for SSL negotiation and has removed support for TLS 1
and TLS 1.1.
The Docker Observer is installed as part of the core installation procedure.
Remember: Swagger documentation for the observer is available at the following default
location: https://<your
host>/1.0/docker-observer/swagger
About this task
The Docker Observer performs a single load job, which performs a one-off discovery of the Docker network.
The job definition indicates whether to connect to a local Docker on the same (UNIX) host as the
observer using the unix_socket parameter, or to a remote Docker using the
host and port parameters.
- Local docker
- The default, if the job parameters are empty, is to try to connect to a UNIX socket at /var/run/docker.sock
- Remote docker
- The host and port parameters of the job can be used to identify the TCP port that Docker can be reached on. The unix_socket parameter must not be supplied.
docker_observer_common.sh
- The configuration file you use to customize Docker Observer settings.
Swagger UI usage examples
Using the Docker Observer, you can discover the following Docker resources:
- Remote Docker network resources via HTTP through TCP port exposure.
Example:{ "unique_id": "my job", "type": "load", "parameters": { "host": "1.2.3.4", "port": 2375 } }
- Remote Docker network resources with HTTPS using a certificate.
Example:{ "unique_id": "my job", "type": "load", "parameters": { "host": "1.2.3.4", "port": 2375, "username": "username", "password": "password", "docker_ssl_certificate": "certificate_file_name.crt", "docker_ssl_truststore_file": "truststore_file_name.jks", "password_ssl_truststore_file": "truststore_password" } }
- Remote Docker network resources with HTTPS using certificate and truststore.
Example:{ "unique_id": "my job", "type": "load", "parameters": { "host": "1.2.3.4", "port": 2375, "username": "username", "password": "password", "docker_ssl_certificate": "certificate_file_name.crt", "docker_ssl_truststore_file": "truststore_file_name.jks", "password_ssl_truststore_file": "truststore_password" } }
- Remote Docker network resources with HTTPS using truststore.
Example:{ "unique_id": "my job", "type": "load", "parameters": { "host": "1.2.3.4", "port": 2375, "username": "username", "password": "password", "docker_ssl_truststore_file": "truststore_file_name.jks", "password_ssl_truststore_file": "truststore_password" } }
Procedure
Results
What to do next
You can also use the following scripts:
- docker_observer_load_stop.sh
- Stops the job
- docker_observer_job_list.sh
- Lists the current job status
- docker_observer_log_level.sh
- Sets the log level
Tip: For regular status updates, run the default Docker Observer job via a cron
job.
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.