Skip to content

Latest commit

 

History

History
348 lines (307 loc) · 12 KB

vyos.vyos.vyos_logging_module.rst

File metadata and controls

348 lines (307 loc) · 12 KB

vyos.vyos.vyos_logging

Manage logging on network devices

Version added: 1.0.0

:Removed in collection release after 2023-08-01 :Why: Updated module released with more functionality. :Alternative: vyos_logging_global

  • This module provides declarative management of logging on Vyatta Vyos devices.
Parameter Choices/Defaults Comments
aggregate
list / elements=dictionary
List of logging definitions.
dest
string
    Choices:
  • console
  • file
  • global
  • host
  • user
Destination of the logs.
facility
string
Set logging facility.
level
string
Set logging severity levels.
name
string
If value of dest is file it indicates file-name, for user it indicates username and for host indicates the host name to be notified.
state
string
    Choices:
  • present
  • absent
State of the logging configuration.
dest
string
    Choices:
  • console
  • file
  • global
  • host
  • user
Destination of the logs.
facility
string
Set logging facility.
level
string
Set logging severity levels.
name
string
If value of dest is file it indicates file-name, for user it indicates username and for host indicates the host name to be notified.
state
string
    Choices:
  • present ←
  • absent
State of the logging configuration.

Note

- name: configure console logging
  vyos.vyos.vyos_logging:
    dest: console
    facility: all
    level: crit

- name: remove console logging configuration
  vyos.vyos.vyos_logging:
    dest: console
    state: absent

- name: configure file logging
  vyos.vyos.vyos_logging:
    dest: file
    name: test
    facility: local3
    level: err

- name: Add logging aggregate
  vyos.vyos.vyos_logging:
    aggregate:
      - dest: file
        name: test1
        facility: all
        level: info
      - dest: file
        name: test2
        facility: news
        level: debug
    state: present

- name: Remove logging aggregate
  vyos.vyos.vyos_logging:
    aggregate:
      - dest: console
        facility: all
        level: info
      - dest: console
        facility: daemon
        level: warning
      - dest: file
        name: test2
        facility: news
        level: debug
    state: absent

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:
['set system syslog global facility all level notice']


  • This module will be removed in a release after 2023-08-01. [deprecated]
  • For more information see DEPRECATED.

Authors

  • Trishna Guha (@trishnaguha)