In this tutorial, We will cover three install methods:
- CLI
- Docker
- Local
CLI Install
-
To install the stable version of the plugin using grafana-cli, run the following command:
grafana-cli --pluginUrl \ https://github.com/scalyr/scalyr-grafana-datasource-plugin/releases/download/2.3.1/scalyr_grafana_plugin_31da5c7.zip \ plugins install scalyr-datasource
-
Restart your Grafana server.
- For init.d based services you can use the command:
-
sudo service grafana-server restart
-
- For systemd based services you can use the following:
-
systemctl restart grafana-server
-
- For init.d based services you can use the command:
- If you require the development version, see the Local Install instructions
Local Install
-
If you want a stable version of plugin, download the desired version from github releases. If you want the
development
version of the plugin, clone the plugin repository from GitHub.git clone https://github.com/scalyr/scalyr-grafana-datasource-plugin.git
-
Grafana plugins exist in the directory:
/var/lib/grafana/plugins/
. Create a folder for the DataSet plugin:mkdir /var/lib/grafana/plugins/scalyr
-
Copy the contents of the DataSet plugin into grafana:
Stable version:
tar -xvf scalyr_grafana_plugin_31da5c7.tar.gz cp -rf dist/ /var/lib/grafana/plugins/scalyr/
Development version:
cp -r scalyr-grafana-datasource/dist/ /var/lib/grafana/plugins/scalyr/
-
Adding plugins requires a restart of your grafana server.
For init.d based services you can use the command:
sudo service grafana-server restart
For systemd based services you can use the following:
systemctl restart grafana-server
Docker Install
-
Clone the git repo there.
cd ~/Documents/Scalyr/Git/
git clone https://github.com/scalyr/scalyr-grafana-datasource-plugin.git
Note: if you've installed Grafana via Docker in the past, you will want to do a
docker pull grafana/grafana
to fetch the latest version of Grafana. -
Install the docker image and mount the directory you just cloned. Make sure to change the path to your git repository.
docker run -d -p 3000:3000 --name=grafana -e "GF_SERVER_ROOT_URL=http://grafana.server.name" -e "GF_SECURITY_ADMIN_PASSWORD=secret" -v ~/Documents/Scalyr/Git/scalyr-grafana-datasource-plugin/dist:/var/lib/grafana/plugins/scalyr grafana/grafana
-
go to that local address and port.
Username: admin Password: secret
DataSet data source should be there. Add it here http://127.0.0.1:3000/datasources/new?gettingstarted
Comments
0 comments
Please sign in to leave a comment.