I am liking Netdata very much for monitoring my systems, so thank you for it. One particular great thing of Netdata is that it really detects a lot of things about my system and in fact I am learning from it a lot of new things to watch out for.
The flip side of this is that if something is missing, it is more difficult to understand what is the problem and how to fix it. I tried to read the documentation, but I am still quite confused.
Case in point, my system has two “main” mounted filesystems: / and /media/something. I would like to monitor the available space on both of them. Instead Netdata by default monitors the available space and inodes in /tmp, /var and /var/tmp (all of which are on the same filesystem, so have the same stats; but this is not a big problem), but nothing in /media/something. How can I add /media/something to the monitored filesystems for available space and inodes?
(on the other hand, all physical disks are detected for monitoring IO performance, so that’s ok)
Hi Thiago, I can confirm that installing the last version of Netdata from your repository fixes the problem, meaning that I can now see the disk space graph. So apparently the only problem is that I was running an older version of Netdata.
Thanks again for your patience, and sorry for not noting immediately that I was using an older version.
The memory mode that I cited could be part of the problem after Netdata 1.16, considering that you are running an older, I suppose that proc.plugin was in a different stage that time.
Your last paragraph let clear what was the problem for you. Today I fixed the problems that I was having to mount USB devices inside my VM and I could use an USB device and mount it on /media/USB. I had all charts for both local device (sda) and the USB device(sdb), so it looks like that the latest version does not have the problems that you are reporting.
I do not know your company policies, but if you are allowed to add a new repository, could you try to use the latest stable Netdata?
A last information, I did not install graphic mode on my VM, so everything that I did was with the user root and my USB device was not encrypted.
If after the update the problem persists, please, let me know.
I did everything using the newest Netdata compiled from the source. Considering everything I executed, I have few doubts for you:
1 - How did you install your Netdata?
2 - What is your Netdata version?
3 - Are you using the default configuration? Or did you change the parameter memory mode?
Hi again, thanks for going that deep with me!
As for your doubts, I am using version of Netdata packaged in Debian stable, which is 1.12.0-1+deb10u1 (the Debian suffix referring to some Debian-specific change in the packaging). I never changed the parameter memory mode. I see this is older than the current Netdata release, so sorry for not having said this immediately.
BTW, my original question was maybe not completely clear, but the manually mounted disk /media/GioBackup is actually detected and visible in Netdata’s sidebar, but it only shows IO performance related metrics. What I would like to see is also disk space metrics (and corresponding alarms when available space becomes too little). I see IO performance metrics for all disks, but space metrics only for /tmp, /var, and /var/tmp.
@giomasce I tried to recreate the problem that you are having now, and I did not have success. I did the following steps:
1 - I created a VM with Debian 10 and kernel 4.19.132-1.
2 - I make a new disk (dd if=/dev/zero of=/testing)
3 - cfdisk /testing
4 - mkfs.ext4 /testing
After to have a disk that I could mount and umount whenever I needed.
5 - I started Netdata
When I access the dashboard all the disks were there. I closed the dashboard
6 - After few minutes I ran : mount /testing /mnt
7 - I access the dashboard again.
The disk was there, it was identified to /mnt
8 - I closed dashboard and I ran umount /mnt
9 - I opened the dashboard and the disk was not more there.
I did everything using the newest Netdata compiled from the source. Considering everything I executed, I have few doubts for you:
1 - How did you install your Netdata?
2 - What is your Netdata version?
3 - Are you using the default configuration? Or did you change the parameter memory mode?
@giomasce firstly sorry for the delay, but I was very busy yesterday.
I will try to replicate the problem that you are having on Debian to understand the motive we have different behaviors on Slackware and Debian. It could be something related to kernels, but I cannot discard something on our packages.
However, note that the filesystem under /media/something (which is actually /media/GioBackup as you can see in my previous post) is not automatically mounted. It is mounted after startup, because it is an encrypted disk, but the mounting process is done manually be me over an SSH connection.
Also, user netdata seems to be able to access /proc/diskstats (although filesystem usage information does not appear there):
So clearly Netdata is running as user netdata. Then we can see that user netdata is able to navigate the relevant filesystem and query filesystem usage:
root@panopticon:~# sudo -u netdata bash
netdata@panopticon:/root$ cd /
netdata@panopticon:/$ ls
bin boot borg dev etc home initrd.img initrd.img.old lib lib64 lost+found media mnt opt proc root run sbin snap srv swap.img sys tmp usr var vmlinuz vmlinuz.old
netdata@panopticon:/$ cd /media/GioBackup/
netdata@panopticon:/media/GioBackup$ ls
backup_congelati borg cellulare duplicity du.txt giovanni lost+found nextcloud rsnapshot vecchio_irene
netdata@panopticon:/media/GioBackup$ df
File system 1K-blocchi Usati Disponib. Uso% Montato su
udev 990108 0 990108 0% /dev
tmpfs 200996 11056 189940 6% /run
/dev/sda2 113815716 103270108 4694372 96% /
tmpfs 1004976 0 1004976 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 1004976 0 1004976 0% /sys/fs/cgroup
/dev/loop0 4096 4096 0 100% /snap/hw-probe/828
/dev/loop2 98944 98944 0 100% /snap/core/9804
/dev/loop3 99456 99456 0 100% /snap/core/9993
/dev/loop1 4096 4096 0 100% /snap/hw-probe/755
/dev/mapper/GioBackup 3844638516 3539119952 110151408 97% /media/GioBackup
tmpfs 200992 0 200992 0% /run/user/1000
tmpfs 200992 0 200992 0% /run/user/0
The plugin that monitors the disk information is proc.plugin that is an internal plugin.
I started my computer and I did not have any USB device connected, after a while I connected the device and I observed that it was recognized by Netdata. I have to say that between the first access to Netdata and the connection of the USB, I closed Netdata dashboard and I reopen again.
Another thing that it is necessary to say, it is the fact that on my distribution(Slackware), the system is using /run/media, instead /media.
For I understand better what is happening on your computer, please, can you run the following command on it and give us the output?
uname -a; grep -Hv “^#” /etc/*release
The plugin expects to read data from /proc/diskstats, and I have to understand what your distribution is doing.
Welcome to the community @giomasce, it really means a lot to us that you are enjoying the product. We can’t stress enough how important this is for us.
According to our documentation, this particular plugin requires that it has access to all the drives that it should be monitoring. By default is all, so that shouldn’t be a problem. Please ensure that netdata has the appropriate rights.