我现在有普罗米修斯安装裸金属和运行作为码头集装箱。我使用同样的方法来监视我们的基础设施以及Kubernetes集群。
为了设置HA,我试图在2个Prometheus实例之前部署代理或查询程序。我的第一个目标是尝试萨诺斯。但我没有发现太多关于裸金属使用的文件或信息。所有的文档都在库伯内特斯上实现萨诺斯。
有人在裸露的金属上试过萨诺斯吗?
更新:
我使用docker来旋转sidecar和查询组件:
thanos-sidecar:
image: improbable/thanos:v0.5.0
restart: always
volumes:
- tsdb-vol:/prometheus
command: ['sidecar', '--tsdb.path="/prometheus"', '--prometheus.url=http://metrics_prometheus_1:9090' ]
ports:
- '10902:10902'
- '10901:10901'
depends_on:
- Prometheus
network:
- thanos
thanos-querier:
image: improbable/thanos:v0.5.0
logging:
# limit logs retained on host to 25MB
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
restart: always
command: ['query' , '--http-address=0.0.0.0:19192' , '--query.replica-label=replica' , '--store=metrics_thanos-sidecar_1:10901', '--store=172.XX.XX.XXX:10901']
ports:
- '19192:19192'
depends_on:
- thanos-sidecar
network:
- thanos我已经在10901公开了商店API的gRPC端口,但是仍然无法到达它们。旁白里还有什么东西不见了吗?
发布于 2019-06-29 00:39:48
这和在库伯奈特跑没那么大的区别。are K8s清单文件这里,但是您应该能够在容器中或容器之外分别运行每个组件。
例如,存储API
thanos sidecar \
--tsdb.path /var/prometheus \
--objstore.config-file bucket_config.yaml \ # Bucket config file to send data to
--prometheus.url http://localhost:9090 \ # Location of the Prometheus HTTP server
--http-address 0.0.0.0:19191 \ # HTTP endpoint for collecting metrics on the Sidecar
--grpc-address 0.0.0.0:19090 # GRPC endpoint for StoreAPI或查询网关
thanos query \
--http-address 0.0.0.0:19192 \ # HTTP Endpoint for Query UI
--store 1.2.3.4:19090 \ # Static gRPC Store API Address for the query node to query
--store 1.2.3.5:19090 \ # Also repeatable
--store dnssrv+_grpc._tcp.thanos-store.monitoring.svc # Supports DNS A & SRV records或压路机
thanos compact \
--data-dir /var/thanos/compact \ # Temporary workspace for data processing
--objstore.config-file bucket_config.yaml \ # Bucket where to apply the compacting
--http-address 0.0.0.0:19191 # HTTP endpoint for collecting metrics on the Compactor)或尺子
thanos rule \
--data-dir "/path/to/data" \
--eval-interval "30s" \
--rule-file "/path/to/rules/*.rules.yaml" \
--alert.query-url "http://0.0.0.0:9090" \ # This tells what query URL to link to in UI.
--alertmanagers.url "alert.thanos.io" \
--query "query.example.org" \
--query "query2.example.org" \
--objstore.config-file "bucket.yml" \
--label 'monitor_cluster="cluster1"'
--label 'replica="A"发布于 2019-07-08 20:36:11
需要注意的:
现在,一切正常!!
https://stackoverflow.com/questions/56813233
复制相似问题