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

Grafana_datasource provider not working on CentOS 6 #108

Open
lukebigum opened this issue Sep 9, 2016 · 1 comment
Open

Grafana_datasource provider not working on CentOS 6 #108

lukebigum opened this issue Sep 9, 2016 · 1 comment

Comments

@lukebigum
Copy link

The Grafana provider is unable to connect to a local grafana server on CentOS 6 with what looks like an incompatibility with the version of Net::HTTP on CentOS 6. I cannot see where the Hash is coming from, the connection code looks pretty simple.

This Puppet code generates the error below:

grafana_datasource { 'influxdb':
  grafana_url      => 'http://localhost:3000',
  grafana_user     => 'admin',
  grafana_password => 'admin',
  type             => 'influxdb',
  user             => 'telegraf',
  password         => 'telegraf',
  database         => 'telegraf',
  url              => 'http://localhost:8086',
  access_mode      => 'direct',
  is_default       => true,
  require          => Class[influxdb::server],
}
Error: /Stage[main]/Profile::Statistics::Collection_server/Grafana_datasource[influxdb]: Could not evaluate: can't convert Hash into String
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize'
/usr/lib/ruby/1.8/net/http.rb:560:in `open'
/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:101:in `timeout'
/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
/usr/lib/ruby/1.8/net/http.rb:542:in `start'
/usr/lib/ruby/1.8/net/http.rb:440:in `start'
/var/lib/puppet/lib/puppet/provider/grafana.rb:81:in `send_request'
/var/lib/puppet/lib/puppet/provider/grafana_datasource/grafana.rb:25:in `datasources'
/var/lib/puppet/lib/puppet/provider/grafana_datasource/grafana.rb:63:in `datasource'
/var/lib/puppet/lib/puppet/provider/grafana_datasource/grafana.rb:190:in `exists?'
/usr/lib/ruby/site_ruby/1.8/puppet/property/ensure.rb:81:in `retrieve'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1048:in `retrieve'
@kbon
Copy link

kbon commented Nov 9, 2016

I had the same error on CentOS 6.8. Created #115 with a fix which worked for my case.

bastelfreak added a commit to bastelfreak/puppet-grafana that referenced this issue May 20, 2018
Rely on beaker-hostgenerator for docker nodesets
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