mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-07 08:34:00 +01:00
Merge pull request #344 from netbox-community/Prometheus
Prepare for Monitoring with Prometheus
This commit is contained in:
commit
e51f9cbc18
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ configuration/*
|
||||
!configuration/extra.py
|
||||
configuration/ldap/*
|
||||
!configuration/ldap/ldap_config.py
|
||||
prometheus.yml
|
||||
|
@ -79,7 +79,7 @@ The default credentials are:
|
||||
## Documentation
|
||||
|
||||
Please refer [to our wiki on Github][netbox-docker-wiki] for further information on how to use this Netbox Docker image properly.
|
||||
It covers advanced topics such as using secret files, deployment to Kubernetes as well as NAPALM and LDAP configuration.
|
||||
It covers advanced topics such as using files for secrets, deployment to Kubernetes, monitoring and configuring NAPALM or LDAP.
|
||||
|
||||
[netbox-docker-wiki]: https://github.com/netbox-community/netbox-docker/wiki/
|
||||
|
||||
|
@ -27,6 +27,8 @@ services:
|
||||
- /opt/netbox/netbox/manage.py
|
||||
command:
|
||||
- rqworker
|
||||
|
||||
# nginx
|
||||
nginx:
|
||||
command: nginx -c /etc/netbox-nginx/nginx.conf
|
||||
image: nginx:1.19-alpine
|
||||
@ -37,11 +39,15 @@ services:
|
||||
volumes:
|
||||
- netbox-static-files:/opt/netbox/netbox/static:ro
|
||||
- netbox-nginx-config:/etc/netbox-nginx/:ro
|
||||
|
||||
# postgres
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
env_file: env/postgres.env
|
||||
volumes:
|
||||
- netbox-postgres-data:/var/lib/postgresql/data
|
||||
|
||||
# redis
|
||||
redis:
|
||||
image: redis:6-alpine
|
||||
command:
|
||||
@ -58,6 +64,7 @@ services:
|
||||
- -c # this is to evaluate the $REDIS_PASSWORD from the env
|
||||
- redis-server --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
|
||||
env_file: env/redis-cache.env
|
||||
|
||||
volumes:
|
||||
netbox-static-files:
|
||||
driver: local
|
||||
|
@ -6,3 +6,4 @@ errorlog = '-'
|
||||
accesslog = '-'
|
||||
capture_output = False
|
||||
loglevel = 'info'
|
||||
raw_env = 'prometheus_multiproc_dir=/tmp/metrics'
|
||||
|
@ -32,4 +32,13 @@ http {
|
||||
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8081;
|
||||
access_log off;
|
||||
|
||||
location = /stub_status {
|
||||
stub_status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
5
env/netbox.env
vendored
5
env/netbox.env
vendored
@ -14,11 +14,12 @@ EMAIL_USE_SSL=false
|
||||
EMAIL_USE_TLS=false
|
||||
EMAIL_SSL_CERTFILE=
|
||||
EMAIL_SSL_KEYFILE=
|
||||
MAX_PAGE_SIZE=1000
|
||||
MEDIA_ROOT=/opt/netbox/netbox/media
|
||||
METRICS_ENABLED=false
|
||||
NAPALM_USERNAME=
|
||||
NAPALM_PASSWORD=
|
||||
NAPALM_TIMEOUT=10
|
||||
MAX_PAGE_SIZE=1000
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASSWORD=H733Kdjndks81
|
||||
REDIS_DATABASE=0
|
||||
@ -27,6 +28,7 @@ REDIS_CACHE_HOST=redis-cache
|
||||
REDIS_CACHE_PASSWORD=t4Ph722qJ5QHeQ1qfu36
|
||||
REDIS_CACHE_DATABASE=1
|
||||
REDIS_CACHE_SSL=false
|
||||
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
|
||||
SECRET_KEY=r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj
|
||||
SKIP_STARTUP_SCRIPTS=false
|
||||
SKIP_SUPERUSER=false
|
||||
@ -35,4 +37,3 @@ SUPERUSER_EMAIL=admin@example.com
|
||||
SUPERUSER_PASSWORD=admin
|
||||
SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567
|
||||
WEBHOOKS_ENABLED=true
|
||||
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
|
||||
|
Loading…
Reference in New Issue
Block a user