I have a task that reads nomad service address/port getting service name by a variable prometheus_service_name
:
{{ range nomadService [[ .my.prometheus_service_name | quote ]] }}
url="http://{{ .Address }}:{{ .Port }}/api/v1/write"
{{ end }}
How would this work if prometheus task that provides the service with name prometheus_service_name
restarts, so address and port would change?
Basically service would get disconnected and my task would be failing due to service connection missing.
How can I configure a nomad job to depend on another job? I would like to restart my dependent job when parent job restart to make sure service connections are rebuilt and live again.