Archiving Netvisor ONE Log Files Outside the Switch

Netvisor ONE enables you to archive the nvOSd log files to an external file server periodically and these log files may be helpful for  troubleshooting purposes. As a network administrator, you can configure the following parameters to enable archiving of the log files:

  • Server IP address and hostname
  • Username and password
  • Log archival interval (minimum interval is 30 minutes and the default value is 24 hours)

On configuring this feature, the log archival configuration parameters are saved in the log_archival_config.xml file with an encrypted password string. A binary file deciphers the configuration parameters and also the files that are to be archived. Netvisor ONE sends an  empty time-stamped directory to the configured remote server path and subsequently, all the log files

are archived to the newly created remote directory. The new directory in the remote server is created in the format.

Netvisor ONE uses the Secure Copy Protocol (SCP) to archive the log files from the switch to the remote external server at  specific intervals.  Using the enable or disable parameter in the CLI command, you can start or stop archiving of the log files. You can archive regular log files, a set pattern of log files, or a whole directory from one of the following paths only. If you add files from other paths than the directories specified here, Netvisor ONE displays an error.

  • /var/nvOS/log/*
  • /nvOS/log/*
  • /var/log/*

Use the below CLI commands to configure the log archival parameters and schedule the archival interval. 

To modify the archival schedule parameters for the log files, use the command,

CLI (network-admin@switch-1) > log-archival-schedule-modify


Specify to enable or disable the log archival schedule.

Specify one or many of the following options:

archive-server-username <string>

Specify the SCP username of log archival server.

archive-server <string>

Specify the  IP address or hostname of the log archival server.

archive-server-path <string>

Specify the SCP server path to archive the log files in.

archive-interval <30..4294967295

Specify the  log archival interval in minutes. The range varies from 30 minutes to 4294967295 minutes with a default value of 1440 minutes (one day). 

archive-server-password <string>

Enter the SCP server password.

For  example, if you had modified  the log-archival-schedule by specifying the archive-server-username as pn-user, archive-server as pn-server, and  archive-server-path as /home/pn-server/workspace/log_archival_tests, use the command,

CLI (network-admin@switch-1) > log-archival-schedule-modify archive-server-username pn-user archive-server pn-server archive-server-path /home/pn-server/workspace/log_archival_tests

To display the modified configuration, use the command,

CLI (network-admin@switch-1) > log-archival-schedule-show

switch:                  switch-1

archive-server-username: pn-user

archive-server:          pn-server

archive-server-path:     /home/pn-server/workspace/log_archival_tests

enable:                  no

archive-interval(m):     1440

To add the log files to the archival list, use the command,

CLI (network-admin@switch-1) > log-archival-schedule-files-add log-file log-file-string

log-file log-file-string

Specify a comma-separated list of log file names to add to the archive list. 

For example, to add the nvOSd.log or audit.log or all log files or a whole directory, use the following commands:

CLI (network-admin@switch-1) > log-archival-schedule-files-add log-file /var/nvOS/log/nvOSd.log

CLI (network-admin@switch-1) > log-archival-schedule-files-add log-file /var/nvOS/log/*.log

CLI (network-admin@switch-1) > log-archival-schedule-files-add log-file /var/log

CLI (network-admin@switch-1) > log-archival-schedule-files-add log-file /nvOS/log/audit.log

To view the list of log files that you had scheduled to be archived, use the command,

CLI (network-admin@switch-1) > log-archival-schedule-files-show





If you try to add an unsupported file or directory, an error message is displayed. For example, 

CLI (network-admin@switch-1) > log-archival-schedule-files-add log-file /var/nvOS

/var/nvOS, not from valid logs supported

To remove the log files or a list of log files from the archival list, use the command,

CLI (network-admin@switch-1) > log-archival-schedule-files-remove log-file log-file-string

Guidelines and Tips


  • When the log-archival-schedule  is enabled and if all files are removed from the archival  list,  the log-archival-schedule gets disabled.
  • If the systemd timer expires before the  previous log-archival process is finished, then the systemd waits for the process to complete before starting the new process.