Presets
In order to improve the UX when using cloudwatcher metric
comamnd. The cloudwatcher
package provides a few presets that can be used to query the data reported by CloudWatchAgent
within certain systems. Additionally, custom presets can be defined by the user and used in the same way.
Presets are JSON-formatted files that provide parameter bundles for MetricWatcher
initialization.
Usage
The presets are used if --preset-name
or --preset-path
option is provided. The --preset-name
option can be used to select one of the built-in presets. The --preset-path
option can be used to select a custom preset.
Importantly, the settings defined in the preset can be extended or overridden by the user by providing additional arguments to the cloudwatcher metric
command, e.g. --dimensions key:value --metric-id test
.
Custom preset command example
The custom preset can be defined in a JSON file, for example:
custom_preset.json | |
---|---|
The above preset can be used by passing the --preset-path
option:
Built-in preset command example
The built-in presets can be used by passing the --preset-name
option: