The check directory statement currently does not provide means to test the size of its directory contents (recursive). The following enhancement is suggested:
check directory with path /path/to/directory if size > 100GB then alert
size is the combined number of bytes in the directory in files and in sub-directories. Basically what
du -hs would report.
The test may also allow to check the directory size vs. the parent filesystem usage, for example:
check directory varlog with path /var/log if space usage > 95% [of the filesystem] then exec "/usr/bin/logrotate -f"