monitoring-mixins / mixtool

mixtool is a helper for easily working with jsonnet mixins.
Apache License 2.0
139 stars 15 forks source link

Introduce mixtool generate command #10

Closed metalmatze closed 5 years ago

metalmatze commented 5 years ago

Recreate the generate command. As per Twitter poll we now call this command generate.

Using this command looks like:

mixtool generate alerts mixin.libsonnet > alerts.yaml
mixtool generate rules mixin.libsonnet > rules.yaml
mixtool generate dashboards mixin.libsonnet --directory /tmp/dashboards

The first two command simply write to stdout and you can either pipe it somewhere or write to a file. Generating dashboards needs to get a directory path via flag, as we're writing multiple files.

What do you think @brancz @tomwilkie?

I'm actually testing these commands while continuing development on the Thanos mixin.

brancz commented 5 years ago

lgtm