process-exporter
process-exporter copied to clipboard
Handle signals for graceful shutdown
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.