Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jalmargyyk/ripe-updater/llms.txt

Use this file to discover all available pages before exploring further.

RIPE Updater receives prefix change events from NetBox via webhooks and reads additional metadata — the LIR affiliation, the RIPE template to use, and whether a prefix should be reported to the RIPE database at all — from three custom fields you must add to NetBox before the integration will work. You also need to ensure your site hierarchy follows the expected region pattern so that country codes can be derived automatically.

Custom fields

Add the following three custom fields in NetBox under Customization → Custom Fields.

lir — Local Internet Registry

This field identifies which LIR owns the aggregate block that a prefix belongs to. The application looks up the LIR value from the parent aggregate and maps it to a RIPE organisation handle via lir_org.json.
SettingValue
Namelir
LabelLIR
Assigned modelsipam → aggregates
TypeSelection
RequiredYes
ChoicesAll LIR identifiers you are responsible for (e.g. de.examplelir1)
DescriptionRIPE Local Internet Registry

ripe_report — report flag

This boolean field controls whether a prefix should be synchronised with the RIPE database. Only prefixes with this field set to true (and a valid ripe_template) are processed when a webhook arrives.
SettingValue
Nameripe_report
LabelRIPE Report
Assigned modelsipam → prefixes
TypeBoolean
RequiredNo
Defaultfalse
DescriptionShould this prefix be in RIPE-DB

ripe_template — template selection

This selection field determines which named template from templates.json is applied to the prefix when generating the RIPE object.
SettingValue
Nameripe_template
LabelRIPE Template
Assigned modelsipam → prefixes
TypeSelection
RequiredNo
ChoicesAll template names you have defined in templates.json
Every time you add a new named template to templates.json you must also add its name as a choice on the ripe_template custom field, otherwise NetBox operators will not be able to select it on a prefix.

Region and country hierarchy

RIPE Updater determines the country for each prefix by looking up the site associated with the prefix and then walking up the region hierarchy until it finds a region whose slug matches a key in the Python iso3166.countries_by_name dictionary. The region slug must be the uppercase English country name as it appears in the ISO 3166 standard (e.g. GERMANY, NETHERLANDS). The application converts the slug to uppercase before checking, so lowercase slugs such as germany also work.
Region: GERMANY          ← matched against iso3166.countries_by_name → "DE"
  └── Region: Bavaria
        └── Site: dc-munich-1
              └── Prefix: 203.0.113.0/24
If no matching region is found anywhere in the hierarchy, the application falls back to the DEFAULT_COUNTRY environment variable. Set DEFAULT_COUNTRY to an ISO 3166-1 alpha-2 code (e.g. DE) to ensure a sensible fallback.
Sites that are not assigned to any region, or whose region chain does not include a recognised country name, will use DEFAULT_COUNTRY. If DEFAULT_COUNTRY is also unset and the site has no matching region, the application will raise an error for that prefix.

Webhook setup

Add a single webhook in NetBox under Integrations → Webhooks with the following settings. This webhook fires whenever a prefix is created, updated, or deleted, and delivers a JSON payload to your RIPE Updater instance.
1

Create the webhook

Navigate to Integrations → Webhooks → Add in your NetBox instance.
2

Fill in the general settings

FieldValue
Nameripe-updater
EnabledYes
Assigned modelsipam | prefix
EventsCreate, Update, Delete
3

Configure the HTTP request

FieldValue
HTTP methodPOST
Payload URLhttp(s)://your-ripe-updater-host/update
HTTP content typeapplication/json
4

Add the authorisation header (if required)

If you have set UPDATE_TOKEN in your RIPE Updater configuration, add the following entry under Additional Headers:
Authorisation: Token YOURTOKEN
Replace YOURTOKEN with the exact token value you set in UPDATE_TOKEN (without the Token prefix if you included it there already — match whatever full string you used).
5

Configure SSL

Enable SSL verification if your RIPE Updater is served over HTTPS with a valid certificate. Disable it only for local testing.
NetBox uses the British spelling Authorisation (with an s) in the additional headers field. This must match exactly the header name that RIPE Updater checks when validating the UPDATE_TOKEN. Using the American spelling Authorization will cause all webhook deliveries to be rejected with a 401 response.
After saving the webhook, open a prefix in NetBox, change any field, and save it. NetBox will display the webhook delivery result in the object’s Change Log. A 200 OK response confirms that RIPE Updater received and accepted the event. If you see a 401 response, double-check that the Authorisation header value in NetBox matches the UPDATE_TOKEN you configured in RIPE Updater exactly, including the Token prefix.

Build docs developers (and LLMs) love