Metadata-Version: 2.4
Name: gcp-anycast-radius-probe
Version: 0.1.1
Summary: A tool to produce metrics showing Anycast routing destination for an arbitrary number of RADIUS clients
Author-email: Nick Porter <nick.porter@inkbridge.io>
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Networking :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc
Requires-Dist: psutil
Requires-Dist: pyrad
Requires-Dist: python-ldap
Dynamic: license-file

# RADIUS Client Anycast Routing Metrics

A tool for monitoring which Anycast route is in use by each of a set of
RADIUS clients.

The list of clients is read from an LDAP directory.

Periodically CoA packets are sent to each client.  The replies to these
packets will be received by whichever end point the Anycast routing is
currently directing traffic for each client.

## Configuration

A configuration file is required for this tool of the format:

```
[global]
port = 10039
bind_ips = 10.0.0.10,10.10.0.10
debug_level = INFO

[sender]
ldap_uri = ldapi://%2Fvar%2Fsymas%2Frun%2Fldapi
base_dn = ou=clients,dc=example,dc=com
interval = 30
page_size = 200
coa_port = 3799
coa_port_attr = freeradiusClientType

[receiver]
interval = 60
gcp-region = us-central1
mode = gcp

[port_map]
cisco = 1700
```

`[global]` options apply to both the sender and receiver.

  * `port` the port to send CoA requests from and listen for replies on.
  * `bind_ips` a comma separated list of IPs to bind to.
  * `debug_level` the debug level to use for logging messages.

`[sender]` options which only apply to the packet sender.

  * `ldap_uri` the URI to use when connecting to the LDAP server.
  * `base_dn` the base DN to use when searching for RADIUS clients.
  * `interval` how often to send CoA packets.
  * `page_size` (optional) page size to use when fetching results from LDAP
  * `coa_port` (optional) port to send CoA requests to (defaults to 3799)
  * `coa_port_attr` (optional) LDAP attribute to determine CoA destination port

`[receiver]` options which only apply to the packet receiver.

  * `interval` how often to report metrics.
  * `gcp-region` used to form the metric name.
  * `mode` when this is set to `console` the metrics will be reported to the
    console rather than GCP Metrics Explorer.

`[port_map]` (optional) mapping between values in the `coa_port_attr` and CoA ports.
Any values returned which are not in this map will result in the default CoA port
being used (either `coa_port` if it is defined or 3799 otherwise).
