Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sprintf formatting for column names in coerce_values. #10

Closed
wants to merge 1 commit into from

Conversation

Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Mar 10, 2015

Fixes #9 .

@brupm
Copy link

brupm commented May 29, 2015

@Wilfred please add more details and a test case otherwise @jordansissel close it?

@Wilfred
Copy link
Contributor Author

Wilfred commented May 30, 2015

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.

@brupm
Copy link

brupm commented May 30, 2015

Tests would be awesome!

@elasticsearch-release
Copy link

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'.

@suyograo
Copy link
Contributor

@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

@suyograo suyograo closed this Feb 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support sprintf formatting in coerce_values
4 participants