Skip to content

Commit

Permalink
Add optional metrics prefix
Browse files Browse the repository at this point in the history
If the variable `casd_metrics_prefix` is set, the `--metrics-prefix`
argument will be added to the command with that value
  • Loading branch information
sdclarke committed Aug 14, 2024
1 parent f45f702 commit 2876d42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ A [default configuration](defaults/main.yml) is provided in this role. It establ
- `casd_proxy_{cas,ac,asset,execution}_client_{cert,key}`: TLS keypair used for client authentication against the remote server
- `casd_metrics_mode`: option passed to `--metrics-mode` of buildbox-casd
- `casd_metrics_publish_interval_secs`: how often metrics get published by buildbox-casd, in seconds
- `casd_metrics_prefix`: Set a prefix on metric names, if unset, no prefix is added
- `casd_labels`: a dictionary containing a set of labels applied to the container

## Example Configurations
Expand Down
6 changes: 5 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ casd_labels: {}
# Must be one of udp://<statsd_server>:<port>, file://<path> or stderr
casd_metrics_mode: "stderr"
casd_metrics_publish_interval_secs: 5
casd_metrics_args: "--metrics-mode {{ casd_metrics_mode }} --metrics-publish-interval {{ casd_metrics_publish_interval_secs }}"
casd_metrics_prefix: ""
casd_metrics_args: >
"--metrics-mode {{ casd_metrics_mode }}
--metrics-publish-interval {{ casd_metrics_publish_interval_secs }}
{% if casd_metrics_prefix %} --metrics-prefix {{ casd_metrics_prefix }}{% endif %}"
# casd config
casd_bind_address: "0.0.0.0"
Expand Down

0 comments on commit 2876d42

Please sign in to comment.