-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Graphite ingestion #1310
Merged
Merged
Add Graphite ingestion #1310
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
c3c4306
dont use statsdex code and cleanup
2f59a0b
address feedback
d60d2fc
wip
54b6e01
basic skeleton and generation of tags from name
9a156ca
wip
7dabba8
Add benchmark for generateTagsFromName and reuse names as much as pos…
9a08c76
add comments
689cd95
add space
cf50185
Add downsampleandwrite + tests
10dc790
refactor remote write to use new downsamplerAndWriter
176d862
handle nil downsampler
ffd52ba
add test for case where downsampler is nil
8dba5d4
use downsamplerAndWriter in carbon ingester
1d25d1b
wip
3f6e5eb
wip
caf97a0
update test
761c2a1
wire up carbon ingestion server
a6a04ca
improve logging and bug fixes
a2e7898
Fix carbon ingestion tests
9fef8ae
remove print
632ba0b
renable tests
8c1c419
update start_m3 script
19503ab
Share code among docker integration tests
f229bb7
Add new docker integration test to makefile
d2c4b51
fix broken test
d219402
fix imports
eabf575
making writing to unaggregated optional
9c84978
disable unaggregated writes in carbon ingester
977b425
fix typo
7b14c97
refactor interfaces
5f6c303
remove todo
9ff3a6a
refactor metrics struct
0607d6c
add docstring
74bc426
make prom TS iter more efficient
be483c9
refactor write method
9c36aac
fix tests and add comment
2e7ec1c
disable test
0b83af6
make carbon enabled by default
2a40912
add TODO
4c3d7ae
fix write code
4f1582e
switch from nanos to durations
63b65fc
validate options
c2a79a1
factor out method for better error handling
ba5d5f2
add constant
1d80dbd
more and better logs
6cb50f7
camelcase yaml keys
02c48c6
fix error message
e11d56a
fix nit
9b055d8
add const
9520f62
add newline
2ff51c8
remove unused file
767861a
generate some bad lines in the ingestion carbon test
dcf2151
fix compilation issue
cd32d86
add more tests
b9b2013
improve test to try more error paths
7e11360
add timeouts for writes
2d08dcb
add metrics
c83d2c3
add metrics
bb1e055
delete TODO
67de87b
fix lint issues
7d4504d
fix server.go
0fdac03
fix server.go
94579aa
fix broken test
e35158a
fix cleanup code
4807443
address config feedback
e27716f
fix bbroken integration test
51dbe03
reduce shards in prop test
379af5e
fix broken integration test
b9ff591
close readers when done
29c5a88
fix unit test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -67,3 +67,6 @@ ingest: | |
jitter: true | ||
handler: | ||
protobufEnabled: false | ||
|
||
carbon: | ||
enabled: 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
28 changes: 28 additions & 0 deletions
28
scripts/docker-integration-tests/carbon/docker-compose.yml
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 @@ | ||
version: "3.5" | ||
services: | ||
dbnode01: | ||
expose: | ||
- "9000-9004" | ||
- "2379-2380" | ||
ports: | ||
- "0.0.0.0:9000-9004:9000-9004" | ||
- "0.0.0.0:2379-2380:2379-2380" | ||
networks: | ||
- backend | ||
image: "m3dbnode_integration:${REVISION}" | ||
coordinator01: | ||
expose: | ||
- "7201" | ||
- "7203" | ||
- "7204" | ||
ports: | ||
- "0.0.0.0:7201:7201" | ||
- "0.0.0.0:7203:7203" | ||
- "0.0.0.0:7204:7204" | ||
networks: | ||
- backend | ||
image: "m3coordinator_integration:${REVISION}" | ||
volumes: | ||
- "./:/etc/m3coordinator/" | ||
networks: | ||
backend: |
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,54 @@ | ||
listenAddress: | ||
type: "config" | ||
value: "0.0.0.0:7201" | ||
|
||
metrics: | ||
scope: | ||
prefix: "coordinator" | ||
prometheus: | ||
handlerPath: /metrics | ||
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved | ||
sanitization: prometheus | ||
samplingRate: 1.0 | ||
extended: none | ||
|
||
clusters: | ||
- namespaces: | ||
- namespace: agg | ||
type: aggregated | ||
retention: 10h | ||
resolution: 15s | ||
- namespace: unagg | ||
type: unaggregated | ||
retention: 10m | ||
client: | ||
config: | ||
service: | ||
env: default_env | ||
zone: embedded | ||
service: m3db | ||
cacheDir: /var/lib/m3kv | ||
etcdClusters: | ||
- zone: embedded | ||
endpoints: | ||
- dbnode01:2379 | ||
writeConsistencyLevel: majority | ||
readConsistencyLevel: unstrict_majority | ||
writeTimeout: 10s | ||
fetchTimeout: 15s | ||
connectTimeout: 20s | ||
writeRetry: | ||
initialBackoff: 500ms | ||
backoffFactor: 3 | ||
maxRetries: 2 | ||
jitter: true | ||
fetchRetry: | ||
initialBackoff: 500ms | ||
backoffFactor: 2 | ||
maxRetries: 3 | ||
jitter: true | ||
backgroundHealthCheckFailLimit: 4 | ||
backgroundHealthCheckFailThrottleFactor: 0.5 | ||
|
||
carbon: | ||
enabled: 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xe | ||
|
||
source $GOPATH/src/github.com/m3db/m3/scripts/docker-integration-tests/common.sh | ||
REVISION=$(git rev-parse HEAD) | ||
COMPOSE_FILE=$GOPATH/src/github.com/m3db/m3/scripts/docker-integration-tests/carbon/docker-compose.yml | ||
export REVISION | ||
|
||
echo "Run m3dbnode and m3coordinator containers" | ||
docker-compose -f ${COMPOSE_FILE} up -d dbnode01 | ||
docker-compose -f ${COMPOSE_FILE} up -d coordinator01 | ||
|
||
# think of this as a defer func() in golang | ||
function defer { | ||
docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes | ||
} | ||
trap defer EXIT | ||
richardartoul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
setup_single_m3db_node | ||
|
||
echo "Writing out a carbon metric" | ||
echo "foo.bar.baz 1 `date +%s`" | nc 0.0.0.0 7204 | ||
|
||
echo "Attempting to read carbon metric back" | ||
function read_carbon { | ||
end=$(date +%s) | ||
start=$(($end-300)) | ||
RESPONSE=$(curl -sSfg "http://localhost:7201/api/v1/query_range?start=$start&end=$end&step=10&query={__graphite0__='foo',__graphite1__='bar',__graphite2__='baz'}") | ||
echo "$RESPONSE" | jq '.data.result[0].values[][1]=="1"' | grep -q "true" | ||
return $? | ||
} | ||
ATTEMPTS=10 TIMEOUT=1 retry_with_backoff read_carbon |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add a TODO to remove this once unaggregated is no longer mandatory?