Welcome to the Linux Foundation Forum!

Lab 4-2: ...[warn]: #0 unknown placeholder `${record["password"].gsub(/./,"*")}` found

joshl
joshl Posts: 37
edited May 13 in LFS242 Class Forum

Anyone else encountering this warn? Doesn't looks like the substitution is occuring.

# Lab 4-2
<source>
  @type forward
</source>

<filter lab4**>
  @type record_transformer
  <record>
    status filtered
    filter processed - ${record["lfs242"]}
    password ${record["password"].gsub(/./,"*")}
  </record>
  remove_keys lfs242
</filter>

<match>
  @type stdout
</match>

Comments

  • I was able to get this to work by adding the key enable_ruby to the <filter> directive.

    # Lab 4-3
    <source>
      @type forward
    </source>
    
    <filter lab4**>
      @type record_transformer
      <record>
        status filtered
        filter processed - ${record["lfs242"]}
        password ${record["password"].gsub(/./,"*")}
      </record>
      remove_keys lfs242
      enable_ruby
    </filter>
    
    <match>
      @type stdout
    </match>
    
  • joshl
    joshl Posts: 37

    ah, thank you. i missed that code somehow.

Categories

Upcoming Training