Netdata master slave setup with Graphite Grafana as backend - gardart/wiki-netdata GitHub Wiki
Netdata master with graphite backend running on Centos 7 / RHEL7
Install Netdata master
To install Netdata run the following on the master node
bash <(curl -Ss https://my-netdata.io/kickstart.sh) all
Create an API key uuidgen
Edit your netdata stream.conf and change the Master section
vim /etc/netdata/stream.conf
Replace the API with your API key and enable the master
[a38ff2b5-d132-4bbb-9e7c-0737db51a07d]
enabled = yes
default history = 3600
Now start your Netdata master node systemctl restart netdata
Installing Netdata on the client node
Run the following command on your client, this will install the static prebuilt version of Netdata
bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
After installing Netdata successfully, change the stream config under the slave section
vim /opt/netdata/etc/netdata/stream.conf
[stream]
enabled=yes
destination= FQDN/IP of your Netdata master
api key = c76a2d2f-8921-49c0-8ac3-aa3d728229a5
This is optional
We don't need to keep the collected data in the slaves databases, so we disable them
vim /opt/netdata/etc/netdata/netdata.conf
[global]
# disable the local database
memory mode = none
[health]
# disable health checks
enabled = no
After configuration is done, start your Netdata client
systemctl restart netdata
Archiving collected data to Graphite backend
The above setup will only keep data for 1 hour, we need to be able to look back. We want to archive the collected data from the master node to timeseries database like Graphite. We can then create dashboards with Grafana.
Install Graphite - Grafana with Docker
Clone this repo from kamon-io, it will install Docker container with Graphite and Grafana. You will need to have Docker, make and docker-compose installed
git clone https://github.com/kamon-io/docker-grafana-graphite.git
docker-grafana-graphite
make up
docker ps
2876bd29472b kamon/grafana_graphite "/usr/bin/supervisord" 27 minutes ago Up 27 minutes
0.0.0.0:80-81->80-81/tcp, 0.0.0.0:2003->2003/tcp, 0.0.0.0:8126->8126/tcp, 0.0.0.0:8125->8125/udp kamon-grafana-
dashboard
You can connect to your Graphite web interface on port 81 and Grafana UI on port 80. Graphite will be listening for metrics on tcp port 2003. We will not use the Statsd port.
Setting up the backend on Netdata master
On you Netdata master node, open up the netdata.conf
vim /etc/netdata/netdata.conf
Add this section:
[backend]
enabled = yes
data source = average
type = graphite
destination = FQDN of your graphite server:2003
prefix = netdata
hostname = netdata-master
update every = 10
buffer on failures = 10
timeout ms = 20000
send names instead of ids = yes
send charts matching = *
Now restart your Netdata master node systemctl restart netdata
Now connect to your graphite server on port 81, you should see new folder named netdata.