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

problems with json_data and datasource #168

Open
jacobmw opened this issue Apr 4, 2019 · 0 comments
Open

problems with json_data and datasource #168

jacobmw opened this issue Apr 4, 2019 · 0 comments

Comments

@jacobmw
Copy link

jacobmw commented Apr 4, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.0.5
  • Ruby: 2.5.3
  • Distribution: Debian 9/stretch
  • Module version: 6.0.0

How to reproduce (e.g Puppet code you use)

$graphite_version = '0.9'
grafana_datasource { 'graphite.staging':
type => 'graphite',
url => $graphite_url,
access_mode => 'proxy',
is_default => true,
grafana_url => 'http://localhost:8080',
grafana_user => 'admin',
grafana_password => $admin_password,
grafana_api_path => '/api',
json_data => template('profile/grafana/datasources/graphite.json.erb')

graphite.json.erb = {
"graphiteVersion":"<%= @graphite_version -%>"
}

What are you seeing

Error: Failed to apply catalog: Parameter json_data failed on Grafana_datasource[graphite.staging]: json_data should be a Hash!

What behaviour did you expect instead

I expect the datasource to be added with the graphite version being set.

Output log

Any additional information you'd like to impart

If I comment out the json_data line, the catalog compiles and that datasource is added correctly, other than the graphite version is not being set (as I am not defining it outside of the erb

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

1 participant