This repository contains a munin plugin writen as a bash script to gather information about the size of the nextcloud instance. It shows the size of your entire instance and the size of the user directories. There is no need to define new users as the script retrieves information for all found users automatically.
Modify the script and change the $DIR variable such that it points to your nextcloud instance containing the data/ folder.
Next, copy the script du_nextcloud into the directory of your munin plugins, e.g
cp ./du_nextcloud /usr/share/munin/plugins
Then link the plugin into the munin configuration folder, e.g.
ln -s /usr/share/munin/plugins/du_nextcloud /etc/munin/plugins/du_nextcloud
Make sure the script runs as root. Add the following two lines at the end of the file /etc/munin/plugin-conf.d/munin-node
[du_nextcloud]
user root
Test your installation with
munin-run du_nextcloud