onyx_syslog_files – Configure file management syslog module

Synopsis

  • This module provides declarative management of syslog on Mellanox ONYX network devices.

Parameters

Parameter Choices/Defaults Comments
debug
boolean
    Choices:
  • no ←
  • yes
Configure settings for debug log files
delete_group
string
    Choices:
  • current
  • oldest
Delete certain log files
rotation
dictionary
rotation related attributes
force
boolean
    Choices:
  • no
  • yes
force an immediate rotation of log files
frequency
string
    Choices:
  • daily
  • weekly
  • monthly
Rotate log files on a fixed time-based schedule
max_num
integer
Sepcify max_num of old log files to keep
size
float
Rotate files when they pass max size
size_pct
float
Rotatoe files when they pass percent of HD
upload_file
string
Upload compressed log file (current or filename)
upload_url
string
upload local log files to remote host (ftp, scp, sftp, tftp) with format protocol://username[:password]@server/path

Examples

- name: syslog delete old files
- onyx_syslog_files:
    delete_group: oldest
- name: syslog upload file
- onyx_syslog_files:
    upload_url: scp://username:[email protected]/filename
    upload_file: current
- name: syslog rotation force, frequency and max number
- onyx_syslog_files:
    rotation:
        force: true
        max_num: 30
        frequency: daily
        size: 128

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
commands
list
always
The list of configuration mode commands to send to the device.

Sample:
['logging files delete current', 'logging files rotate criteria', 'logging files upload current url']


Status

Authors

  • Anas Shami (@anass)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.