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 cli: ignores --config argument #101445

Open
jelmd opened this issue Feb 28, 2025 · 0 comments
Open

grafana cli: ignores --config argument #101445

jelmd opened this issue Feb 28, 2025 · 0 comments
Labels
area/configuration For issues concerning configuring Grafana automated-triage type/bug

Comments

@jelmd
Copy link

jelmd commented Feb 28, 2025

What happened?

When running grafana cli --config $CONF_FILE --homepath /usr/share/grafana plugins ls or similar commands, grafana ignores the --config argument and thus it doesn't find any plugins. Verified this using strace, which shows, that grafana neither tries to open nor to stat the file. Output:

no installed plugins found

What did you expect to happen?

The cli tool should read the config file and honor its paths section, i.e. especially the plugins setting, which points in my case to /data/grafana/plugins. Because of

# ls -al /data/grafana/plugins
total 35
drwxr-xr-x 3 oper staff   3 Dec 16  2020 .
drwxr-x--- 5 oper daemon  7 Feb 28 05:28 ..
drwxr-xr-x 7 oper staff  18 Oct 27  2020 briangann-gauge-panel

it should be able to detect and upgrade the plugin.


### Did this work before?

Just trying to upgrade from v9.3.1 - so not sure.

### How do we reproduce it?

1. Install grafana
2. mkdir /data/grafana/{data,plugins}
3. cp -r /usr/share/grafana/conf/* /data/grafana/
4. rm /data/grafana/{defaults.ini,ldap_multiple.toml}
5. sed -e 's|^;data =.*|data = /data/grafana/data|' -e 's|^;plugins =.*|plugins = /data/grafana/plugins|' -e 's|^;provisioning =.*|provisioning = /data/grafana/provisioning|  /data/grafana/sample.ini >/data/grafana/grafana.ini
6. Run and install a plugin, e.g. `grafana server --config=/data/grafana/grafana.ini --homedir=/usr/share/grafana`
7. Stop the server (^C)
8. Try to find the installed plugin, e.g. `grafana cli --config=/data/grafana/grafana.ini --homedir=/usr/share/grafana plugins ls`

### Is the bug inside a dashboard panel?

Nope

### Environment (with versions)?

Grafana: v9.5.21
OS: Ubuntu 20.04.6 (focal)
Browser: FF


### Grafana platform?

A downloaded binary

### Datasource(s)?

no
@grafana-issues-bot grafana-issues-bot bot added area/configuration For issues concerning configuring Grafana automated-triage type/bug labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration For issues concerning configuring Grafana automated-triage type/bug
Projects
None yet
Development

No branches or pull requests

1 participant