mirror of
https://github.com/bb-Ricardo/netbox-sync.git
synced 2026-01-20 07:50:16 -06:00
269 lines
9.9 KiB
INI
269 lines
9.9 KiB
INI
### Welcome to the NetBox-Sync configuration file.
|
|
|
|
# The values in this file override the default values used by the system if
|
|
# a config option is not specified. The commented out lines are the configuration
|
|
# field and the default value used. Uncommenting a line and changing the value
|
|
# will change the value used at runtime when the process is restarted.
|
|
|
|
###
|
|
### [common]
|
|
###
|
|
### Controls the parameters for logging.
|
|
###
|
|
|
|
[common]
|
|
|
|
# Logs will always be printed to stdout/stderr.
|
|
# Logging can be set to following log levels
|
|
# ERROR: Fatal Errors which stops regular a run
|
|
# WARNING: Warning messages won't stop the syncing process but mostly worth
|
|
# to have a look at.
|
|
# INFO: Information about objects that will be create/updated/deleted in NetBox
|
|
# DEBUG: Will log information about retrieved information, changes in internal
|
|
# data structure and parsed config
|
|
# DEBUG2: Will also log information about how/why data is parsed or skipped.
|
|
# DEBUG3: Logs all source and NetBox queries/results to stdout. Very useful for
|
|
# troubleshooting, but will log any sensitive data contained within a query.
|
|
#
|
|
#log_level = INFO
|
|
|
|
# Enabling this options will write all logs to a log file defined in "log_file"
|
|
#log_to_file = False
|
|
|
|
# Destination of the log file if "log_to_file" is enabled.
|
|
# Log file will be rotated maximum 5 times once the log file reaches size of 10 MB
|
|
#log_file = log/netbox_sync.log
|
|
|
|
|
|
###
|
|
### [netbox]
|
|
###
|
|
### Controls the connection parameters to your netBox instance
|
|
###
|
|
|
|
[netbox]
|
|
|
|
# Requires an NetBox API token with full permissions on all objects except:
|
|
# * auth
|
|
# * secrets
|
|
# * users
|
|
api_token = XYZ
|
|
|
|
# Requires a hostname or IP which points to your NetBox instance
|
|
host_fqdn = netbox.example.com
|
|
|
|
# Define the port your NetBox instance is listening on. If "disable_tls" is
|
|
# set to "true" this option might be set to 80
|
|
#port = 443
|
|
|
|
# Weather TLS encryption is enabled or disabled.
|
|
#disable_tls = false
|
|
|
|
# Enforces TLS certificate validation. If this system doesn't trust the NetBox
|
|
# web server certificate then this option needs to be changed
|
|
#validate_tls_certs = true
|
|
|
|
# Whether items which were created by this program but can't be found in any
|
|
# source anymore will be deleted or not.
|
|
#prune_enabled = false
|
|
|
|
# Orphaned objects will first be tagged before they get deleted. Once the amount
|
|
# of days passed the object will actually be deleted.
|
|
#prune_delay_in_days = 30
|
|
|
|
# The maximum number of objects returned in a single request. If a NetBox instance
|
|
# is very quick responding the value should be raised.
|
|
#default_netbox_result_limit = 200
|
|
|
|
# The maximum time a query is allowed to execute before being killed and considered failed.
|
|
#timeout = 30
|
|
|
|
# The amount of times a failed request will be reissued. Once the maximum is reached the
|
|
# syncing process will be stopped completely.
|
|
#max_retry_attempts = 4
|
|
|
|
# Defines if caching of NetBox objects is used or not. If problems with unresolved
|
|
# dependencies occur, switching off caching might help.
|
|
#use_caching = true
|
|
|
|
###
|
|
### [sources/*]
|
|
###
|
|
### Controls the parameters of a defined source. The string past the slash
|
|
### will be used as a sources name. Sources can be defined multiple times to
|
|
### represent different sources. It is planned to support different types of sources.
|
|
|
|
|
|
[source/my-vcenter-example]
|
|
|
|
# Defines if this source is enabled or not
|
|
#enabled = true
|
|
|
|
# type of source. This defines which source handler to use.
|
|
type = vmware
|
|
|
|
# host name / IP address of the vCenter
|
|
host_fqdn = vcenter.example.com
|
|
|
|
# TCP port to connect to
|
|
#port = 443
|
|
|
|
# Enforces TLS certificate validation. If vCenter uses a valid TLS certificate then
|
|
# this option should be set to 'true' to ensure a secure connection.
|
|
#validate_tls_certs = false
|
|
|
|
# username and password to use to log into vCenter
|
|
username = vcenteruser
|
|
password = supersecret
|
|
|
|
# IP networks eligible to be synced to NetBox.
|
|
# If an IP address is not part of this networks then it WON'T be synced to NetBox
|
|
permitted_subnets = 172.16.0.0/12, 10.0.0.0/8, 192.168.0.0/16, fd00::/8
|
|
|
|
# filters can be used to include/exclude certain objects from importing into NetBox
|
|
# Include filters are checked first and exclude filters after. An object name has to
|
|
# pass both filters to be synced to NetBox. If a filter is unset it will be ignored.
|
|
# Filters are all treated as regex expressions!
|
|
|
|
# If a cluster is excluded from sync then ALL VMs and HOSTS inside the cluster will
|
|
# be ignored!
|
|
#cluster_include_filter =
|
|
#cluster_exclude_filter =
|
|
|
|
# This will only include/exclude the host, not the VM if Host is part of a multi host
|
|
# cluster.
|
|
#host_exclude_filter =
|
|
#host_include_filter =
|
|
|
|
# simply include/exclude VMs
|
|
#vm_exclude_filter =
|
|
#vm_include_filter =
|
|
|
|
# This option defines which vCenter cluster is part of a NetBox site. This is done
|
|
# with a comma separated key = value list.
|
|
# key: defines the cluster name as regex
|
|
# value: defines the NetBox site name (use quotes if name contains commas)
|
|
# This is a quite important config setting as IP addresses, prefixes, VLANs and
|
|
# VRFs are site dependent. In order to assign the correct prefix to an IP
|
|
# address it is important to pick the correct site.
|
|
# A VM always depends on the cluster site relation
|
|
#cluster_site_relation = Cluster_NYC = New York , Cluster_FFM.* = Frankfurt
|
|
|
|
# Same as cluster site but on host level. If unset it will fall back
|
|
# to cluster_site_relation.
|
|
#host_site_relation = nyc02.* = New York, ffm01.* = Frankfurt
|
|
|
|
# This option defines which host/VM belongs to which tenant. This gets important
|
|
# if hosts/VMs with the same name exists in different clusters. This is done
|
|
# with a comma separated key = value list.
|
|
# key: defines a hosts/VM name as regex
|
|
# value: defines the NetBox tenant name (use quotes if name contains commas)
|
|
#host_tenant_relation = esxi300.* = Infrastructure
|
|
#vm_tenant_relation = grafana.* = Infrastructure
|
|
|
|
# This option defines custom platforms if the VMWare created platforms are not suitable.
|
|
# Pretty much a mapping of VMWare platform name to your own platform name.
|
|
# This is done with a comma separated key = value list.
|
|
# key: defines a VMWare returned platform name
|
|
# value: defines the desired NetBox platform name
|
|
#vm_platform_relation = centos-7.* = centos7, microsoft-windows-server-2016.* = Windows2016
|
|
|
|
# Define the NetBox device role used for hosts and VMs. The default is set to "Server". This is done
|
|
# with a comma separated key = value list.
|
|
# key: defines a hosts/VM name as regex
|
|
# value: defines the NetBox role name (use quotes if name contains commas)
|
|
#host_role_relation = .* = Server
|
|
#vm_role_relation = .* = Server
|
|
|
|
# Define NetBox tags which are assigned to a host or VM. This is done
|
|
# with a comma separated key = value list.
|
|
# key: defines a hosts/VM name as regex
|
|
# value: defines the NetBox tag (use quotes if name contains commas)
|
|
#host_tag_relation = esxi300.* = Infrastructure
|
|
#vm_tag_relation = grafana.* = Infrastructure
|
|
|
|
# Try to find existing host based on serial number. This can cause issues with blade centers if VMWare does not
|
|
# report the blades serial number properly.
|
|
#match_host_by_serial = True
|
|
|
|
# Attempt to collect asset tags from vCenter hosts
|
|
#collect_hardware_asset_tag = True
|
|
|
|
# Perform a reverse lookup for all collected IP addresses. If a dns name
|
|
# was found it will be added to the IP address object in NetBox
|
|
#dns_name_lookup = True
|
|
|
|
# use custom DNS server to do the reverse lookups
|
|
#custom_dns_servers = 192.168.1.11, 192.168.1.12
|
|
|
|
# define how the primary IPs should be set
|
|
# possible values
|
|
#
|
|
# always: will remove primary IP from the object where this address is
|
|
# currently set as primary and moves it to new object
|
|
#
|
|
# when-undefined: (default)
|
|
# only sets primary IP if undefined, will cause ERRORs if same IP is
|
|
# assigned more then once to different hosts and IP is set as the
|
|
# objects primary IP
|
|
#
|
|
# never: don't set any primary IPs, will cause the same ERRORs
|
|
# as "when-undefined"
|
|
|
|
#set_primary_ip = when-undefined
|
|
|
|
# Do not sync notes from a VM in vCenter to the comments field on a VM in netbox
|
|
#skip_vm_comments = False
|
|
|
|
# Do not sync template VMs
|
|
#skip_vm_templates = True
|
|
|
|
# strip domain part from host name before syncing device to NetBox
|
|
#strip_host_domain_name = False
|
|
|
|
# strip domain part from VM name before syncing VM to NetBox
|
|
#strip_vm_domain_name = False
|
|
|
|
# sync tags assigned to Hosts and VMs in vCenter to NetBox
|
|
# INFO: this requires the installation of the 'vsphere-automation-sdk', ses docs about installation
|
|
#sync_tags = False
|
|
|
|
# sync tags assigned to parent objects to NetBox
|
|
# in vCenter this could be a Folder where VMs are grouped in or a cluster a Host belongs to.
|
|
#sync_parent_tags = False
|
|
|
|
|
|
[source/my-redfish-example]
|
|
|
|
# Defines if this source is enabled or not
|
|
#enabled = true
|
|
|
|
# type of source. This defines which source handler to use.
|
|
type = check_redfish
|
|
|
|
# define the full path where the check_redfish inventory json files are located
|
|
inventory_file_path = /full/path/to/inventory/files
|
|
|
|
# IP networks eligible to be synced to NetBox.
|
|
# If an IP address is not part of this networks then it WON'T be synced to NetBox
|
|
permitted_subnets = 172.16.0.0/12, 10.0.0.0/8, 192.168.0.0/16, fd00::/8
|
|
|
|
# define if the host name discovered via check_redfish overwrites the device host name in NetBox
|
|
#overwrite_host_name = False
|
|
|
|
# define if the name of the power supply discovered via check_redfish overwrites the power supply name in NetBox
|
|
#overwrite_power_supply_name = False
|
|
|
|
# define if existing power supply attributes are overwritten with data discovered via check_redfish
|
|
# if False only data which is not preset in NetBox will be added
|
|
#overwrite_power_supply_attributes = True
|
|
|
|
# define if the name of the interface discovered via check_redfish overwrites the interface name in NetBox
|
|
#overwrite_interface_name = False
|
|
|
|
# define if existing interface attributes are overwritten with data discovered via check_redfish
|
|
# if False only data which is not preset in NetBox will be added
|
|
#overwrite_interface_attributes = True
|
|
|
|
# EOF
|