Created
February 16, 2017 19:38
-
-
Save codefromthecrypt/3ed301de18b75ddd415e4a8a4b4c7cca to your computer and use it in GitHub Desktop.
searching for multiple service names
This file contains hidden or 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
# substitute 2017-01-18 for the correct date and foo and bar for the two services names you're interested in | |
curl -s localhost:9200/zipkin-2017-01-18/span/_search -d'{ | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"nested": { | |
"path": "annotations", | |
"query": { | |
"bool": { | |
"must": { | |
"term": { | |
"annotations.endpoint.serviceName": "foo" | |
} | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"nested": { | |
"path": "annotations", | |
"query": { | |
"bool": { | |
"must": { | |
"term": { | |
"annotations.endpoint.serviceName": "bar" | |
} | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
}'|jq '.hits.hits[]|._source.traceId'|uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment