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

data_dir parameter does not have any effect. #159

Open
alext opened this issue Mar 18, 2019 · 3 comments
Open

data_dir parameter does not have any effect. #159

alext opened this issue Mar 18, 2019 · 3 comments

Comments

@alext
Copy link

alext commented Mar 18, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.3.0 (from apt repo)
  • Ruby: 2.5.3 (bundled with puppet package)
  • Distribution: Ubuntu 18.04
  • Module version: 6.0.0

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

Include the Grafana module, and set the data_dir in hieradata:

grafana::data_dir: /mnt/data_volume/grafana

What are you seeing

Grafana is not using this data dir, and instead is using the package defaults of /var/lib/grafana.

What behaviour did you expect instead

Grafana to use the specified directory for storing all its data.

There's nothing in the generated config that would cause it to do this. /etc/grafana/grafana.ini is empty (Except for a comment), and /etc/default/grafana has DATADIR still set to /var/lib/grafana.

Any additional information you'd like to impart

From a scan through the code, all I can see the data_dir being used for is to create a plugins directory within. It doesn't seem to affect anything else at all.

@dhoppe
Copy link
Member

dhoppe commented Mar 26, 2019

@alext The variable data_dir is only used to create the directory plugins.

The config is generated using the hash cfg. You need to provide the following lines to change the corresponding parameters.

    class { 'grafana':
      cfg => {
        paths   => {
          data      => '/mnt/data_volume/grafana',
          plugins => '/mnt/data_volume/grafana/plugins',
        },
      },
    }

But I am afraid you have to create the directory /mnt/data_volume/grafana manually.

@alext
Copy link
Author

alext commented Mar 26, 2019

@dhoppe thanks for responding.

I think that's what I'd worked out from reading the code, however the docs (https://github.com/voxpupuli/puppet-grafana#data_dir) don't make this clear at all, and suggest that this param controls where Grafana puts all its data.

@dhoppe
Copy link
Member

dhoppe commented Mar 26, 2019

@alext You are right. I think the docs need a lot of attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants