django-cacheops (4.1)
django-cors-headers (3.0.2)
django-debug-toolbar (2.0)
django-filter (2.1.0)
django-js-asset (1.2.2)
django-mptt (0.9.1)
django-prometheus (1.0.15)
django-rq (2.1.0)
django-tables2 (2.0.6)
django-taggit (1.1.0)
django-taggit-serializer (0.1.7)
django-timezone-field (3.0)
djangorestframework (3.9.4)
www-data@netbox:~$ exit
logout
+++ configuration.py 2019-09-10 07:33:36.148926376 +0000
@@ -8,13 +8,13 @@
# access to the server via any other hostnames. The first FQDN in the list will be treated as the preferred name.
#
-ALLOWED_HOSTS = []
+ALLOWED_HOSTS = ['172.20.0.35']
# PostgreSQL database configuration.
DATABASE = {
'NAME': 'netbox', # Database name
- 'USER': '', # PostgreSQL username
- 'PASSWORD': '', # PostgreSQL password
+ 'USER': 'netbox', # PostgreSQL username
+ 'PASSWORD': 'WHFk7hpW', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
}
@@ -23,18 +23,7 @@
# For optimal security, SECRET_KEY should be at least 50 characters in length and contain a mix of letters, numbers, and
# symbols. NetBox will not run without this defined. For more information, see
-SECRET_KEY = ''
-
-# Redis database settings. The Redis database is used for caching and background processing such as webhooks
-REDIS = {
- 'HOST': 'localhost',
- 'PORT': 6379,
- 'PASSWORD': '',
- 'DATABASE': 0,
- 'CACHE_DATABASE': 1,
- 'DEFAULT_TIMEOUT': 300,
- 'SSL': False,
-}
+SECRET_KEY = 'WHFk7hpW'
#########################
@@ -61,9 +50,6 @@
# BASE_PATH = 'netbox/'
BASE_PATH = ''
-# Cache timeout in seconds. Set to 0 to dissable caching. Defaults to 900 (15 minutes)
-CACHE_TIMEOUT = 900
-
# Maximum number of days to retain logged changes. Set to 0 to retain changes indefinitely. (Default: 90)
CHANGELOG_RETENTION = 90
@@ -72,7 +58,7 @@
CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = [
]
CORS_ORIGIN_REGEX_WHITELIST = [
# r'^(https?://)?(\w+\.)?example\.com$',
@@ -97,14 +83,6 @@
# (all prefixes and IP addresses not assigned to a VRF), set ENFORCE_GLOBAL_UNIQUE to True.
ENFORCE_GLOBAL_UNIQUE = False
-# Exempt certain models from the enforcement of view permissions. Models listed here will be viewable by all users and
-# by anonymous users. List models in the form `<app>.<model>`. Add '*' to this list to exempt all models.
-EXEMPT_VIEW_PERMISSIONS = [
- # 'dcim.site',
- # 'dcim.region',
- # 'ipam.prefix',
-]
-
# Enable custom logging. Please see the Django documentation for detailed guidance on configuring custom logs:
LOGGING = {}
@@ -129,12 +107,9 @@
# the default value of this setting is derived from the installed location.
# MEDIA_ROOT = '/opt/netbox/netbox/media'
-# Expose Prometheus monitoring metrics at the HTTP endpoint '/metrics'
-METRICS_ENABLED = False
-
# Credentials that NetBox will uses to authenticate to devices when connecting via NAPALM.
-NAPALM_USERNAME = ''
-NAPALM_PASSWORD = ''
+NAPALM_USERNAME = 'tapadmin'
+NAPALM_PASSWORD = 'WHFk7hpW'
# NAPALM timeout (in seconds). (Default: 30)
NAPALM_TIMEOUT = 30
@@ -150,6 +125,17 @@
# prefer IPv4 instead.
PREFER_IPV4 = False
+# Redis database settings (optional). A Redis database is required only if the webhooks backend is enabled.
+REDIS = {
+ 'HOST': 'localhost',
+ 'PORT': 6379,
+ 'PASSWORD': '',
+ 'DATABASE': 0,
+ 'CACHE_DATABASE': 1,
+ 'DEFAULT_TIMEOUT': 300,
+ 'SSL': False,
+}
+
# The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of
# this setting is derived from the installed location.
# REPORTS_ROOT = '/opt/netbox/netbox/reports'
@@ -160,11 +146,11 @@
SESSION_FILE_PATH = None
# Time zone (default: UTC)
-TIME_ZONE = 'UTC'
+TIME_ZONE = 'Asia/Shanghai'
# The webhooks backend is disabled by default. Set this to True to enable it. Note that this requires a Redis
# database be configured and accessible by NetBox.
-WEBHOOKS_ENABLED = False
+WEBHOOKS_ENABLED = True
# Date/time formatting. See the following link for supported formats:
在 2019年9月10日星期二 UTC+8下午3:03:31,Brian Candler写道: