joe-elliott / cert-exporter

A Prometheus exporter that publishes cert expirations on disk and in Kubernetes secrets
Apache License 2.0
313 stars 88 forks source link

cert-exporter creates log files in /tmp #153

Closed JustNZ closed 7 months ago

JustNZ commented 9 months ago

Hello, I just discovered that my running instance of cert-exporter creates log files in the /tmp directory. Is there any flag to change the directory where those log files get created?

joe-elliott commented 9 months ago

That's unfortunate. It's doing that by default? This param controls where it logs:

  -log_dir string
        If non-empty, write log files in this directory

but I thought it was empty by default.

JustNZ commented 9 months ago

So yeah seems to be a default somehow - at least this is how I execute the binary I created from this project

ExecStart=/opt/cert-exporter \
    -include-cert-glob=/foo/host.crt \
    -include-cert-glob=/foo/ca.pem \
    -prometheus-listen-address=127.0.0.1:9431

and thanks for the param I will include it then in my startup