Configure third party tools by using the CLI
You can use the obs-cli.sh script to manage gateway hosts, exporters, and processors from the command-line interface.
-
Manage gateway hosts
- List configured gateway hosts ./obs-cli.sh get-gateway-hosts
- List all cluster hosts and their gateway status ./obs-cli.sh list-hosts --url http://cm-host:7180 --user admin --pass secret
- Add gateway hosts ./obs-cli.sh add-gateway-host --host [***HOST-NAME***]
- Remove gateway hosts ./obs-cli.sh remove-gateway-host --host [***HOST-NAME***]
-
Manage extensions (Optional: required only if exporter configuration requires
authentication)
-
List extensions for hosts:
./obs-cli.sh list-extensions -
Add extension definitions only
./obs-cli.sh add-extension --file extension-add.yaml -
Update existing extension(s) from YAML
./obs-cli.sh update-extension --file ./examples/extension-update.yaml -
Remove extensions entirely (definition + all pipeline links):
./obs-cli.sh remove-extension --extension cdpauth/example-1Example extension YAML:
cdpauth/example-1: cdp_access_key_id: CDP_ACCESS_KEY_ID send_token: true token_valid_for_sec: 3600 cdp_private_key: CDP_PRIVATE_KEY cdp_authentication_method: 'rsav1'basicauth/self-metrics: client_auth: username: USER_NAME password: PASSWORD
-
List extensions for hosts:
-
Manage exporters
- Display raw exporter and service configurations from Cloudera Manager ./obs-cli.sh get-metric-configs
- List exporters ./obs-cli.sh list-exporters
- Add exporters from a YAML file ./obs-cli.sh add-exporter --file ./examples/exporter-add.yaml --debug
- Update existing exporters from a YAML file ./obs-cli.sh update-exporter --file ./examples/exporter-update.yaml
- Remove exporters ./obs-cli.sh remove-exporter --exporter [***EXPORTER-NAME***]
Example exporter YAML:
prometheusremotewrite/my-exporter: endpoint: "https://receive.example.com/api/v1/receive" retry_on_failure: enabled: true initial_interval: 10s max_interval: 40s max_elapsed_time: 300s auth: authenticator: cdpauth/gatewayotlp/secure: endpoint: "api.your-observability-backend.com:4317" headers: "api-key": "your-secret-api-key" tls: insecure: false -
Manage processors (Optional)
- List processors and their pipeline connections ./obs-cli.sh list-processors
- Add processor definitions only ./obs-cli.sh add-processor --file ./examples/processor-add.yaml
- Add processor definitions and link them to exporter pipelines ./obs-cli.sh add-processor --file ./examples/processor-add.yaml --exporter prometheusremotewrite/priv
- Link existing processors to exporter pipelines ./obs-cli.sh add-processor --processor batch/customer --exporter otlp/custom
- Update existing processors from a YAML file ./obs-cli.sh update-processor --file ./examples/processor-update.yaml
- Remove processors entirely ./obs-cli.sh remove-processor --processor batch/customer
- Unlink processors from specific exporter pipelines ./obs-cli.sh remove-processor --processor batch/customer --exporter otlp/custom
attributes/test_marker: actions: - key: environment value: testing action: insert
