Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding NAUTOBOT_CACHES_BACKEND env var #3544

Merged
merged 4 commits into from
Apr 14, 2023

Conversation

nniehoff
Copy link
Contributor

@nniehoff nniehoff commented Apr 5, 2023

Closes: #3542

What's Changed

Per the Nautobot Documentation on Prometheus Metrics this sets the default databes engine to django_prometheus.db.backends.postgresql which can be overridden by the original environment variable NAUTOBOT_DB_ENGINE. This adds the ability to change the CACHES["default"]["BACKEND"] using an environment variable NAUTOBOT_CACHES_BACKEND defaults to the original value django_redis.cache.RedisCache if metrics is not enabled and if metrics is enabled defaults to django_prometheus.cache.backends.redis.RedisCache

TODO

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • Documentation Updates (when adding/changing features)
  • Example Plugin Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

nautobot/core/settings.py Show resolved Hide resolved
changes/3544.changed Show resolved Hide resolved
@bryanculver bryanculver mentioned this pull request Apr 14, 2023
6 tasks
@bryanculver bryanculver merged commit 6c48545 into nautobot:develop Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Redis Backend Configuration via Environment Variables for Prometheus Metrics
3 participants