librato / statsd-cookbook

Chef cookbook to install Statsd
Apache License 2.0
26 stars 36 forks source link

Add pidfile for monitoring #19

Closed StephanX closed 10 years ago

StephanX commented 10 years ago

Nothing fancy here, just a basic pidfile to help monitor if the process is alive or not. The pidfile will become stale and remain if the process is reaped, but a decent monitoring system will catch that.

mheffner commented 10 years ago

@StephanX Should that script be changed to exec node instead then? As it is now, the pidfile is going to reference the parent shell process and not node itself.

StephanX commented 10 years ago

The shell process is still valid while the node process is running, so it amounts to the same thing.

Pardon brevity, am tapping on my phone. On Jun 11, 2014 7:34 PM, "Mike Heffner" notifications@github.com wrote:

@StephanX https://github.com/StephanX Should that script be changed to exec node instead then? As it is now, the pidfile is going to reference the parent shell process and not node itself.

— Reply to this email directly or view it on GitHub https://github.com/librato/statsd-cookbook/pull/19#issuecomment-45823966 .

mheffner commented 10 years ago

Well, ideally you'll want your monitoring system monitoring node itself and not the parent process. However, that can be done in a followup PR since that's already the existing behavior.

Thanks for the PR!

StephanX commented 10 years ago

@mheffner Totally agree with you; it could be more easily accomplished using the upstart start-stop daemon feature, I'd need a little time to wire that up though. Will see if I can tackle it this week.