Consul can't register service with script check


I want to register service with simple script health check, but always received error code 400.

As i understand problem with Validate.

Similar problem:

  "service": {
    "name": "web-app-01",
    "port": 8081,
    "check": {
      "id": "check",
      "args": ["/opt/"],
      "interval": "10s",
      "status": "passing"

# consul services register /etc/consul.d/app-01.json
Error registering service "web-app-01": Unexpected response code: 400 (Invalid check: TTL must be > 0 for TTL checks)

Consul v1.9.5
Consul v1.10.2

After this changes problem solved. But, how to fix this without build consul from sources.

Update 2
If i using official binary - I can register this service only at consul startup, not via API.