Closed Napsty closed 9 months ago
Hi @Napsty, I like the idea and created a PR for this feature (#116).
The only difference from your example is that the scripts_configs
is just a list of strings.
If you already want to test this, you can find the binaries for the PR here: https://github.com/ricoberger/script_exporter/actions/runs/7836428714?pr=116
This is awesome, thanks for the quick PR! I hope test it next week and let you know.
I created a new release v2.18.0. If you have any problems with it please let me know.
Pretty neat exporter, thanks for this!
Right now each external script needs to be defined in the main config file (
-config.file config.yaml
), as seen in the example:This means that for additional scripts, the config.yaml needs to be edited. That's no problem if you have a couple of nodes running all the same scripts and therefore have the same config file. But with increasing number of nodes, the use-cases and roles of these nodes differ and hence different scripts need to be configured. Even with automation (e.g. Ansible) the scripts adjustments in the config file are prone to errors (let alone manual configuration).
It would be a nice feature to optionally read
scripts
entries from external files. Example:Each yaml file would then contain a single (or even multiple) scripts entry, for example:
This would allow a dynamic configuration of scripts without having to touch the main config.yaml.
I hope this Feature Request is understandable and makes sense. The names (e.g.
script_configs
) are just examples and could be named differently.Thanks for considering it.