8831 Add health check monitoring

This commit is contained in:
Arthur 2022-11-02 14:31:08 -07:00
parent 07730ccd33
commit db26d8ba2c
6 changed files with 21 additions and 0 deletions

View File

@ -22,6 +22,10 @@ django-filter
# https://github.com/flavors/django-graphiql-debug-toolbar/ # https://github.com/flavors/django-graphiql-debug-toolbar/
django-graphiql-debug-toolbar django-graphiql-debug-toolbar
# Runs health check on installed applications
# https://github.com/revsys/django-health-check
django-health-check
# Modified Preorder Tree Traversal (recursive nesting of objects) # Modified Preorder Tree Traversal (recursive nesting of objects)
# https://github.com/django-mptt/django-mptt # https://github.com/django-mptt/django-mptt
django-mptt django-mptt

View File

@ -0,0 +1,10 @@
# Health Check
NetBox provides health check monitors that can be queried to make sure that the service is running in good condition.
NetBox exposes metrics at the `/healthcheck` HTTP endpoint, e.g. `https://netbox.local/healthcheck`. It allows monitor conditions via HTTP(S), with responses available in HTML and JSON formats.
## Setting up Monitoring
NetBox makes use of the [django-health-check](https://github.com/revsys/django-health-check) library, more information on setting up monitors can be found at [Setting up Monitoring](https://django-health-check.readthedocs.io/en/latest/readme.html#setting-up-monitoring):

View File

@ -117,6 +117,7 @@ nav:
- Webhooks: 'integrations/webhooks.md' - Webhooks: 'integrations/webhooks.md'
- NAPALM: 'integrations/napalm.md' - NAPALM: 'integrations/napalm.md'
- Prometheus Metrics: 'integrations/prometheus-metrics.md' - Prometheus Metrics: 'integrations/prometheus-metrics.md'
- Health Checks: 'integrations/health-check.md'
- Plugins: - Plugins:
- Using Plugins: 'plugins/index.md' - Using Plugins: 'plugins/index.md'
- Developing Plugins: - Developing Plugins:

View File

@ -314,6 +314,10 @@ INSTALLED_APPS = [
'django_tables2', 'django_tables2',
'django_prometheus', 'django_prometheus',
'graphene_django', 'graphene_django',
'health_check',
'health_check.db',
'health_check.contrib.migrations',
'health_check.contrib.redis',
'mptt', 'mptt',
'rest_framework', 'rest_framework',
'social_django', 'social_django',

View File

@ -81,6 +81,7 @@ _patterns = [
path('admin/background-tasks/', include('django_rq.urls')), path('admin/background-tasks/', include('django_rq.urls')),
path('admin/plugins/', include(plugin_admin_patterns)), path('admin/plugins/', include(plugin_admin_patterns)),
path('admin/', admin_site.urls), path('admin/', admin_site.urls),
path('healthcheck/', include('health_check.urls')),
] ]

View File

@ -4,6 +4,7 @@ django-cors-headers==3.13.0
django-debug-toolbar==3.7.0 django-debug-toolbar==3.7.0
django-filter==22.1 django-filter==22.1
django-graphiql-debug-toolbar==0.2.0 django-graphiql-debug-toolbar==0.2.0
django-health-check==3.17.0
django-mptt==0.14 django-mptt==0.14
django-pglocks==1.0.4 django-pglocks==1.0.4
django-prometheus==2.2.0 django-prometheus==2.2.0