onyx_syslog_remote – Configure remote syslog module

Synopsis

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

Parameters

Parameter Choices/Defaults Comments
enabled
boolean
    Choices:
  • no
  • yes ←
Disable/Enable logging to given remote host
filter
string
    Choices:
  • include
  • exclude
Specify a filter type
filter_str
string
Specify a regex filter string
host
string / required
<IP4/IP6 Hostname> Send event logs to this server using the syslog protocol
port
integer
Set remote server destination port for log messages
trap
string
    Choices:
  • none
  • debug
  • info
  • notice
  • alert
  • warning
  • err
  • emerg
  • crit
Minimum severity level for messages to this syslog server
trap_override
list
Override log levels for this sink on a per-class basis
override_class
string / required
    Choices:
  • mgmt-front
  • mgmt-back
  • mgmt-core
  • events
  • debug-module
  • sx-sdk
  • mlx-daemons
  • protocol-stack
Specify a class whose log level to override
override_enabled
boolean
    Choices:
  • no
  • yes ←
disable override priorities for specific class.
override_priority
string
    Choices:
  • none
  • debug
  • info
  • notice
  • alert
  • warning
  • err
  • emerg
  • crit
-Specify a priority whose log level to override

Examples

- name: remote logging port 8080
- onyx_syslog_remote:
    host: 10.10.10.10
    port: 8080

- name: remote logging trap override
- onyx_syslog_remote:
    host: 10.10.10.10
    trap_override:
        - override_class: events
          override_priority: emerg

- name: remote logging trap emerg
- onyx_syslog_remote:
    host: 10.10.10.10
    trap: emerg

- name: remote logging filter include 'ERR'
- onyx_syslog_remote:
    host: 10.10.10.10
    filter: include
    filter_str: /ERR/

- name: disable remote logging with class events
- onyx_syslog_remote:
    enabled: False
    host: 10.10.10.10
    class: events
- name : disable remote logging
- onyx_syslog_remote:
    enabled: False
    host: 10.10.10.10

- name : enable/disable override class
- onyx_syslog_remote:
    host: 10.7.144.71
    trap_override:
        - override_class: events
          override_priority: emerg
          override_enabled: False
        - override_class: mgmt-front
          override_priority: alert

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 x port 8080', 'logging 10.10.10.10 trap override class events priority emerg', 'no logging 10.10.10.10 trap override class events', 'logging 10.10.10.10 trap emerg', 'logging 10.10.10.10 filter [include | exclude] ERR']


Status

Authors

  • Anas Shami (@anass)

Hint

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