ricoberger / script_exporter

Prometheus exporter to execute scripts and collect metrics from the output or the exit status.
MIT License
354 stars 82 forks source link

Add Flag to Enable Logging of Environment Variable #93

Closed ricoberger closed 1 year ago

ricoberger commented 1 year ago

Until now we always logged environment variables used by the exporter to run a script. This means that it was possible that the logs also contained sensible information from these environment variables (see #91). This is now changed an we do not log environment variables anymore. For debugging this behaviour can be overwritten by setting the new "-log.env" flag to "true".

Fixes #91

diversario commented 1 year ago

Thanks, @ricoberger !

Out of curiosity, would you accept a PR that would also allow blocklisting env vars by name? Not saying I'll definitely submit one but just in case.

ricoberger commented 1 year ago

Hi @diversario, yes sure 🙂