I have for some time shared my Unraid System dashboard over at Grafana.com but never really had the time to make a quick write up on how to set it all up. So this will try to do just that. This guide will make it so you will be able to monitor cpu usage, cpu temps, network stats, ram usage and much more by simply importing a dashboard.
How it works
In getting all this setup, there are 3 main moving parts. Telegraf, InfluxDB and Grafana.
Telegraf is what collects all the different system metrics and outputs it to an InfluxDB database that Grafana uses to visualize everything with pretty graphs and bars.
This is a pretty simplified explanation and you can read more here: Telegraf, InfluxDB, Grafana
influxdb in Community Apps and install it using the default template. Select your appdata path and host ports if the default ones are taken.
There is no other setup than just installing the container.
Do the same here, just search for the container in Community Apps and use the default template settings. Set the appdata location to where you want it.
- Download the file and place it in the location you want the telegraf appdata to be.
The default config file can be downloaded here: https://github.com/influxdata/telegraf/blob/master/etc/telegraf.conf
- Next you need to edit the
telegraf.conffile. Go to the location you saved the file and scroll down to
OUTPUT PLUGINSwhich should be around line 90-103.Uncomment (Remove #) the http url line for InfluxDB like so:
# urls = ["unix:///var/run/influxdb.sock"] # urls = ["udp://127.0.0.1:8089"] urls = ["http://192.168.1.34:8086"]
192.168.1.34 is the IP address to my Unraid server and 8086 is the default InfluxDB port that runs the InfluxDB HTTP service.
- Next we need to setup the input plugins. A lot of these are already enabled but we need to add a couple so that all the panels on the Grafana dashboard will work.
Uncomment the following plugins and lines:
- HDD temps:
- CPU temps:
interfaces = ["eth0"]
endpoint = "unix:///var/run/docker.sock"
For the hddtemp input to work we need to install the HDDTemp container. The container is in Community Apps. There is nothing special to configure here except the time zone variable. It’s not needed as Unraid already adds this. So you can just delete it.
After editing the telegraf.conf file and installing HDDTemp you can restart the Telegraf container. Telegraf will automatically create a database called
telegraf when started for the first time with the influxdb plugin activated.
Installing Grafana is also quite simple. Chose your host port for the webUI and add your unraid URL and admin password to the container settings.
After the installation is finished go to the WebUI. (http://unraidIP:3000) and log in with username
admin and the password you chose. You should then see this on you screen:
Add data source and select InfluxDB.
Next give the data source a name, add the URL to InfluxDB, enter the database to use (telegraf) and click Save & Test
If all your settings are correct you should see this message.
Next import the dashboard by hovering over the + icon and selecting Import
Paste the dashboard ID 7233 and click Load
Give it a name and UID, select the database in the drop down and click Import.
Next, select the correct values on the menu at the top.
Some assembly needed
You should now already see some of the panels working and displaying stats. But there will be some panels that you’ll need to edit manually. Those are:
- Storage Consumption
- Drive Temperature
- Array read and write
- Cache read and write
Here you need to edit the panel and choose the correct device name for each of the queries. Use the Unraid Main page to find out which drive is the correct one. You can Remove or duplicate and change any queries so it’s the same as your system.
NOTE: The drive names will change if you add or remove any drives to your system, so you will have to redo the panels each time that happens.
To switch drive names on the queries simply click on the panel name and select Edit, then click on the drive name and select the correct one in the drop down menu.
To update the drive names on the Storage Consumption panel, edit the panel and go to the Visualization menu. There you will see the different Value Mappings for the different drive paths.
And that’s about it! This should get you going on adding or creating awesome dashboards for you Unraid system. There are tons of different dashboards on grafana.com to get inspiration from. My dashboard is far from the best one out there, so please share your awesome dashboards in the comment section or on Discord!
And if you’re wondering why my Grafana page looks different from the stock theme you can take a look here: https://github.com/gilbN/theme.park
Optional: Adding UPS stats
On the top of my dashboard I have UPS stats, now if you don’t have a UPS (You should by the way) you can just delete those panel. But if you have a UPS that’s compatible with Unraid you can check out this awesome guide: