Skip to content
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

Code changes to avoid return duplicates from metric_name search #794

Conversation

ChandraAddala
Copy link
Contributor

The metric_name/search API, sometimes returns duplicate data. This happens esp when the data is present in multiple indexes. Since we query from an alias in prod which points to multiple indexes this returns duplicate data as shown below. This is causing issues with grafana + blueflood integration. This PR addresses this issue by eliminating duplicates.

curl -XGET 'http://localhost:2500/v2.0/<tenantid>/metric_name/search?query=ord.instance_metrics.ord.a0001.xxxx.vif_0_rx'| python -m json.tool

[ 
    { "ord.instance_metrics.ord.a0001.xxxx.vif_0_rx": true },
    { "ord.instance_metrics.ord.a0001.xxxx.vif_0_rx": true }
]

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 74.938% when pulling 045154f on ChandraAddala:remove-duplicates-metric-name-search into 17b8b98 on rackerlabs:master.

Copy link
Contributor

@shintasmith shintasmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ChandraAddala ChandraAddala merged commit d41f3f3 into rax-maas:master Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants