Another tag rename question

I’m trying to get my head around the processors.rename for a long tag that I’m receiving from inputs.filecount.

My raw data ends up like this:

du,directory=/hostfs/mnt/p/ServerFolders/MachineBackup,host=aragorn count=4146i,size_bytes=2634590168171i 1652814356000000000
du,directory=/hostfs/mnt/p/ServerFolders/MachineBackup,host=aragorn count=4146i,size_bytes=2634590168171i 1652812847000000000
> du,directory=/hostfs/mnt/p/ServerFolders/BackedupSettings,host=aragorn count=9986i,size_bytes=201347817259i 1652812962000000000

So that directory tag is pretty long
So I’ve been trying to remove the /hostfs/mnt/p/ part of it.
I’ve tried a rename of:

[[inputs.filecount]]
  interval = "5m"
  directories = ["/hostfs/mnt/p/ServerFolders/Videos","/hostfs/mnt/p/ServerFolders/MachineBackup","/hostfs/mnt/p/ServerFolders/BackedupSettings" ]
  recursive  = true
  follow_symlinks = false
  name_override = "du"
  name_suffix = ""
  data_format = "json"
  tag_keys = [ "directory" ]

  [[processors.rename]]
    namepass=["du"]
    [[processors.rename.replace]]
      tag ="/hostfs/mnt/p/ServerFolders/Videos"
      dest = "ServerFolders.Videos"
    [[processors.rename.replace]]
      tag ="/hostfs/mnt/p/ServerFolders/MachineBackup"
      dest = "ServerFolders.MachineBackup"
    [[processors.rename.replace]]
      tag ="/hostfs/mnt/p/ServerFolders/BackedupSettings"
      dest = "ServerFolders.BackedupSettings"

Which has the specific names, could the “/” be a problem? I did also try one replace where I had `/hostfs/mnt/p’ replaced with “” but that didn’t seem to trigger either.

Hello @psyciknz,
Have you tried using the “old” and “new” syntax in the toml?