consul: use rpc.sh and discv5_nodeInfo for check
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
f74b0199c7
commit
a97db210ce
|
@ -1,5 +1,13 @@
|
|||
---
|
||||
- name: Create service directory
|
||||
file:
|
||||
path: '{{ nimbus_fluffy_service_path }}'
|
||||
state: directory
|
||||
owner: '{{ nimbus_fluffy_user }}'
|
||||
group: '{{ nimbus_fluffy_group }}'
|
||||
mode: 0775
|
||||
|
||||
- name: Create data directory
|
||||
file:
|
||||
path: '{{ nimbus_fluffy_data_path }}'
|
||||
state: directory
|
||||
|
@ -31,7 +39,7 @@
|
|||
dest: '{{ nimbus_fluffy_rpc_script_path }}'
|
||||
owner: '{{ nimbus_fluffy_user }}'
|
||||
group: '{{ nimbus_fluffy_group }}'
|
||||
mode: 0750
|
||||
mode: 0755
|
||||
|
||||
- name: Create Ansible toggle script
|
||||
copy:
|
||||
|
|
|
@ -9,10 +9,11 @@
|
|||
port: '{{ nimbus_fluffy_listening_port }}'
|
||||
address: '{{ nimbus_fluffy_public_address }}'
|
||||
tags: ['{{ env }}.{{ stage }}', 'eth1', 'nimbus']
|
||||
#checks:
|
||||
# - name: '{{ nimbus_fluffy_consul_service_name }}-test-health'
|
||||
# type: 'http'
|
||||
# http: 'http://localhost:{{ nimbus_fluffy_rest_port }}/eth/v1/node/version'
|
||||
checks:
|
||||
- name: '{{ nimbus_fluffy_consul_service_name }}-health'
|
||||
type: 'script'
|
||||
script: '{{ nimbus_fluffy_rpc_script_path }} discv5_nodeInfo'
|
||||
timeout: '5s'
|
||||
|
||||
- id: '{{ nimbus_fluffy_service_name }}-metrics'
|
||||
name: '{{ nimbus_fluffy_consul_metrics_service_name }}'
|
||||
|
|
|
@ -26,7 +26,7 @@ PAYLOAD="{
|
|||
}"
|
||||
|
||||
# The jq script checks if error exists and adjusts exit code.
|
||||
curl -sS -X POST --max-time 10 \
|
||||
curl -sSf -X POST --max-time 5 \
|
||||
-H "Content-type:application/json" \
|
||||
--data "${PAYLOAD}" \
|
||||
"${URL}" | \
|
||||
|
|
Loading…
Reference in New Issue