ncabatoff / script-exporter

Prometheus exporter to invoke scripts and parse their output as metrics.
MIT License
37 stars 20 forks source link

Feature Request: Run all scripts in a directory #8

Open dwagon opened 5 years ago

dwagon commented 5 years ago

It would be great if you could run all the scripts in a specified directory without needing to change the config to specify each one in turn. This would make the addition of new scripts a trivial exercise and prevent the centralised prometheus config from getting out of hand in large sites.

Thanks

ncabatoff commented 5 years ago

It makes sense, but I coded it the way I did out of an abundance of caution. By requiring each script to be hand-coded, you're less likely to have someone sneak a file into a directory and trick you into executing it with potentially elevated privileges.

Someone else wrote a very similar exporter before me, but I only discovered it subsequently because they chose a very odd name. Unfortunately I forget the name, but if I rediscover it I'll post it here, because I think they were more liberal in a way that would address this issue.