Clarify that redis is mandatory and remove incorrect example config #2810

Closed
opened 2025-12-29 18:22:23 +01:00 by adam · 1 comment
Owner

Originally created by @candlerb on GitHub (Aug 16, 2019).

Change Type

[ ] Addition
[X] Correction
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)

Issue

The installation instructions say:

If you have opted to enable the webhooks, set WEBHOOKS_ENABLED = True and define the relevant REDIS database parameters. Below is an example:

WEBHOOKS_ENABLED = True
REDIS = {
    'HOST': 'localhost',
    'PORT': 6379,
    'PASSWORD': '',
    'DATABASE': 0,
    'DEFAULT_TIMEOUT': 300,
}

This is unclear because:

  1. It implies that redis database parameters only need defining if you are using webhooks. But since 2.6, redis must be configured for caching anyway.

  2. It gives an incomplete example of the REDIS setting, which should look more like this:

    REDIS = {
        'HOST': 'localhost',
        'PORT': 6379,
        'PASSWORD': '',
        'DATABASE': 0,
        'CACHE_DATABASE': 1,
        'DEFAULT_TIMEOUT': 300,
        'SSL': False,
    }
    

    That is already included in configuration.example.py so doesn't need repeating here.

Proposed Changes

I suggest replacing the whole section with something like this:

If you wish to use [webhooks](../additional-features/webhooks/), set `WEBHOOKS_ENABLED = True`.  The `REDIS` setting, together with its `DATABASE` member, configure where webhook requests are queued.

This will change again if #3282 is implemented.

Arguably, there's no need for WEBHOOKS_ENABLED any more, given that redis is mandatory and django-rq is now listed in requirements.txt.

Originally created by @candlerb on GitHub (Aug 16, 2019). ### Change Type [ ] Addition [X] Correction [ ] Deprecation [ ] Cleanup (formatting, typos, etc.) ### Issue The [installation instructions](https://netbox.readthedocs.io/en/latest/installation/2-netbox/#webhooks-configuration) say: > If you have opted to enable the webhooks, set `WEBHOOKS_ENABLED = True` and define the relevant REDIS database parameters. Below is an example: > > ``` > WEBHOOKS_ENABLED = True > REDIS = { > 'HOST': 'localhost', > 'PORT': 6379, > 'PASSWORD': '', > 'DATABASE': 0, > 'DEFAULT_TIMEOUT': 300, > } > ``` This is unclear because: 1. It implies that redis database parameters only need defining if you are using webhooks. But since 2.6, redis must be configured for caching anyway. 2. It gives an incomplete example of the `REDIS` setting, which should look more like this: ``` REDIS = { 'HOST': 'localhost', 'PORT': 6379, 'PASSWORD': '', 'DATABASE': 0, 'CACHE_DATABASE': 1, 'DEFAULT_TIMEOUT': 300, 'SSL': False, } ``` That is already included in [configuration.example.py](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py#L29) so doesn't need repeating here. ### Proposed Changes I suggest replacing the whole section with something like this: ``` If you wish to use [webhooks](../additional-features/webhooks/), set `WEBHOOKS_ENABLED = True`. The `REDIS` setting, together with its `DATABASE` member, configure where webhook requests are queued. ``` ### Related This will change again if #3282 is implemented. Arguably, there's no need for WEBHOOKS_ENABLED any more, given that redis is mandatory and django-rq is now listed in requirements.txt.
adam added the status: acceptedtype: documentation labels 2025-12-29 18:22:23 +01:00
adam closed this issue 2025-12-29 18:22:23 +01:00
Author
Owner

@DouglasHeriot commented on GitHub (Aug 20, 2019):

Somewhat related to this – it would be good if the docs clarified what sort of storage should be used for Redis. ie. should it be somewhere persistent, or is it purely a cache and ok if the database is lost on reboot or migration of hosts?

@DouglasHeriot commented on GitHub (Aug 20, 2019): Somewhat related to this – it would be good if the docs clarified what sort of storage should be used for Redis. ie. should it be somewhere persistent, or is it purely a cache and ok if the database is lost on reboot or migration of hosts?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2810