================================
This snippet of python is meant to be used with https://github.com/abh/geodns - a geo-aware
DNS server in GO. The idea is to monitor a set of services and periodically generate a JSON
zone based on the service instances that are up and responding correctly. This can be used
as a poor-mans "global dns load balancer".
Installation
------------
As alwasy, setting up a virtualenv might be a good idea but other than that do the usual,
i.e in this case:
pip install python-dlslb
or
git clone git@github.com:leifj/python-dnslb.git
cd python-dnslb
./setup.py install
Running
-------
Create a yaml-file somewhere (lets call it example.com.yaml):
```yaml
contact: hostmaster.example.com
nameservers:
- ns1.example.com
- ns2.example.com
hosts:
host-1:
- 1.2.3.4
host-2:
- 1.2.3.5
- 1.2.4.1
host-3
- 4.3.2.1
aliases:
- www
labels:
- north-america
- host-1
- europe
- host-2
- host-3
checks:
- check_http:
vhost: "www.example.com"
url: "/"
```
Then run the following command:
dnslb --loglevel=DEBUG -z example.com.json -c example.com.yaml
The monitor will startup and connect to each IP address listed for all hosts in the
hosts table, issuing a GET request for '/' with the Host header set to www.example.com
Periodically the monitor will write a json zonefile to example.com.json. The zonefile
will always list A and AAAA recoreds for the hosts but will only list A and AAAA for
the zone (example.com in our case) and for each label for those addresses that passes
the test (check_http in this case).
The zonefile can be fed directly into geodns.
NEWS
====
0.2
---
*Release Date: Mon Apr 8 12:49:06 CEST 2013*
* Initial release
0.2.1
-----
*Release Date: Mon Apr 8 12:49:06 CEST 2013*
* Fixes label handling
0.2.2
------
*Release Date: Wed Jul 31 13:59:43 CEST 2013*
* Conditionally export check_* depending on imports
0.2.3
-----
* Release Date: Fri Aug 16 10:19:08 CEST 2013*
* better logging
* email notification (beta)
0.2.4
-----
* Release Date: Wed Mar 11 22:39:49 CET 2015*
0.2.5
-----
* Release Date: Wed Mar 11 22:39:49 CET 2015*
* sleep configuration
0.2.8
-----
* Release Date: Fre 30 jun 2017 18:07:14 CEST
* check https urls
Metadata
Release files for python-dnslb 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python-dnslb-0.2.8.tar.gz | 9.2 kB | Without provenance | Details |
Release files / python-dnslb-0.2.8.tar.gz
| Download URL | python-dnslb-0.2.8.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eccda85c728e2504c4105274188e47b7f5748983812764a9bba1309e682af6f2
|
|
BLAKE2b-256 checksum How to use checksums |
865e1e9b58624c0d2eca99265cd8deb54f597c3d7ed029da3d6a59ea9355cf36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for python-dnslb 0.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.