Network Monitoring Via NetData
So as of late I've been looking into ways to update my knowledge on general networking, could architecture, Docker/Kubernetes. KVM Virtualization, and linux systems in the cloud and in this search have been finding some really easy ways to manage systems. With that I hope to make some posts regarding what I've learned so other people can easily understand and possibly get started with these technologies, the first of which being Network Monitoring.
Regarding Network Monitoring Tools
There are a good amount of tools in the realm of networking for logging and monitoring system usage and network usage, however this post will be referring to the NetData tool as I've found it fairly easy for beginners to get up and running and because I can't seem to find much on it online.
I will not be going over NetData as a whole rather I'll be giving a quick guide to get up and running on your system and a simple config to add to your
For more in-depth documentation visit the official docs for NetData
Please Note: This post assumes you have knowledge of Linux systems or at the very least Docker.
There's two ways of setting up NetData, either as a dashboard for your one server or as a dashboard for all your connected servers, which this guide will try and cover both briefly.
Individual NetData Dashboards
If you're just looking to have a monitor for your local network for something like a home server or even for a single raspberry pi then this is perfect.
If you have clients or nodes you want to monitor then this is a good method. The difference is you'll need to install netdata on other nodes and link them.
No matter which you choose you'll still be setting up a dashboard.
Setting up your dashboard
Recommendation: Use something like Ansible to make changes and updates to multiple systems.
Below is the an alias block I'd recommend adding to your
.profile on your the server your dashboard is going on as well as any node you may be using, that way provisioning, setting up, and taking down of nodes becomes easier.
Save this locally for now as you'll most likely make changes to this as time goes on.
alias netdata-add="sudo netdata-claim.sh -token=TOKEN -rooms=ROOM1,ROOM2 -url=URL_TO_YOUR_NETDATA_INSTANCE"\ netdata-remove="sudo netdata-declaim.sh -token=TOKEN -rooms=ROOM1,ROOM2 -url=URL_TO_YOUR_NETDATA_INSTANCE"\ netdata-install="bash <(curl -Ss https://my-netdata.io/kickstart.sh) --stable-channel --disable-telemetry"\ netdata-uninstall="wget https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/netdata-uninstaller.sh && chmod +x ./netdata-uninstaller.sh && ./netdata-uninstaller.sh --yes --env /etc/netdata/.environment"
It's recommended that you install
netdata via the curl command rather than using a package manage that way you can customize things like
Assuming your running
systemd check that your service is running by doing:
sudo systemctl status netdata. If it's running then you're good to go.
Follow the documentation for setting up the dashboard either via NGINX or Apache on your main server.
After that you should have a dashboard hosted, from here now you can start provisioning your nodes.
Also, depending on what OS your running, things like environment variables will be different, or rather paths to file will be different.
Start by going to your dashboard setting and getting the API TOKEN, the War Room you wish to assign each node to, and the URL to the dashboard.
From here take that alias block I gave your above and add in those variables such as TOKEN and ROOM.
Now you can copy over your alias block over to the servers you want to monitor and get them provisioned a lot quicker with new alias commands.
Alternatively you can create a bash script to do all of the actions or pass the commands through something like Ansible and automate having to go through each server individually to configure them.
I'd say NetData is fairly simple to install, it get more complex when you start getting into the GUI and customizing the data and war rooms for different things. I can see using this tool with others in the future.
Why do this?
Easy, having a tool to allow you to quickly view network data and usage is invaluable.
Is This All I Need?
Not really, you still of course will need to know what to do with that data you have such as optimizing services and applications to not take up resources or see if perhaps you need an upgrade.
This already assumes you have knowledge of Linux systems, basic networking knowledge, and will be utilizing networking automation tools.
Is there an even easier way to do this?
Yeah, you could go the route of Docker and installing things that way, but that can be just as much effort especially if you plan to have a centralized dashboard. You can use Docker, but it's not something I'd recommend unless you understand first how the software works before deploying containers.
What About NetData Cloud?
You can use NetData Cloud but you get less control over your Dashboard and have to keep up with changes to their service and policies. It's better practice to host things yourself and be responsible for your data or at least be knowledgeable of what is going on in your networks.
I used NetData Cloud to test out the services and see how it all worked before diving deeper into it, but I'd still highly recommend just setting up your own instance.
Are There Any Good Alternatives?
A great alternative to netdata is Cockpit which Vultr includes in some of their Vultr pre-configured instances. I hope to create a guide for that sometime soon as I've used Cockpit in the past.
How Do I Get This Off My Machine???
Follow the official documentation to uninstall NetData, but I've also included it in that alias block assuming you're running Debian and have SystemD.
12/15: As it stands I no longer use NetData and would not recommend it for server statistic tracking, I would rather recommend Grafana + Prometheus/Loki for getting information on your server for both enthusiast as well as enterprise projects.
Help support me making more content by checking out the links below for ways to contribute.