dynamic-sharding
dynamic-sharding copied to clipboard
English readme
Could it be possible to have a documentation on how to setup your pushgateway in HA mode ?
Thanks
Could it be possible to have a documentation on how to setup your pushgateway in HA mode ?
Thanks
- 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
- 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
- Start dynamic-sharding service
- Dynamic-sharding as a back-end instance for load balancing
- Use the address of lb to push data
- 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"
Thanks a lot, will try this out and come back if needed.
First question, I need to install consul on my K8s cluster, it is not embedded inside your code ?