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

Create grafana config directory #339

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

m0dular
Copy link

@m0dular m0dular commented Sep 29, 2023

Prior to this commit, attempting to created a provisioned datasource or dashboard after installing from an archive source would fail with the following:

Could not set 'file' on ensure: No such file or directory - A directory component in /etc/grafana/provisioning/datasources/ does not exist or is a dangling symbolic link

This commit ensure that archive installations create the directory with a default of /etc/grafana

Prior to this commit, attempting to created a provisioned datasource or
dashboard would fail with the following:

Could not set 'file' on ensure: No such file or directory - A directory component in /etc/grafana/provisioning/datasources/<datasource> does not exist or is a dangling symbolic link

This commit ensure that archive installations create the directory with
a default of /etc/grafana
@@ -158,6 +158,7 @@
String $docker_ports = '3000:3000',
String $data_dir = '/var/lib/grafana',
String $install_dir = '/usr/share/grafana',
String $config_dir = '/etc/grafana',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use:

Suggested change
String $config_dir = '/etc/grafana',
Stdlib::Absolutepath $config_dir = '/etc/grafana',

@m0dular
Copy link
Author

m0dular commented Sep 29, 2023

So this was part of work to add versions to archive installations in operational dashboards, but I'm realizing that it doesn't work and probably hasn't been for a while, at least on some platforms.

On SLES 12 and 15 it claims to start the service but doesn't, and I assume it has something to do with how it's defined here. We'd also have to do something like we do with the systemd config file in ops dashboards so that we know the server is fully started. But since it's manually starting the service with the binary option and not using systemd that would be more work.

Should we just drop archive support in this module and ops dashboards? It looks like there's a package available for all major platforms, and using a repo or package is so much easier.

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

Successfully merging this pull request may close these issues.

None yet

2 participants