process-exporter icon indicating copy to clipboard operation
process-exporter copied to clipboard

Handle signals for graceful shutdown

Open domleb opened this issue 5 years ago • 0 comments

We are running process-exporter on Kubernetes and when pods are deleted the container is sent a SIGTERM. Because the default behavior for golang is to exit with return code 2 after receiving SIGTERM, this is reported as an error state. We alert when pods exit with error so this is creating noise for us.

Could a signal handler be added to exit gracefully on SIGTERM? This is how we do it for other go apps.

domleb avatar Jul 01 '19 12:07 domleb