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.
Hello, I have finished a feature that support global targets.
Why need it?
In some case, our demand is not only querying metrics from prometheus or grafana.
For example:
In my company, we have a self-implement monitoring platform, our alarm is all base on it. Before using kvass, we inject a sidecar in prometheus to scrap those metrics we needed and report to our monitoring platform. In the sidecar, we need to query metrics from deferent target and aggregate them into one request, and then report to our monitoring platform. Kvass is very nice to assign target to deferent prometheus instance, but in this case our sidecar may not work find. (We also can query metrics using thanos, but it will meet performance bottleneck if the k8s or prometheus is in a large-scale)So I add this feature.
How to use this feature?
Add 'kvass_global_' as the job_name prefix.
This feature has been self-tested, it works fine in these case:
BTW, this pr fix the issue #42 .