The template system controls which attributes are written to RIPE DB objects when the updater processes a prefix. Templates are JSON files stored in the directory set byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/grizzlyware/netbox-ripe-updater/llms.txt
Use this file to discover all available pages before exploring further.
RIPE_TEMPLATE_DIR in .env. Three file types work together to produce the final RIPE object: an LIR-to-organisation mapping file, one or more base templates containing default attributes, and a named template index that ties everything together and maps to the choices you define in the NetBox ripe_template custom field.
The
INCLUDE_ORG and INCLUDE_DESCR environment variables in .env.updater control whether the org and descr attributes appear in the generated RIPE object, regardless of what your templates define. Set either to no to suppress the corresponding field entirely.File types
lir_org.json
Maps LIR identifiers to their RIPE organisation object handles. When a base template contains an empty{"org": ""} statement, the updater looks up the LIR for the prefix’s parent aggregate and fills in the corresponding organisation handle from this file.
lir_org.json
lir custom field on the aggregate. The value is the RIPE organisation object handle to write to the org attribute.
base_*.json
Base templates define the default set of INETNUM/INET6NUM attributes shared across multiple named templates. You can have as many base templates as you need — for example, one for your own network and one per customer with a differentabuse-c or mnt-by.
A base template must include an empty {"org": ""} entry to trigger automatic organisation lookup from lir_org.json. If org is set to a non-empty string, that value is used directly instead.
base_mycompany.json
base_mycustomer1.json
base_mycustomer1.json specifies a fixed org value rather than an empty one. This is appropriate when the customer’s organisation handle is known and static.
templates.json
Defines the named templates that appear as choices in the NetBoxripe_template custom field. Each entry has a descr attribute used as the per-template description and an inherit key that points to the base template file to use.
templates.json
Attribute ordering
The updater assembles the final RIPE object in a fixed order regardless of how attributes appear in your template files:- Dynamic attributes — always written first:
inetnum/inet6num(the prefix itself),netname,org(ifINCLUDE_ORG=yes),country - Template attributes —
descrand any other per-template overrides fromtemplates.json - Base attributes — the remaining fields from the inherited
base_*.jsonfile, excluding any already provided by the template
RIPE_DB=TEST, the updater automatically overrides the source attribute to TEST regardless of what your base template specifies.
Setting up templates from scratch
Create lir_org.json
Copy the example and replace the LIR identifiers and organisation handles with your own.Edit the file so each key matches the values you will enter in the NetBox
lir custom field on your aggregates, and each value is the corresponding RIPE organisation object handle.Create one or more base_*.json files
Start from the example and adjust Keep
admin-c, tech-c, mnt-by, notify, and source to match your RIPE objects.{"org": ""} in the attributes list if you want the organisation to be resolved automatically from lir_org.json. Replace it with a fixed organisation handle if you want to hard-code the org value for a particular base template.Create templates.json
Define one entry per named template. Each template must have a The keys (
descr attribute and an inherit key pointing to one of your base_*.json files.CLOUD-POOL, INFRA-TRANSFER-NET, etc.) must exactly match the choices you configure in the NetBox ripe_template custom field.