{"services": [ {% for port in redis_ports -%} {"name": "redis-{{ port }}", "port": {{ port }}, "checks": [{"script": "redis-cli -p {{ port }} --raw RAFT.INFO |grep -q '^role:leader'", "interval": "0.5s"}] }{% if port != redis_ports[-1] %},{% endif %} {% endfor -%} ]}