[collectd] backreferences in replace target
Kimo Rosenbaum
kimor79 at yahoo.com
Thu Feb 21 01:07:03 CET 2013
Hello,
Is it possible to use backreferences in a replace target? ie:
<Target "replace">
Host "foo-\(bar\).baz.com" "\1"
</Target>
None of these seem to work, given a host of foo-bar.baz.com and I want bar.baz.com:
Host "^[a-z0-9-]+-([a-z0-9]+)" "\1" -> 1.baz.com
Host "^[a-z0-9-]+-([a-z0-9]+)" "\\1" -> \1.baz.com
Host "^[a-z0-9-]+-\([a-z0-9]+\)" "\1" -> 1.baz.com
Host "^[a-z0-9-]+-\\([a-z0-9]+\\)" "\1" -> foo-bar.baz.com
Host "^[a-z0-9-]+-\\([a-z0-9]+\\)" "\\1" -> foo-bar.baz.com
My end goal is to be able to have RRD files written out with the full hostname and data sent to write_http with just a portion of the hostname.
Thanks
Kimo
More information about the collectd
mailing list