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

Is it possible to define more than one graphite database? (BUG) #39

Open
mrh666 opened this issue May 29, 2016 · 5 comments
Open

Is it possible to define more than one graphite database? (BUG) #39

mrh666 opened this issue May 29, 2016 · 5 comments

Comments

@mrh666
Copy link

mrh666 commented May 29, 2016

Hi there,

Is it possible to define more than one graphite database?
And if it is, what should be the syntax for graphite_options?
I tried this code:

    graphite_options        => [ {
      'enabled'           => true,
      'database'          => 'graphite',
      'bind-address'      => ':2003',
      'protocol'          => tcp,
      'consistency-level' => 'one',
      'name-separator'    => '.',
      'batch-size'        => 1000,
      'batch-pending'     => 5,
      'batch-timeout'     => '1s',
      'udp-read-buffer'   => 0,
    },
    {
      'enabled'           => true,
      'database'          => 'graphite2',
      'bind-address'      => ':2011',
      'protocol'          => tcp,
      'consistency-level' => 'one',
      'name-separator'    => '.',
      'batch-size'        => 1000,
      'batch-pending'     => 5,
      'batch-timeout'     => '1s',
      'udp-read-buffer'   => 0,
    } ],

But I've got an error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template influxdb/influxdb.conf.erb:
  Filepath: /etc/puppet/modules/influxdb/templates/influxdb.conf.erb
  Line: 128
  Detail: undefined method `key' for nil:NilClass
 at /etc/puppet/modules/influxdb/manifests/server/config.pp:96 on node influxdbnode-96jxf36fl7tdfn7
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Please advice. Thank you!

@dgolja
Copy link
Owner

dgolja commented May 31, 2016

what version of puppet you use ?

@mrh666
Copy link
Author

mrh666 commented May 31, 2016

3.8.7

@mrh666
Copy link
Author

mrh666 commented May 31, 2016

n1tr0g,
I fixed template a little to make it work.
It was (LINE 126-129):

<% @graphite_options.each do |option| -%>
[[graphite]]
<% @options.key.sort.each do |key| -%>
<% val = @options[key] 

And fix is:

<% @graphite_options.each do |option| -%>
[[graphite]]
<% option.keys.sort.each do |key| -%>
<% val = option[key] 

It it's correct I can commit with Pull Request.

@dgolja
Copy link
Owner

dgolja commented Jun 1, 2016

looks ok ... can you create an PR ?

@mrh666
Copy link
Author

mrh666 commented Jun 2, 2016

@n1tr0g Of course! Done.

#40

@mrh666 mrh666 changed the title Is it possible to define more than one graphite database? Is it possible to define more than one graphite database? (BUG) Jun 2, 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

No branches or pull requests

2 participants