Linux command
grafana-cli 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Install plugin
grafana-cli plugins install [plugin-id]
List installed plugins
grafana-cli plugins ls
Update all installed plugins
grafana-cli plugins update-all
Update plugin
grafana-cli plugins update [plugin-id]
Remove plugin
grafana-cli plugins remove [plugin-id]
List available plugins
grafana-cli plugins list-remote
Reset the admin password
grafana-cli admin reset-admin-password [newpassword]
说明
grafana-cli manages Grafana plugins and administration tasks. It installs, updates, and removes visualization plugins and data sources from the Grafana plugin repository. The tool handles plugin lifecycle management independently of the Grafana server. It also provides admin commands for password reset and database migration.
参数
- --config _FILE_
- Use an alternate grafana.ini configuration file.
- --homepath _DIR_
- Grafana home directory used to locate config and plugin paths.
- --pluginsDir _DIR_
- Override the plugin install directory.
- --pluginUrl _URL_
- Install a plugin from a custom URL (zip) instead of the plugin repository.
- --repo _URL_
- Use a different plugin repository.
- --insecure
- Skip TLS verification when downloading plugins.
- -d, --debug
- Enable debug output.
- -v, --version
- Show the CLI version.
- --help
- Display help information.
FAQ
What is the grafana-cli command used for?
grafana-cli manages Grafana plugins and administration tasks. It installs, updates, and removes visualization plugins and data sources from the Grafana plugin repository. The tool handles plugin lifecycle management independently of the Grafana server. It also provides admin commands for password reset and database migration.
How do I run a basic grafana-cli example?
Run `grafana-cli plugins install [plugin-id]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --config _FILE_ do in grafana-cli?
Use an alternate grafana.ini configuration file.