Closed Wilfred closed 8 years ago
@Wilfred please add more details and a test case otherwise @jordansissel close it?
I often find myself writing:
input {
udp {
port => 25800
buffer_size => 1452
codec => collectd { }
}
}
output {
if [collectd_type] == "memory" or [collectd_type] == "cpu" or [collectd_type] == "swap" or [collectd_type] == "if_octets" or [collectd_type] == "df_complex" {
influxdb {
host => "example.com"
db => "metrics"
user => "foo"
password => "bar"
series => "%{host}"
data_points => {"%{collectd_type}.%{type_instance}" => "%{value}"}
coerce_values => {"%{collectd_type}.%{type_instance}" => "float"}
}
}
}
Without supporting sprintf_formatting for coerce_values
, I'm forced to duplicate my influxdb
section.
Does that seem reasonable? I'm happy to add some tests.
Tests would be awesome!
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.
@Wilfred can you rebase, add tests and reopen a new PR?. I am going to close this PR since master has deviated with #29 and #30. Thanks much
Fixes https://github.com/logstash-plugins/logstash-output-influxdb/issues/9 .