UNPKG

8 kBJavaScriptView Raw
1/*
2Graphite Required Variable:
3
4(Leave this unset to avoid sending stats to Graphite.
5 Set debug flag and leave this unset to run in 'dry' debug mode -
6 useful for testing statsd clients without a Graphite server.)
7
8 graphiteHost: hostname or IP of Graphite server
9
10Optional Variables:
11
12 graphitePort: port for the graphite text collector [default: 2003]
13 graphitePicklePort: port for the graphite pickle collector [default: 2004]
14 graphiteProtocol: either 'text' or 'pickle' [default: 'text']
15 backends: an array of backends to load. Each backend must exist
16 by name in the directory backends/. If not specified,
17 the default graphite backend will be loaded.
18 * example for console and graphite:
19 [ "./backends/console", "./backends/graphite" ]
20
21 servers: an array of server configurations.
22 If not specified, the server, address,
23 address_ipv6, and port top-level configuration
24 options are used to configure a single server for
25 backwards-compatibility
26 Each server configuration supports the following keys:
27 server: the server to load. The server must exist by name in the directory
28 servers/. If not specified, the default udp server will be loaded.
29 * example for tcp server:
30 "./servers/tcp"
31 address: address to listen on [default: 0.0.0.0]
32 address_ipv6: defines if the address is an IPv4 or IPv6 address [true or false, default: false]
33 port: port to listen for messages on [default: 8125]
34 socket: (only for tcp servers) path to unix domain socket which will be used to receive
35 metrics [default: undefinded]
36 socket_mod: (only for tcp servers) file mode which should be applied to unix domain socket, relevant
37 only if socket option is used [default: undefined]
38
39 debug: debug flag [default: false]
40 mgmt_address: address to run the management TCP interface on
41 [default: 0.0.0.0]
42 mgmt_port: port to run the management TCP interface on [default: 8126]
43 title: Allows for overriding the process title. [default: statsd]
44 if set to false, will not override the process title and let the OS set it.
45 The length of the title has to be less than or equal to the binary name + cli arguments
46 NOTE: This does not work on Mac's with node versions prior to v0.10
47
48 healthStatus: default health status to be returned and statsd process starts ['up' or 'down', default: 'up']
49 dumpMessages: log all incoming messages
50 flushInterval: interval (in ms) to flush metrics to each backend
51 percentThreshold: for time information, calculate the Nth percentile(s)
52 (can be a single value or list of floating-point values)
53 negative values mean to use "top" Nth percentile(s) values
54 [%, default: 90]
55 flush_counts: send stats_counts metrics [default: true]
56
57 keyFlush: log the most frequently sent keys [object, default: undefined]
58 interval: how often to log frequent keys [ms, default: 0]
59 percent: percentage of frequent keys to log [%, default: 100]
60 log: location of log file for frequent keys [default: STDOUT]
61 deleteIdleStats: don't send values to graphite for inactive counters, sets, gauges, or timers
62 as opposed to sending 0. For gauges, this unsets the gauge (instead of sending
63 the previous value). Can be individually overridden. [default: false]
64 deleteGauges: don't send values to graphite for inactive gauges, as opposed to sending the previous value [default: false]
65 gaugesMaxTTL: number of flush cycles to wait before the gauge is marked as inactive, to use in combination with deleteGauges [default: 1]
66 deleteTimers: don't send values to graphite for inactive timers, as opposed to sending 0 [default: false]
67 deleteSets: don't send values to graphite for inactive sets, as opposed to sending 0 [default: false]
68 deleteCounters: don't send values to graphite for inactive counters, as opposed to sending 0 [default: false]
69 prefixStats: prefix to use for the statsd statistics data for this running instance of statsd [default: statsd]
70 applies to both legacy and new namespacing
71 keyNameSanitize: sanitize all stat names on ingress [default: true]
72 If disabled, it is up to the backends to sanitize keynames
73 as appropriate per their storage requirements.
74
75 calculatedTimerMetrics: List of timer metrics that will be sent. Default will send all metrics.
76 To filter on percents and top percents: append '_percent' to the metric name.
77 Example: calculatedTimerMetrics: ['count', 'median', 'upper_percent', 'histogram']
78
79 console:
80 prettyprint: whether to prettyprint the console backend
81 output [true or false, default: true]
82
83 log: log settings [object, default: undefined]
84 backend: where to log: stdout or syslog [string, default: stdout]
85 application: name of the application for syslog [string, default: statsd]
86 level: log level for [node-]syslog [string, default: LOG_INFO]
87
88 graphite:
89 legacyNamespace: use the legacy namespace [default: true]
90 globalPrefix: global prefix to use for sending stats to graphite [default: "stats"]
91 prefixCounter: graphite prefix for counter metrics [default: "counters"]
92 prefixTimer: graphite prefix for timer metrics [default: "timers"]
93 prefixGauge: graphite prefix for gauge metrics [default: "gauges"]
94 prefixSet: graphite prefix for set metrics [default: "sets"]
95 globalSuffix: global suffix to use for sending stats to graphite [default: ""]
96 This is particularly useful for sending per host stats by
97 settings this value to: require('os').hostname().split('.')[0]
98
99 repeater: an array of hashes of the for host: and port:
100 that details other statsd servers to which the received
101 packets should be "repeated" (duplicated to).
102 e.g. [ { host: '10.10.10.10', port: 8125 },
103 { host: 'observer', port: 88125 } ]
104
105 repeaterProtocol: whether to use udp4, udp6, or tcp for repeaters.
106 ["udp4," "udp6", or "tcp" default: "udp4"]
107
108 histogram: for timers, an array of mappings of strings (to match metrics) and
109 corresponding ordered non-inclusive upper limits of bins.
110 For all matching metrics, histograms are maintained over
111 time by writing the frequencies for all bins.
112 'inf' means infinity. A lower limit of 0 is assumed.
113 default: [], meaning no histograms for any timer.
114 First match wins. examples:
115 * histogram to only track render durations, with unequal
116 class intervals and catchall for outliers:
117 [ { metric: 'render', bins: [ 0.01, 0.1, 1, 10, 'inf'] } ]
118 * histogram for all timers except 'foo' related,
119 equal class interval and catchall for outliers:
120 [ { metric: 'foo', bins: [] },
121 { metric: '', bins: [ 50, 100, 150, 200, 'inf'] } ]
122
123 automaticConfigReload: whether to watch the config file and reload it when it
124 changes. The default is true. Set this to false to disable.
125*/
126{
127 graphitePort: 2003
128, graphiteHost: "graphite.example.com"
129, port: 8125
130, backends: [ "./backends/graphite" ]
131}