Routinator
A Python script that monitors Routinator, the NLnet Labs RPKI Relying Party software (RPKI validator), and exports its status with SNMP Extend.
The script reads Routinator's JSON status API (/api/v1/status) and aggregates the per-repository and per-client series into compact counts so it does not flood LibreNMS with constantly-changing graphs.
SNMP Extend
-
Download the Python script onto the Routinator host
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/routinator.py -O /etc/snmp/routinator.py -
Make the script executable
chmod +x /etc/snmp/routinator.py -
(Optional) create the config file
/etc/snmp/routinator.jsonif Routinator's HTTP server is not on the defaulthttp://127.0.0.1:8323. The default port is commonly changed, so confirm the realhttp-listenvalue.{ "url": "http://127.0.0.1:8323/api/v1/status", "timeout": 5, "include_failed_uris": true, "max_failed_uris": 25 }urlmay instead be supplied as separatehostandportkeys. If the file is absent the built-in defaults are used. -
Edit the snmpd.conf file to include the extend by adding the following line to the end of the config file:
extend routinator /etc/snmp/routinator.pyNote
Some distributions need sudo-permissions for the script to work with SNMP Extend. See the instructions on the section SUDO for more information. A localhost HTTP fetch usually does not need it.
-
Restart snmpd service on the host
Application should be auto-discovered and its stats presented on the Apps-page on the host. Note: Applications module needs to be enabled on the host or globally for the statistics to work as intended.
Notes
- The per-RTR-client graphs are only populated when Routinator is started with
--rtr-client-metrics. Without it the client section is empty and the rest of the graphs still work.