Netdata data source for Grafana
Enhanced high-fidelity troubleshooting data source for the Open Source community!
What is Netdata data source plugin for Grafana?
We are huge fans of Open Source culture and it is rooted deeply into our DNA, so we thought that the Open Source community would hugely benefit from Netdata providing a Grafana data source plugin that would expose its powerful data collection engine.
With this data source plugin we expose the troubleshooting capabilities of Netdata in Grafana, making them available more widely. Some of the key capabilities:
- Real-time monitoring with single-second granularity.
- Installation and out-of-the-box integrations available in seconds from one line of code.
- 2,000+ metrics from across your whole Infrastructure, with insightful metadata associated with them.
- Access to our fresh ML metrics (anomaly rates) - exposing our ML capabilities at the edge!
Getting started
1. Connect your Nodes to Netdata Cloud
Netdata’s data source plugin connects directly to our Netdata Cloud API’s, meaning that you’ll need to have your nodes (hosts) connected to Netdata Cloud in order to be able to have them exposed on our plugin. For security purposes you will also need an API token for authentication (which you can get from within your Netdata profile).
Note: If you don't have an account sign-up for free to get one!
Netdata Agent will need to be installed and running on your server, VM and/or cluster, so that it can start collecting all the relevant metrics you have from the server and applications running on it. More info at https://learn.netdata.cloud/docs/get-started.
2. Ensure you have an API Token for authentication purposes.
Once you have all your nodes connected to Netdata Hub you must proceed with creating an API token, which will be linked to your Netdata Cloud account. The API token provides a means to authenticate external calls to our APIs, allowing the same access as you to the Spaces and Rooms you can see on Netdata Hub.
3. Install Netdata data source plugin on Grafana OSS or Enterprise (local)
For detailed instructions on how to install the plugin on Grafana OSS or Enterprise check the section How to install the plugin?.
4. Add your API token to the Netdata data source plugin configuration
Once you have added your API token to Netdata data source plugin you’re ready to start taking advantage of Netdata’s troubleshooting capabilities in Grafana by starting creating your charts and dashboards!
How to install the plugin?
To start using the Netdata data source plugin on your Grafana environment, local or Cloud, you need to install the plugin manually - it currently isn't signed. Here are some tips to get through this depending on your setup:
- Docker
- Linux (local)
- Windows (local - powershell)
- Building the plugin locally
The installations below will use different tools like: curl, docker, jq, wget, unzip and xcopy.
Docker
Pre-buit script - setup-demo-environment
We provide you a script setup-demo-environment.sh
that will help you setting this up real fast.
To start the container with the Netdata datasource plugin already installed you just need to:
setup-demo-environment.sh run
To remove container:
setup-demo-environment.sh remove
This script will:
- Spin up a grafana container without starting grafana itself
- Retrieve the latest available release of the Netdata datasource plugin
- Install the Netdata datasource plugin in /var/lib/grafana/plugins
- Start grafana
Manual step-by-step
Setup your grafana docker container with the the permissions to load netdata plugin as unsinged
docker run -d --env GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=netdata-datasource --name=grafana grafana/grafana
Ensure you have the desired version of the plugin you want to install, get it from github releases
wget `curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest | jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'`
Copy the contents of the Netdata data source plugin to Grafana plugins directory, by default /var/lib/grafana/plugins
unzip netdata-datasource-<version_number>.zip
docker cp netdata-datasource grafana:/var/lib/grafana/plugins/Restart grafana container
docker restart grafana
Linux (local)
Ensure you have the desired version of the plugin you want to install, get it from github releases
wget `curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest | jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'`
Copy the contents of the Netdata data source plugin to Grafana plugins directory, by default /var/lib/grafana/plugins
unzip netdata-datasource-<version_number>.zip
cp -rf netdata-datasource /var/lib/grafana/pluginsEnsure that Netdata plugin which currently isn’t signed can be registered
vi /etc/grafana/grafana.ini
On
allow_loading_unsigned_plugins
entry add netdata-datasourceallow_loading_unsigned_plugins = netdata-datasource
After adding the plugin a restart of grafana server is needed
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
Windows (local - powershell)
Ensure you have the desired version of the plugin you want to install, get it from github releases by:
- Going to https://github.com/netdata/netdata-grafana-datasource-plugin/releases/latest
- Downloading the zip file with the latest release, e.g. netdata-datasource-1.0.12.zip
Copy the contents of the Netdata data source plugin to the Grafana plugins directory, by default C:\Program Files\GrafanaLabs\grafana\data\plugins
Expand-Archive \.netdata-datasource-<version_number>.zip \.
xcopy .\netdata-datasource\ "C:\Program Files\GrafanaLabs\grafana\data\plugins\netdata-datasource\" /EEnsure that Netdata plugin which currently isn’t signed can be registered
notepad ‘C:\Program Files\GrafanaLabs\grafana\conf\default.ini’
On
allow_loading_unsigned_plugins
entry add netdata-datasourceallow_loading_unsigned_plugins = netdata-datasource
After adding the plugin a restart of grafana server is needed
net stop Grafana
net start Grafana
Building the plugin locally
For any of the above steps if you prefer to build this plugin locally instead of retrieving it from from the releases you can:
Clone this repo
git clone https://github.com/netdata/netdata-grafana-datasource-plugin
Build it locally
yarn
yarn buildPlace the contents of the
/dist
folder under the netdata folder in Grafana plugins directory.
Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.