CLI configuration

Configure profiles

The ~/.config/observe.yaml file stores your commonly used configuration options, such as the customer ID and the cluster URL. If you want, you can include the authentication token if handled securely. The YAML file contains a list of profiles, and you can choose a profile using the --profile command line option. If you do not specify a specific profile, Observe uses the default profile. You can specify another file for this using the parameter, --config, or the environment variable OBSERVE_CONFIG.

The name of each option within the profile matches the name of the corresponding config-option. For example:

profile:
default:
customerid: "123456789012"
site: "observeinc.com"
authtoken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
testing:
customerid: "234567890123"
site: "observe-testing.com"
authtoken: "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
timestamp: true
workspace: Testing

With this profile configuration, you can use the default profile using observe command ... and the testing profile using --profile=testing command ....

If you don’t specify a profile on the command line but you set the OBSERVE_PROFILE environment profile, then Observe uses that profile.

Output options

The CLI options in the table can provide more information about your Observe instance.

ParameterDescription
--authtoken stringThe bearer token for Observe authorization. May be two-part with a space separator. Does not include ‘Bearer’ word.
--config stringRead configuration from given file rather than ~/config/observe.yaml. Can also be specified in the OBSERVE_CONFIG environment variable.
--debugPrints more verbose output about the current state, which may be helpful when automating actions and debugging failed actions. The output prints to the standard error output stream.
--output stringThe output file name for data output. If empty or ‘-’, output goes to stdout.
--profile stringThe name of a section in the ~/.config/observe.yaml config file. Make empty to read no profile. Can also be specified in the OBSERVE_PROFILE environment variable (default “default”)
--quiet-exitReturn successful exit code even on failure.
--show-configPrint configuration before running command.
--site stringThe domain of your Observe tenant site. Can include :port if needed.
--timestampTimestamps each progress, debug, or error message, which may be useful when you use this tool to automate tasks but harder to read when using the tool interactively.
--workspace stringDefault workspace to assume for objects if none is specified.

Observe sends error, progress, and debug information to the standard error stream. The CLI sends actual data output from a command to the standard output stream or to a file specified using --output=filename. Data output redirection is a global configuration option and not an option for a specific command.