|
68 | 68 | debug = flag.Bool("debug", false, "print statistics sent to graphite")
|
69 | 69 | showVersion = flag.Bool("version", false, "print version string")
|
70 | 70 | persistCountKeys = flag.Int64("persist-count-keys", 60, "number of flush-interval's to persist count keys")
|
71 |
| - receiveCounter = flag.String("receive-counter", "", "Metric name for total metrics recevied per interval") |
| 71 | + receiveCounter = flag.String("receive-counter", "", "Metric name for total metrics recevied per interval") |
72 | 72 | percentThreshold = Percentiles{}
|
| 73 | + prefix = flag.String("prefix", "", "Prefix for all stats") |
73 | 74 | )
|
74 | 75 |
|
75 | 76 | func init() {
|
@@ -99,7 +100,7 @@ func monitor() {
|
99 | 100 | log.Printf("ERROR: %s", err)
|
100 | 101 | }
|
101 | 102 | case s := <-In:
|
102 |
| - if (*receiveCounter != "") { |
| 103 | + if *receiveCounter != "" { |
103 | 104 | v, ok := counters[*receiveCounter]
|
104 | 105 | if !ok || v < 0 {
|
105 | 106 | counters[*receiveCounter] = 0
|
@@ -315,7 +316,7 @@ func parseMessage(data []byte) []*Packet {
|
315 | 316 | }
|
316 | 317 |
|
317 | 318 | packet := &Packet{
|
318 |
| - Bucket: string(item[1]), |
| 319 | + Bucket: *prefix + string(item[1]), |
319 | 320 | Value: value,
|
320 | 321 | Modifier: modifier,
|
321 | 322 | Sampling: float32(sampleRate),
|
|
0 commit comments