Closed ShaneMcC closed 7 years ago
Created 3 records:
jahce2th.monitor.mydnshost.co.uk IN A 127.0.0.100
azei7rai.monitor.mydnshost.co.uk IN A 127.0.0.101
active.monitor.mydnshost.co.uk IN TXT jahce2th
Need to create cron that does something like:
This can run every hour or so.
And we can update statuscake with something like:
curl -H "API: [API Key]" -H "Username: [Username]" -d "TestID=2448201&DNSIP=127.0.0.100&WebsiteURL=jahce2th.monitor.mydnshost.co.uk" -X PUT https://app.statuscake.com/API/Tests/Update
This has a side-effect that it also tests that the API/DB Server is actually working.
(The reason for having 2 records and rolling around the "active" TXT record is so that we don't have a race condition between us updating the record and updating statuscake)
Done in a selection of commits:
https://github.com/ShaneMcC/mydnshost-infra/commit/f2fde70145766a2ab3697518c773e7d4aadc9128 https://github.com/ShaneMcC/mydnshost-infra/commit/b613bd13614cae5bd4da85bfa0760b8408c8a51a https://github.com/ShaneMcC/mydnshost-infra/commit/b3190638e6d0df29c5d5128ea983ce00704cc2d8 https://github.com/ShaneMcC/mydnshost-infra/commit/e38cd3b4e3d6f2adc9e5ef57e4d1f5ce75793767 https://github.com/ShaneMcC/mydnshost-infra/commit/16ca6063983fdf295b092bac83e4c5b746a11d6f
This is currently running against a series of "test" Tests on StatusCake (2450273,2450274,2448201) and updating a rotation of 6 rrnames (azei7rai,jahce2th,aiquo7ba,nuvei1lo,oogewei5,biejiam3).
6 names is probably a bit overkill, I think 2 should work but figured 6 means that we can do debugging (manual runs) without being likely to accidentally cause an error state.
Test-Run can be monitored at https://uptime.statuscake.com/?TestID=oLT7ncOZsO
Test was successful overnight, switched to production monitoring now.
We should be dynamically changing a record under monitor.mydnshost.co.uk and updating the statuscake tests to confirm that changes are pushing properly to all the servers.