Testing log facility "kern.*" using "logger -p kern.xxx" doesn't work

Solution Verified - Updated -

Issue

After configuring kernel related logging (kern.* facility) in separate directory, testing the configuration using logger command doesn't work

  • Example of rsyslog configuration:

    template(name="TmplKern" type="list") {
        constant(value="/syslog/remote/kern/")
        property(name="hostname")
        constant(value="/")
        property(name="programname" SecurePath="replace")
        constant(value=".log")
    }
    
    module(load="imtcp")
    # Adding this ruleset to process remote messages
    ruleset(name="remotetcp"){
        kern.*   action(type="omfile" DynaFile="TmplKern")
    }
    input(type="imtcp" port="514" ruleset="remotetcp" address="IP_of_recipient_server")
    
  • Example of kern logging facility testing from the rsyslog client

    $ logger -p kern.error "HELLO FROM kern.error from logger"
    

Environment

  • Red Hat Enterprise Linux 7 and later
    • rsyslogd
    • kern logging facility

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content