Skip to content
This repository was archived by the owner on Dec 31, 2021. It is now read-only.
This repository was archived by the owner on Dec 31, 2021. It is now read-only.

collectd_python_plugin turns option names into lowercase #3

Closed
@bhenerey

Description

@bhenerey

Hi,
I'm trying to use the collectd_python_plugin to create a python.conf plugin file for collectd-carbon. If I use this code in a recipe:

collectd_python_plugin "carbon_writer" do
  options :LineReceiverHost=>"localhost", :LineReceiverPort=>2003, :DifferentiateCountersOverTime=>true, :LowercaseMetricNames=>true, :TypesDB=>"/usr/share/collectd/types.db", :HostPostfix=>"foo"
end

It creates the python.conf file where it should be, but the options become lower case:

# This file autogenerated by Chef
# Do not edit, changes will be overwritten
<LoadPlugin python>
  Globals true
</LoadPlugin>

<Plugin python>
  ModulePath "/usr/lib/collectd"
  Import "carbon_writer"

  <Module "carbon_writer">
    Linereceiverhost "localhost"
    Linereceiverport 2003
    Differentiatecountersovertime true
    Lowercasemetricnames true
    Typesdb "/usr/share/collectd/types.db"
    Hostpostfix "foo"
  </Module>
</Plugin>

The module options should be CamelCase and the plugin won't work unless this is so. It should look like:

        LineReceiverHost "myhost.mydomain"
        LineReceiverPort 2003
        DifferentiateCountersOverTime true
        LowercaseMetricNames true
        TypesDB "/usr/share/collectd/types.db"

Thanks,
Brian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions