Closed diversario closed 1 year ago
I got around the issue by building a custom image:
FROM ricoberger/script_exporter:v2.14.1 as exporter
RUN apk add --no-cache tini
USER nobody
ENTRYPOINT ["/sbin/tini", "--", "/bin/script_exporter"]
Hi @diversario is this a general solution and if so do you want to make a PR for it?
This would apply to anyone running the script-exporter container not in Docker, such as the more recent k8s version (iirc 1.20+).
With Docker this will also work - it just adds a little unnecessary layer, but it doesn't hurt. I can PR the Dockerfile change, yes.
I'm running it in Kubernetes, and use
kubectl
,jq
etc to get the data to produce a metric. I noticed that the script execution fails intermittently with the script getting killed, even though it did not meet the timeout or logged any errors.The I noticed this in the container:
dozens of zombie processes sitting around. Perhaps script-exporter should run under
tini
or something else that handles reaping defunct processes? This is in containerd, by the way, which seemingly does not handle this the way Docker does.