voxpupuli / puppet-grafana

Puppet module to manage Grafana
Apache License 2.0
15 stars 106 forks source link

grafana_datasource: Server Error: no parameter named 'uid' #346

Open sohooo opened 7 months ago

sohooo commented 7 months ago

Affected Puppet, Ruby, OS and module versions/distributions

Puppet definition

grafana_datasource { "${org_name}/${ds_name}":
  *            => $grafana_connection,
  type         => 'postgres',
  uid          => '5Lea-La4z',  # <--------- when I add this line, I get error below
  url          => [$ds_host, $ds_port].join(':'),
  organization => $org_name, # id unsupported
  user         => $ds_user,
  database     => $ds_db,                           
  is_default   => true,
  require      => Grafana_conn_validator['grafana'],
json_data    => {
  postgresVersion        => 1400,         # 1500 bereits verfuegbar
  timescaledb            => true,
  sslmode                => 'verify-ca',  # disable/require/verify-ca/verify-full
  tlsConfigurationMethod => 'file-path',  # file-path | file-content
  sslRootCertFile        => "${grafana_certs}/ca.pem",
  sslCertFile            => "${grafana_certs}/cert.pem",
  sslKeyFile             => "${grafana_certs}/key.pem",
  maxOpenConns           => 0,            # default: 0 (unlimited)
  maxIdleConns           => 2,            # default: 2
  connMaxLifetime        => 14400,        # default: 14400 (4h)
},

What are you seeing

I have a working grafana_datasource to setup our latest Grafana server. As we are in the process of bootstrapping Grafana dashboards (as JSON files) to multiple Grafana installs, we need to enforce the datasource uid. However, when specifying the uid parameter, I get:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'uid'

What behaviour did you expect instead

The datasource uid should be enforced.

Output log

Any additional information you'd like to impart