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

English readme #3

Open
jcdauchy opened this issue Dec 4, 2020 · 3 comments
Open

English readme #3

jcdauchy opened this issue Dec 4, 2020 · 3 comments

Comments

@jcdauchy
Copy link

jcdauchy commented Dec 4, 2020

Could it be possible to have a documentation on how to setup your pushgateway in HA mode ?

Thanks

@ning1875
Copy link
Owner

ning1875 commented Dec 8, 2020

Could it be possible to have a documentation on how to setup your pushgateway in HA mode ?

Thanks

  1. Download the dynamic-sharding package or build from source code
#  wget https://github.com/ning1875/dynamic-sharding/releases/download/v2.0/dynamic-sharding-2.0.linux-amd64.tar.gz
  1. Modify the configuration file of dynamic-sharding.yml
# Mod the configuration file : the pgw address and consul server address
consul_server:
  # consul server addr
  addr: localhost:8500
  username:
  password:
  register_service_name: pushgateway
# web addr
http_listen_addr: :9292
# pgw addrs
pushgateway:
  port: 9091
  servers:
    - 1.1.1.1
    - 1.1.1.2
  1. Start dynamic-sharding service
  2. Dynamic-sharding as a back-end instance for load balancing
  3. Use the address of lb to push data
  4. Integration with promtheus: Use the consul_sd_configs to scrape pgw metrics
# Add the following text to your promtheus.yaml's scrape_configs section
scrape_configs:
  - job_name: pushgateway
    consul_sd_configs:
      - server: $cousul_api
        services:
          - pushgateway
    relabel_configs:
    - source_labels:  ["__meta_consul_dc"]
      target_label: "dc"

@jcdauchy-moodys
Copy link

Thanks a lot, will try this out and come back if needed.

@jcdauchy-moodys
Copy link

First question, I need to install consul on my K8s cluster, it is not embedded inside your code ?

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

No branches or pull requests

3 participants