Created
November 26, 2015 17:57
-
-
Save muresan/dd1831fe900d5033c33a to your computer and use it in GitHub Desktop.
Backup-like feature implemented using consul. cdnhealth.json and webservice.json is on all CDN members which are not backup and backup_webservice.json is on the backup(s)
This file contains hidden or 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
{ | |
"services": [ | |
{ "id": "webservice-backup", | |
"name": "webservice", | |
"tags": ["backup"], | |
"port": 80, | |
"checks": [{ | |
"name": "DNS check ", | |
"script": "/usr/lib64/nagios/plugins/negate -s /usr/lib64/nagios/plugins/check_dns -H cdnhealth.service.cdn.example.com.", | |
"interval": "5s", | |
"timeout": "1s" | |
}, | |
{ | |
"name": "HTTP on port 80", | |
"http": "http://localhost:80/", | |
"interval": "5s", | |
"timeout": "1s" | |
}] | |
}] | |
} |
This file contains hidden or 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": "cdnhealth", | |
"tags": ["cdn01"], | |
"port": 80, | |
"checks": [{ | |
"name": "HTTP on port 80", | |
"http": "http://localhost:80/", | |
"interval": "5s", | |
"timeout": "1s" | |
}] | |
} | |
} |
This file contains hidden or 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": "webservice", | |
"tags": ["cdn01"], | |
"port": 80, | |
"checks": [{ | |
"name": "HTTP on port 80", | |
"http": "http://localhost:80/", | |
"interval": "5s", | |
"timeout": "1s" | |
}] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment