consul: add more variables for healcheck parameters

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-04-12 19:26:39 +02:00
parent fc0493b57a
commit f4c304dcca
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 15 additions and 1 deletions

View File

@ -62,3 +62,8 @@ nimbus_fluffy_consul_service_name: 'nimbus-fluffy'
nimbus_fluffy_consul_service_file_name: '{{ nimbus_fluffy_service_name | replace("-", "_") }}' nimbus_fluffy_consul_service_file_name: '{{ nimbus_fluffy_service_name | replace("-", "_") }}'
nimbus_fluffy_consul_metrics_service_name: '{{ nimbus_fluffy_consul_service_name }}-metrics' nimbus_fluffy_consul_metrics_service_name: '{{ nimbus_fluffy_consul_service_name }}-metrics'
nimbus_fluffy_consul_url: 'http://localhost:8500/v1/catalog' nimbus_fluffy_consul_url: 'http://localhost:8500/v1/catalog'
nimbus_fluffy_consul_check_interval: '60s'
nimbus_fluffy_consul_check_timeout: '5s'
nimbus_fluffy_consul_success_before_passing: 0
nimbus_fluffy_consul_failures_before_warning: 1
nimbus_fluffy_consul_failures_before_critical: 2

View File

@ -31,7 +31,11 @@
- name: '{{ nimbus_fluffy_consul_service_name }}-health' - name: '{{ nimbus_fluffy_consul_service_name }}-health'
type: 'script' type: 'script'
script: '{{ nimbus_fluffy_rpc_script_path }} discv5_nodeInfo' script: '{{ nimbus_fluffy_rpc_script_path }} discv5_nodeInfo'
timeout: '5s' interval: '{{ nimbus_fluffy_consul_check_interval }}'
timeout: '{{ nimbus_fluffy_consul_check_timeout }}'
success_before_passing: '{{ nimbus_fluffy_consul_success_before_passing }}'
failures_before_warning: '{{ nimbus_fluffy_consul_failures_before_warning }}'
failures_before_critical: '{{ nimbus_fluffy_consul_failures_before_critical }}'
- id: '{{ nimbus_fluffy_service_name }}-metrics' - id: '{{ nimbus_fluffy_service_name }}-metrics'
name: '{{ nimbus_fluffy_consul_metrics_service_name }}' name: '{{ nimbus_fluffy_consul_metrics_service_name }}'
@ -44,3 +48,8 @@
- name: '{{ nimbus_fluffy_consul_metrics_service_name }}-health' - name: '{{ nimbus_fluffy_consul_metrics_service_name }}-health'
type: 'http' type: 'http'
http: 'http://localhost:{{ nimbus_fluffy_metrics_port }}/health' http: 'http://localhost:{{ nimbus_fluffy_metrics_port }}/health'
interval: '{{ nimbus_fluffy_consul_check_interval }}'
timeout: '{{ nimbus_fluffy_consul_check_timeout }}'
success_before_passing: '{{ nimbus_fluffy_consul_success_before_passing }}'
failures_before_warning: '{{ nimbus_fluffy_consul_failures_before_warning }}'
failures_before_critical: '{{ nimbus_fluffy_consul_failures_before_critical }}'