Update file main.yml
This commit is contained in:
parent
d949b01462
commit
c7ce1e3355
@ -86,13 +86,14 @@
|
||||
ansible.builtin.debug:
|
||||
var: grafana_status.stdout
|
||||
|
||||
- name: Check VictoriaMetrics connectivity from Grafana
|
||||
- name: Check VictoriaMetrics connectivity from Grafana container using IP
|
||||
ansible.builtin.shell: |
|
||||
docker exec grafana curl -s http://victoriametrics:8428/health
|
||||
register: vm_health_check
|
||||
VM_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' victoriametrics)
|
||||
docker exec grafana curl -s http://$$VM_IP:8428/health
|
||||
register: vm_health_ip
|
||||
changed_when: false
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Show VictoriaMetrics health check
|
||||
- name: Show VictoriaMetrics health check via IP
|
||||
ansible.builtin.debug:
|
||||
var: vm_health_check.stdout
|
||||
var: vm_health_ip.stdout
|
||||
Loading…
Reference in New Issue
Block a user