mimir
mimir copied to clipboard
Track the installation mode via the anonymous usage statistics
I would like to track via the anonymous usage statistics how was installed Mimir (Helm, Jsonnet, other). To make the tracking reliable I propose to add a new configuration option -usage-stats.installation-mode
(defaults to custom
), and then have Helm setting it to helm
, and jsonnet to jsonnet
.
This looks like very fun. Can I have a try? Could you please add some guides?
This looks like very fun. Can I have a try? Could you please add some guides?
You will need to
- add configuration option as suggested by this issue
- initialize installation mode in
initUsageStats
, by usingusagestats.GetString(...).Set(value)
similar to whatinitUsageStats
does for"blocks_storage_backend"
here.
I think that's it for the code. Then we should modify Jsonnet and Helm to set the values.
Then we should modify Jsonnet and Helm to set the values.
Yes, this too.
For jsonnet you can just inject a CLI flag to each component (e.g. a way could be define a dedicated config block usageStatsConfig
similarly to grpcConfig
in operations/mimir/config.libsonnet
and merge it in every component args (similarly to what do we with grpcConfig
).
For Helm, let's ask some help to @Logiraptor.
For helm I would add an entry under mimir.config
in the default values.yaml
file here: https://github.com/grafana/mimir/blob/e7199818e100ab5d2038bd3bf0b1a6163624a347/operations/helm/charts/mimir-distributed/values.yaml#L83
It would probably look something like
mimir:
config: |
usage_stats:
installation_mode: helm
... <rest of current config block omitted>
So this means the new configuration option would be available via both CLI and yaml configuration like most other flags.