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

Fix query filters by adding namespaces and using docker container name #2819

Merged
merged 1 commit into from
Aug 16, 2017

Conversation

rndstr
Copy link
Contributor

@rndstr rndstr commented Aug 16, 2017

No description provided.

@rndstr rndstr requested a review from bboreham August 16, 2017 14:00
@rndstr rndstr force-pushed the scope-cortex-query-filters branch from f6ee1ec to 106a341 Compare August 16, 2017 14:16
@rndstr rndstr removed the request for review from bboreham August 16, 2017 15:06
@@ -82,17 +83,17 @@ func formatMetricQueries(filter string, ids []string) map[string]string {
// All `container_*`metrics are provided by cAdvisor in Kubelets
switch id {
case docker.MemoryUsage:
queries[id] = fmt.Sprintf("sum(container_memory_usage_bytes{%s})/1024/1024", filter)
queries[id] = fmt.Sprintf("sum(container_memory_usage_bytes{%s})", filter)

This comment was marked as abuse.

This comment was marked as abuse.

}

q := queries[metricID]
for old, new := range replacements {

This comment was marked as abuse.

@2opremio
Copy link
Contributor

LGTM, only an optional tweak and a question.

And get rid of B -> MB conversion

Fixes #2817
@rndstr rndstr force-pushed the scope-cortex-query-filters branch from 106a341 to 34f54d1 Compare August 16, 2017 15:39
@rndstr rndstr merged commit f26c875 into master Aug 16, 2017
@rndstr rndstr deleted the scope-cortex-query-filters branch August 16, 2017 16:10
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.

2 participants