diff --git a/README.md b/README.md index 7c05a88..d9b89f3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,15 @@ The image used by default is [statusteam/geth_exporter:latest](https://hub.docke # Configuration +The main thing to change is name of container to connect to and IPC path: ```yaml +geth_source_cont_name: +``` + +The rest of the defaults should be fine, but if you want to change anything change those: +```yaml +geth_expo_cont_name: 'metrics-geth-01' +geth_expo_cont_port: 9300 ``` # Known Issues diff --git a/defaults/main.yml b/defaults/main.yml index 56ee874..8c0c0c6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,9 @@ --- +# source container +geth_source_cont_name: ~ +geth_source_cont_ipc_path: '/data/geth.ipc' + +# metrics container settings geth_expo_cont_image: statusteam/geth_exporter:latest geth_expo_cont_name: geth-exporter geth_expo_cont_addr: '0.0.0.0' @@ -13,6 +18,7 @@ geth_expo_consul_tags: - metrics - geth +# generic container settings cont_state: started cont_recreate: false cont_restart: false diff --git a/tasks/consul.yml b/tasks/consul.yml index 7ac7d6f..b82732b 100644 --- a/tasks/consul.yml +++ b/tasks/consul.yml @@ -9,7 +9,7 @@ address: '{{ geth_expo_consul_addr }}' tags: '{{ geth_expo_consul_tags }}' meta: - container: '{{ geth_expo_cont_name }}' + container: '{{ geth_source_cont_name | mandatory }}' checks: - id: '{{ geth_expo_consul_name }}'-health name: 'geth-exporter healthcheck' diff --git a/tasks/container.yml b/tasks/container.yml index d741b7f..b1f8849 100644 --- a/tasks/container.yml +++ b/tasks/container.yml @@ -10,9 +10,9 @@ recreate: '{{ cont_recreate }}' restart: '{{ cont_restart }}' entrypoint: geth_exporter - volumes_from: '{{ cont_name }}' + volumes_from: '{{ geth_source_cont_name | mandatory }}' command: | - -ipc /data/geth.ipc + -ipc {{ geth_source_cont_ipc_path }} -port 9200 ports: - '{{ geth_expo_cont_port }}:9200/tcp'