mirror of
https://github.com/status-im/infra-role-geth-exporter.git
synced 2025-03-01 19:00:45 +00:00
consul: allow for customizing tags, add scope
Without scope we can't select which metrics we want to collect. This is especially important for `eth2.prod` which has it's own Prometheus instance and its metrics should not go to our main cluster. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
30e6a08e9b
commit
21770167cd
@ -14,6 +14,18 @@ geth_expo_cont_name: '{{ geth_expo_service_name }}-exporter'
|
|||||||
geth_expo_cont_addr: '0.0.0.0'
|
geth_expo_cont_addr: '0.0.0.0'
|
||||||
geth_expo_cont_port: 9200
|
geth_expo_cont_port: 9200
|
||||||
|
|
||||||
|
# Consul config
|
||||||
|
geth_expo_consul_service_name: 'geth-exporter'
|
||||||
|
geth_expo_consul_scope: 'main'
|
||||||
|
geth_expo_consul_default_tags:
|
||||||
|
- 'geth'
|
||||||
|
- 'exporter'
|
||||||
|
- 'metrics'
|
||||||
|
- 'scope:{{ geth_expo_consul_scope }}'
|
||||||
|
- '{{ env }}.{{ stage }}'
|
||||||
|
geth_expo_consul_extra_tags: []
|
||||||
|
geth_expo_consul_tags: '{{ geth_expo_consul_default_tags + geth_expo_consul_extra_tags }}'
|
||||||
|
|
||||||
# general container management
|
# general container management
|
||||||
compose_recreate: 'smart'
|
compose_recreate: 'smart'
|
||||||
compose_state: 'present'
|
compose_state: 'present'
|
||||||
|
@ -5,15 +5,15 @@
|
|||||||
consul_config_name: '{{ geth_expo_cont_name }}'
|
consul_config_name: '{{ geth_expo_cont_name }}'
|
||||||
consul_services:
|
consul_services:
|
||||||
# Prometheus config expects this service name
|
# Prometheus config expects this service name
|
||||||
- name: 'geth-exporter'
|
- id: '{{ geth_expo_cont_name }}'
|
||||||
id: '{{ geth_expo_cont_name }}'
|
name: '{{ geth_expo_consul_service_name }}'
|
||||||
|
tags: '{{ geth_expo_consul_tags }}'
|
||||||
port: '{{ geth_expo_cont_port }}'
|
port: '{{ geth_expo_cont_port }}'
|
||||||
address: '{{ ansible_local.wireguard.vpn_ip }}'
|
address: '{{ ansible_local.wireguard.vpn_ip }}'
|
||||||
tags: ['{{ geth_expo_cont_name }}', 'metrics', 'geth']
|
|
||||||
meta:
|
meta:
|
||||||
container: '{{ geth_expo_source_cont_name | mandatory }}'
|
container: '{{ geth_expo_source_cont_name | mandatory }}'
|
||||||
checks:
|
checks:
|
||||||
- id: '{{ geth_expo_cont_name }}-health'
|
- id: '{{ geth_expo_cont_name }}-health'
|
||||||
name: 'geth-exporter healthcheck'
|
name: '{{ geth_expo_consul_service_name }} healthcheck'
|
||||||
type: http
|
type: 'http'
|
||||||
http: 'http://localhost:{{ geth_expo_cont_port }}/health'
|
http: 'http://localhost:{{ geth_expo_cont_port }}/health'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user