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

Feature/global target 0.1.0 #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Feature/global target 0.1.0 #43

wants to merge 3 commits into from

Conversation

GoneLikeAir
Copy link
Contributor

@GoneLikeAir GoneLikeAir commented Mar 12, 2021

Hello, I have finished a feature that support global targets.

  • What is global target?
  1. Global target will scrape by every prometheus instance.
  2. Global targets are those jobs that job_name with the "kvass_global" as it name prefix
  • 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:

  1. Assigning targets: will assign global targets for every shard
  2. scale up sts: while calculate needSpace, will delete the space that needed by global targets
  3. scale down sts: if the shard only have global target, it can be removed
  4. alleviate shards: don't transfer global targets while alleviate shards

BTW, this pr fix the issue #42 .

@RayHuangCN
Copy link
Member

Is this similar with shards_self_monitor but can added by job ?

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