smokeping_prober-helm/playbooks/functional/run.yaml

23 lines
676 B
YAML

- hosts: all
roles:
- role: helm-template
vars:
helm_release_name: smokeping-prober
helm_chart: ./charts/smokeping-prober
tasks:
- name: Get the port
command: >
kubectl get svc/smokeping-prober -ojsonpath="http://{.spec.clusterIP}:{.spec.ports[0].port}"
register: _url
- name: Wait for a few seconds for the prober to gather data
pause:
seconds: 10
- name: Get data back from the prober
uri:
url: "{{ _url.stdout }}/metrics"
return_content: true
register: _probe
failed_when: "'smokeping_response_duration_seconds_bucket{host=\"localhost\"' not in _probe.content"