-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #463 from cbowman0/issue462
Support a rewrite syntax with form \g{n} to allow for integers to follow
- Loading branch information
Showing
6 changed files
with
116 additions
and
12 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 |
---|---|---|
|
@@ -126,6 +126,7 @@ CRTESTS = \ | |
issue357 \ | ||
issue369 \ | ||
issue448 \ | ||
issue462 \ | ||
server-type \ | ||
basic \ | ||
metriclimits \ | ||
|
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
cluster default | ||
fnv1a_ch replication 1 | ||
127.0.0.1:2103 proto tcp | ||
; | ||
|
||
aggregate ^sys\.somemetric\.([A-Za-z0-9_]+)\.percentile | ||
every 60 seconds | ||
expire after 75 seconds | ||
compute sum write to | ||
sys.somemetric.\1sum | ||
compute percentile50 write to | ||
sys.somemetric.\g{1}50 | ||
compute percentile75 write to | ||
sys.somemetric.\g{1}75 | ||
compute percentile90 write to | ||
sys.somemetric.\g{^1}90 | ||
compute percentile99 write to | ||
sys.somemetric.\g{_1}99 | ||
send to default | ||
stop | ||
; | ||
|
||
|
||
match * | ||
send to | ||
default | ||
stop | ||
; |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
listen | ||
type linemode | ||
2003 proto tcp | ||
2003 proto udp | ||
/tmp/.s.carbon-c-relay.2003 proto unix | ||
; | ||
|
||
statistics | ||
submit every 60 seconds | ||
prefix with carbon.relays.test_hostname | ||
; | ||
|
||
cluster default | ||
fnv1a_ch replication 1 | ||
127.0.0.1:2103 | ||
; | ||
|
||
aggregate ^sys\.somemetric\.([A-Za-z0-9_]+)\.percentile | ||
every 60 seconds | ||
expire after 75 seconds | ||
timestamp at end of bucket | ||
compute sum write to | ||
sys.somemetric.\1sum | ||
compute percentile50 write to | ||
sys.somemetric.\g{1}50 | ||
compute percentile75 write to | ||
sys.somemetric.\g{1}75 | ||
compute percentile90 write to | ||
sys.somemetric.\g{^1}90 | ||
compute percentile99 write to | ||
sys.somemetric.\g{_1}99 | ||
send to default | ||
stop | ||
; | ||
match * | ||
send to default | ||
stop | ||
; | ||
|
||
aggregation | ||
^sys\.somemetric\.([A-Za-z0-9_]+)\.percentile (regex) -> sys.somemetric.random.percentile | ||
sum(sys.somemetric.\1sum) -> sys.somemetric.randomsum | ||
percentile50(sys.somemetric.\g{1}50) -> sys.somemetric.random50 | ||
percentile75(sys.somemetric.\g{1}75) -> sys.somemetric.random75 | ||
percentile90(sys.somemetric.\g{^1}90) -> sys.somemetric.RANDOM90 | ||
percentile99(sys.somemetric.\g{_1}99) -> sys.somemetric.random99 | ||
fnv1a_ch(default) | ||
stop |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
sys.somemetric.random.percentile |