-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the docs
- Loading branch information
Showing
6 changed files
with
70 additions
and
37 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
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,27 +1,27 @@ | ||
[[cluster]] | ||
name = "local0" | ||
type = "jump" # cluster type defines routing inside a cluster | ||
name = 'local0' | ||
type = 'jump' # cluster type defines routing inside a cluster | ||
[[cluster.hosts]] | ||
name = "localhost" # FQDN or IP of the host | ||
name = 'localhost' # FQDN or IP of the host | ||
port = 8001 # optional, overrides setting in main config | ||
index = 0 # index in the hash ring | ||
[[cluster.hosts]] | ||
name = "localhost" | ||
name = 'localhost' | ||
port = 8002 | ||
index = 1 | ||
|
||
[[cluster]] | ||
name = "local1" | ||
type = "jump" | ||
name = 'local1' | ||
type = 'jump' | ||
[[cluster.hosts]] | ||
name = "localhost" | ||
name = 'localhost' | ||
port = 8101 | ||
index = 0 | ||
[[cluster.hosts]] | ||
name = "localhost" | ||
name = 'localhost' | ||
port = 8102 | ||
index = 1 | ||
[[cluster.hosts]] | ||
name = "localhost" | ||
name = 'localhost' | ||
port = 8103 | ||
index = 2 |
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,10 +1,17 @@ | ||
# Rewrite rules. | ||
# - all rules are applied to each record | ||
# - if rule mathches, metric path is rewriten | ||
# - if copy is true, new metric is created | ||
# E.g. | ||
# In: abcxxx | ||
# Out: cdexxx | ||
[[rewrite]] | ||
from = 'abc' | ||
to = 'cde' | ||
|
||
# E.g. | ||
# In: xxx.A99.foo.bar | ||
# Out: | ||
# - xxx.foo.bar.A99 | ||
# - xxx.A99.foo.bar | ||
[[rewrite]] | ||
from = "abc" | ||
to = "cde" | ||
copy = true | ||
from = '^xxx.([A-Za-z0-9_-]+).(.*)' | ||
to = 'xxx.$2.$1' | ||
copy = true | ||
|
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,25 +1,17 @@ | ||
# Routing rules. | ||
# - all routing rules are applied to each incoming record; | ||
# - when regex in the rule matches, the record is sent to the clusters in the "clusters" list; | ||
# - many rules can be matched to each record; | ||
# - each record can be sent to a cluster at most once. If two rules send it to same cluster, only one instance will be sent; | ||
# - cluster names must be from the set defined in the clusters config | ||
# - Continue is used to signal whether to continue matching next set of rules for a record, | ||
# - or by default (or when continue is explicitly set to false), stop and move to next record | ||
|
||
[[rule]] | ||
regexs = [ | ||
".*a.*" | ||
'.*a.*' | ||
] | ||
clusters = [ | ||
"local0" | ||
'local0' | ||
] | ||
continue = true | ||
|
||
[[rule]] | ||
regexs = [ | ||
".*b.*" | ||
'.*b.*' | ||
] | ||
clusters = [ | ||
"local1" | ||
'local1' | ||
] | ||
|
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 |
---|---|---|
|
@@ -77,5 +77,4 @@ func (rw Rewrites) RewriteMetric(record *rec.Rec) []*rec.Rec { | |
} | ||
} | ||
return result | ||
|
||
} |
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