Target:Replace

From collectd Wiki
Jump to: navigation, search
Replace target
Type: target
Status: supported
First version: 4.6
Copyright: 2008 Florian octo Forster
License: GPLv2
Manpage: collectd.conf(5)
List of Targets
Plugins:

Built-in:

Description

The Replace target uses regular expressions to substitute parts of an identifier with another string. It is similar to the s/// command known from sed(1) and Perl. This plugin is using the extended POSIX flavor of regular expressions, see regex(7).

Synopsis

Please note that backslashes need to be escaped in the configuration.

<Target "replace">
  # Replace "example.net" with "example.com"
  Host "\\<example.net\\>" "example.com"
  
  # Strip "www." from hostnames
  Host "\\<www\\." ""
</Target>

Dependencies

  • none
Personal tools
Namespaces

Variants
Actions
Navigation
Tools