answerstu

du - How to monitor the size of a directory via Telegraf

We need to monitor the size of a directory (for example the data directory of InfluxDB) to set up alerts in Grafana. As mentioned here: How to configure telegraf to send a folder-size to influxDB , there is no built-in plugin for this.We don't mind using the inputs.exec section of Telegraf. The directories are not huge (low filecount + dircount), so deep scanning (like the use of du) is fine by us.One of the directories we need to monitor is /var/lib/influxdb/data.What would be a simple script to execute, and what are the caveats?...Read more

du warning for netapp data ontap backend

I ran the following commanddu --apparent-size --block-size=1 --summarize /mnt2/nfspools/_root_root_p1PS: /mnt2/nfspools/_root_root_p1 is mount point for volume in data ontap filer.I got the following output:du: WARNING: Circular directory structure.This almost certainly means that you have a corrupted file system.NOTIFY YOUR SYSTEM MANAGER.The following directory is part of the cycle: `/mnt2/nfspools/_root_root_p1/.snapshot/hourly.0'du: WARNING: Circular directory structure.This almost certainly means that you have a corrupted file system.NOTI...Read more