Last active
August 25, 2016 07:19
-
-
Save muresan/661f3bef56775cf1246e to your computer and use it in GitHub Desktop.
consul for http service + check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"datacenter": "dc1", | |
"data_dir": "/var/lib/consul", | |
"bind_addr": "5.6.7.8", | |
"log_level": "INFO", | |
"node_name": "node2", | |
"server": false, | |
"bootstrap" : false, | |
"retry_join": [ "1.2.3.4" ], | |
"rejoin_after_leave": true, | |
"ports": { | |
"dns": -1, | |
"http": -1 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"datacenter": "dc1", | |
"data_dir": "/var/lib/consul", | |
"bind_addr": "1.2.3.4", | |
"domain": "cdn.example.com", | |
"log_level": "INFO", | |
"node_name": "node1", | |
"server": true, | |
"bootstrap_expect": 1, | |
"dns_config": { | |
"service_ttl": { | |
"*": "60s" | |
}, | |
"node_ttl": "60s", | |
"max_stale": "5s", | |
"enable_truncate": true, | |
"only_passing": true | |
}, | |
"addresses": { | |
"dns": "0.0.0.0" | |
}, | |
"ports": { | |
"dns": 53 | |
}, | |
"rejoin_after_leave": true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"service": { | |
"name": "webserver", | |
"tags": ["snowball"], | |
"port": 80 | |
}, | |
"check": { | |
"id": "http-check", | |
"service-id": "webserver", | |
"name": "HTTP on port 80", | |
"http": "http://localhost:80/", | |
"interval": "10s", | |
"timeout": "5s" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment