Closed Nick-Triller closed 2 years ago
Hi @Nick-Triller, this sounds like a useful change 🙂.
If you create a PR, please keep the script
field for now as you already suggested. But maybe we can mark is as deprecated in the readme and remove it with the next major version bump.
Hi there!
Currently, the
script
string is split on spaces to generate the program name and any fixed arguments. This approach means that the program name and fixed arguments can't contain spaces.I propose that fixed arguments in the exporter config should be defined as an array instead of being defined in the
script
property, e.g. something like this:Example 1:
Example 2:
The change can be implemented in a backwards compatible way:
script
property with current behaviour.script
orcommand
to be defined.script
is combined withargs
orcommand
.args
is always optional.This is also how arguments are passed to a process in a Kubernetes pod manifest which means it will feel natural to many users of script_exporter:
@ricoberger let me know what you think, I will be happy to implement this change.