forked from statsd/statsd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to upstart job definition file
- Don't start at startup, since network interfaces may not be ready. Instead start when the first non-loopback network interface is up. - Use Upstart's setgid / setuid directives to run as _statsd user. - Omit implicit 'stop on shutdown'. - Add a conventional & friendly comment header. - Respawn StatsD on abnormal termination, but give up after 10 tries. - Do not redirect StatsD's output to /var/log/statsd/statsd.log. Instead simply allow Upstart to capture output and save it to /var/log/upstart/statsd.log.
- Loading branch information
Showing
6 changed files
with
17 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
var/log/statsd | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
description "statsd" | ||
author "etsy" | ||
# statsd - Network daemon for aggregating statistics | ||
# | ||
# This is a network service that receives metric data via UDP from other | ||
# applications. It aggregates this data and flushes it to a storage backend | ||
# (typically Graphite) at regular intervals. | ||
# | ||
description "Network daemon for aggregating statistics" | ||
author "Etsy" | ||
|
||
start on startup | ||
stop on shutdown | ||
start on (local-filesystems and net-device-up IFACE!=lo) | ||
|
||
script | ||
chdir /usr/share/statsd | ||
setuid _statsd | ||
setgid _statsd | ||
|
||
exec sudo -u _statsd /usr/share/statsd/debian/scripts/start | ||
end script | ||
respawn | ||
respawn limit 10 5 | ||
|
||
chdir /usr/share/statsd | ||
exec /usr/bin/nodejs stats.js /etc/statsd/localConfig.js |