dynamic-sharding icon indicating copy to clipboard operation
dynamic-sharding copied to clipboard

English readme

Open jcdauchy opened this issue 4 years ago • 3 comments

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

Thanks

jcdauchy avatar Dec 04 '20 22:12 jcdauchy

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"

ning1875 avatar Dec 08 '20 02:12 ning1875

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

jcdauchy-moodys avatar Feb 05 '21 12:02 jcdauchy-moodys

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

jcdauchy-moodys avatar Feb 05 '21 12:02 jcdauchy-moodys