Page MenuHomeVyOS Platform

Add an option under "show log" to filter with syslog facility
Closed, ResolvedPublicFEATURE REQUEST

Description

Summary

Add an option under the show log operational command (op-cmd) to allow filtering logs based on syslog facility and priority/level.
journalctl command provides a option/filters to display a list of known facility names and priotriy for syslog log levels.

Additional Information:

-p, --priority=
        Filter output by message priorities or priority ranges. Takes
        either a single numeric or textual log level (i.e. between
        0/"emerg" and 7/"debug"), or a range of numeric/text log
        levels in the form FROM..TO. The log levels are the usual
        syslog log levels as documented in syslog(3), i.e.
        "emerg" (0), "alert" (1), "crit" (2), "err" (3),
        "warning" (4), "notice" (5), "info" (6), "debug" (7). If a
        single log level is specified, all messages with this log
        level or a lower (hence more important) log level are shown.
        If a range is specified, all messages within the range are
        shown, including both the start and the end value of the
        range. This will add "PRIORITY=" matches for the specified
        priorities.

        Added in version 188.

    --facility=
        Filter output by syslog facility. Takes a comma-separated list
        of numbers or facility names. The names are the usual syslog
        facilities as documented in syslog(3).  --facility=help may be
        used to display a list of known facility names and exit.

Reference:

vyos@vyos#vyos@vyos# sudo journalctl -b --facility=kern
Feb 27 10:35:47 vyos kernel: Linux version 6.6.93-amd64-vyos (root@413971082b75>
Feb 27 10:35:47 vyos kernel: Command line: BOOT_IMAGE=/boot/1.4.3/vmlinuz boot=>
Feb 27 10:35:47 vyos kernel: BIOS-provided physical RAM map:
Feb 27 10:35:47 vyos kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009f>
Feb 27 10:35:47 vyos kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009f>
Feb 27 10:35:47 vyos kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000ff>
Feb 27 10:35:47 vyos kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000400fd>
Feb 27 10:35:47 v...

[edit]
vyos@vyos# sudo journalctl -b --facility=cron
Feb 27 10:35:49 vyos cron[776]: (CRON) INFO (pidfile fd = 3)
Feb 27 10:35:49 vyos cron[776]: (CRON) INFO (Running @reboot jobs)
Feb 27 10:40:01 vyos CRON[3591]: (smmsp) CMD (test -x /etc/init.d/sendmail && t>
Feb 27 11:00:01 vyos CRON[3599]: (smmsp) CMD (test -x /etc/init.d/sendmail && t>
Feb 27 11:17:01 vyos CRON[3606]: (root) CMD (cd / && run-parts --report /etc/

https://man7.org/linux/man-pages/man1/journalctl.1.html

Something like this:

$ show log facility <keyword> level <keyword>

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Related Objects

StatusSubtypeAssignedTask
ResolvedFEATURE REQUESTc-po
ResolvedFEATURE REQUESTc-po

Event Timeline

SrividyaA renamed this task from Add an option under show log to filter with syslog facility to Add an option under "show log" to filter with syslog facility.
SrividyaA triaged this task as Normal priority.