Configuration Options¶
Here we will list all options and what they do.
Command Line¶
All of the command line arguments can also be added to a config file.
address
¶
The IP address to use to listen for all incoming syslog messages. When using multiple listeners, it is recommended to specify this option for each listener.
Default: 0.0.0.0
.
CLI usage example:
$ napalm-logs -a 172.17.17.1
$ napalm-logs --address 172.17.17.1
Configuration file example:
address: 172.17.17.1
auth-address
¶
The IP address to listen on for incoming authorisation requests.
Default: 0.0.0.0
.
CLI usage example:
$ napalm-logs --auth-address 172.17.17.2
Configuration file example:
auth_address: 172.17.17.2
auth-port
¶
The port to listen on for incoming authorisation requests.
Default: 49018
CLI usgae example:
$ napalm-logs --auth-port 2022
Configuration file example:
auth_port: 2022
certificate
¶
The certificate to use for the authorisation process. This will be presented to incoming clients during the TLS handshake.
CLI usage example:
$ napalm-logs --certificate /var/cache/server.crt
Configuration file example:
certificate: /var/cache/server.crt
config-file
¶
Specifies the file where further configuration options can be found.
Default: /etc/napalm/logs
.
CLI usage example:
$ napalm-logs -c /srv/napalm-logs
$ napalm-logs --config-file /srv/napalm-logs
config-path
¶
The directory path where device configuration files can be found. These are the files that contain the syslog message format for each device.
CLI usage example:
$ napalm-logs --config-path /home/admin/napalm-logs/
Configuration file example:
config_path: /home/admin/napalm-logs/
device-worker-processes
: 1
¶
New in version 0.3.0.
This option configures the number of worker processes to be started for each platform class. For better performances and higher capacity, it is recommended to increase this number, which defaults to 1, i.e., by default there will be started a single process per platform.
Note
Increasing the number of processes, will imply higher memory consumption.
For fine-tunning, consider increasing this number, and at the same time exclude (or include) the appropriate platforms, using the following options: device_blacklist and device_whitelist.
disable-security
¶
If set no encryption or message signing will take place. All messages will be in plain text. The client will not be able to verify that a message was generated by the server.
It is not recommended to use this in a production environment.
CLI usage example:
$ napalm-logs --disable-security
Configuration file example:
disable_security: true
Note
Starting with release Release 0.4.0 - Codename Crowbar, it is possible to specify this option for each Publisher individually. See disable_security: False.
extension-config-path
¶
A path where you can specify further device configuration files that contain the syslog message format for devices.
CLI usage example:
$ napalm-logs --extension-config-path /home/admin/napalm-logs/
Configuration file example:
extension_config_path: /home/admin/napalm-logs/
hwm
: 1000¶
New in version 0.3.0.
This option controls the ZeroMQ high water mark (the hard limit on the maximum
number of outstanding messages ZeromMQ shall queue in memory).
If this limit has been reached the internal sockets enter an exceptional state,
and ZeroMQ blocks the reception of further messages.
This option can be used to tune the performances of the napalm-logs, in terms of
total messages processed. While the default limit should be generally
enough, in environments with extremely high density of syslog messages to be
processed, it is recommended to increase this value. Keep in mind that a higher
queue implies higher memory consumption.
For maximum capacity, this option can be set to 0
, i.e., inifinite queue.
CLI usage example:
$ napalm-logs --hwm 0
Configuration file example:
hwm: 0
keyfile
¶
The private key for the certificate specified by the certificate
option.
This will be used to generate a key to encrypt messages.
CLI usage example:
$ napalm-logs --keyfile /var/cache/server.key
Configuration file example:
keyfile: /var/cache/server.key
listener
: udp
¶
The module to use when listening for incoming syslog messages. For more details, see Listener.
Starting with the Release 0.4.0 - Codename Crowbar, you are able to listen to the syslog messages over multiple concomitant channels. This capability is available only from the configuration file. For more configuration options for the listener interface, please check the Listener section.
Default: udp
.
CLI usage example:
$ napalm-logs --listener kafka
Configuration file example:
listener: kafka
Multiple listeners configuration example (file):
New in version 0.4.0.
listener:
- kafka: {}
- udp:
address: 1.2.3.4
port: 5514
buffer_size: 2048
- tcp:
address: 1.2.3.4
port: 5515
log-file
¶
The file where to send log messages.
If you want log messages to be outputted to the command line you can specify
--log-file cli
.
Default: /var/log/napalm/logs
.
CLI usage example:
$ napalm-logs --log-file /var/log/napalm-logs
Configuration file example:
log_file: /var/log/napalm-logs
log-format
¶
The format of the log messages.
Default: %(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s
.
Example: 2017-07-03 11:54:25,300,301 [napalm_logs.listener.tcp][INFO ] Stopping listener process
CLI usage example:
$ napalm-logs --log-format '%(asctime)s,%(msecs)03.0f [%(levelname)] %(message)s'
Configuration file example:
log_format: '%(asctime)s,%(msecs)03.0f [%(levelname)] %(message)s'
log-level
: WARNING
¶
The level at which to log messages. Possible options are CRITIAL
, ERROR
,
WARNING
, INFO
, DEBUG
.
Default: WARNING
.
CLI usage example:
$ napalm-logs -l debug
$ napalm-logs --log-level info
Configuration file example:
log_level: info
port
: 514
¶
The port to use to listen for all incoming syslog messages. This can be
assigned using the CLI argument -p
. When working with multiple listeners,
it is recommended to specify the port
argument for each listener to avoid
confusions.
Default: 514
.
CLI usage example:
code-block:: bash
$ napalm-logs -p 1024 $ napalm-logs –port 1024
Configuration file example:
port: 1024
publisher
: zmq
¶
The channel(s) to be used when publishing the structured napalm-logs documents. Starting with Release 0.4.0 - Codename Crowbar, it is possible to publish the messages over multiple channels. Each publisher has it’s separate set of configuration options, for more details see Publisher.
Default: zmq
(ZeroMQ)
CLI usage example:
$ napalm-logs --publisher zmq
Configuration file example:
publisher: zmq
Multiple publishers configuration example (file):
New in version 0.4.0.
publisher:
- zmq:
address: 1.2.3.4
port: 1234
- kafka:
bootstrap_servers:
- kk1.brokers.example.org
- 192.168.0.1
- 192.168.0.2:5678
topic: napalm-logs-out
- http:
address: https://example.com/webhook
publish-address
: 0.0.0.0
¶
The IP address to use to output the processed message. When publishing the
structured napalm-logs documents over multiple transports, it is recommended to
specify the address
field per publisher. For more examples, see
publisher: zmq and Publisher.
Default: 0.0.0.0
.
CLI usage example:
$ napalm-logs --publish-address 172.17.17.3
Configuration file example:
publish_address: 172.17.17.3
publish-port
: 49017
¶
The port to use to output the processes message. When publishing the structured
napalm-logs documents over multiple transports, it is recommended to specify
the port
field per publisher. For more examples, see
publisher: zmq and Publisher.
Default: 49017
.
CLI usage example:
$ napalm-logs --publish-port 2048
Configuration file example:
publish_port: 2048
serializer
: msgpack
¶
The name of the serializer to be used when publishing the napalm-logs structured documents. When working with multiple publishers it is possible to control their serialization method individually, using the serializer: msgpack option.
Default: msgpack
CLI Example:
$ napalm-logs -s json
$ napalm-logs --serializer yaml
Configuration file example:
serializer: json
transport
: zmq
¶
The module to use to output the processed message information. For more details, see Publisher.
Warning
This option is no longer supported as of Release 0.4.0 - Codename Crowbar. Use publisher: zmq instead.
Default: zmq
(ZeroMQ).
CLI usage example:
$ napalm-logs -t kafka
$ napalm-logs --transport kafka
Configuration file example:
transport: kafka
Or:
transport: kafka
Config File Only Options¶
The options to be used inside of the pluggable modules are not provided via the command line, they need to be provided in the config file.
device_whitelist
¶
List of platforms to be supported. By default this is an empty list, thus everything will be accepted. This is useful to control the number of sub-processes started.
Example:
device_whitelist:
- junos
- iosxr
device_blacklist
¶
List of platforms to be ignored. By default this list is empty, thus nothing will be ignored. This is also useful to control the number of sub-processes started.
Example:
device_blacklist:
- eos