For this particular case using multiple Host options accomplishes what I need 
to do:

Host "^[a-z0-9-]+-" ""
Host "\\..*" ""

Thanks
Kimo



----- Original Message -----
> From: Kimo Rosenbaum <[email protected]>
> To: collectd <[email protected]>
> Cc: 
> Sent: Wednesday, February 20, 2013 4:07 PM
> Subject: [collectd] backreferences in replace target
> 
> 
> 
> 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
> 
> 
> _______________________________________________
> collectd mailing list
> [email protected]
> http://mailman.verplant.org/listinfo/collectd
> 

_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to