On top of being in real time, per second updates, with 300+ graphs and 2000+ metrics monitored, NetData requires almost no configuration and no maintenance.
2 years ago, I presented VMStats, an other real time performance monitoring app, webbased. It was (still is) fancy but only lacked some detailed of processes, networks, etc… like what some command line would give you.
And that is where Netdata can interest you, as it combines both world.
Written in C, as an optimized Linux daemon providing all your metrics on the web (CPU, Disk, Ram, Bandwidth, Apache, MySQL, SNMP, …..) through a fancy dashboard (bootstrap), Netdata can also connect to API to further extend its monitoring capabilities (Bash, NodeJS, …). For the full detail, I suggest you to visit their Github page or check their demo page.
So let’s see how to install it !
They have build an auto-installer to prepare your system with all the dependencies needed to monitor your server. It works on most platforms (Arch, Gentoo, Debian, Redhat, Suse and all their derivatives) as explained on their wiki.
1) Install the dependencies using the auto-installer
You will first need curl:
sudo apt-get install curl
And then run either of the following:
To get a basic installation (No mysql/mariadb hardware sensors, SNMP monitoring)
curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh' >/tmp/kickstart.sh && bash /tmp/kickstart.sh netdata
To get the complete set to monitor
curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh' >/tmp/kickstart.sh && bash /tmp/kickstart.sh netdata-all
2) Install Netdata
You will need to clone their git repo (So make sure you got git or git-core installed) and then run:
git clone https://github.com/firehol/netdata.git --depth=1 cd netdata
And launch their installation script:
It will install Netdata and start it.
3) Starting Netdata at boot
To ensure Netdata starts at boot, you can use their systemd script.
killall netdata cp system/netdata.service /etc/systemd/system/ systemctl daemon-reload systemctl enable netdata service netdata start
Netdata should be running again and accessible to http://this.machine.ip:19999/
If you are not using systemd but init.d, adapt the steps to use the netdata-init-d script instead,
I have too many services running (or tried too many) to remember all those ports. Instead, I use a dedicated virtualhost to redirect a sub-domain to the port. And this is how to do it.
Obviously, the first thing you need to do is to create a CNAME or A redirection through your domain name registrar, like live.domain.tld poiting to your public IP.
Then, you need to install the mod-proxy-html to do the redirection. In root, or with sudo, type:
apt-get install libapache2-mod-proxy-html
while you will also need to activate the mod-proxy-http (Already installed)
then create a new virtualhost:
and reuse/adapt the content of my virtualhost:
<VirtualHost *:80> ServerAdmin email@example.com ServerName live.freedif.org ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:19999/ ProxyPassReverse / http://localhost:19999/ </VirtualHost>
Save it and enable it.
service apache2 reload
and you should now have access to your Netdata monitoring app using your subdomain.
Looks nice, isn’t it !