You can create a page that you can curl on that will only show the usage of /opt if you like.
I created one as follows,
1) Goto my gateway ssg/ping page copy the final URL after you choose Gateway1 or Gateway2.
In my case https://MyGatewayNameHere:8443/ssg/ping/systemInfo?node=Gateway1
2) Create a policy
A) Route Via Http Assertion
To The Gateway Ping Page: https://MyGatewayNameHere:8443/ssg/ping/systemInfo?node=Gateway1
With HTTP Credentials: Valid Policy Manager user For example Admin
B) Set Context Variable
MyOutput1 from ${response.mainpart}
C) Evaluate regular expression
Source MyOutput1
Expression \Q/dev/mapper/vg00-lv_opt\E.+?\Q/opt\E
(Lower right Destination) MyOutputNew
D) Evaluate regular expression
Source MyOutputNew
Expression [0-9][0-9]\Q%\E
(Lower right Destination) MyOutputFinal
E) Return Template Response
Opt is ${MyOutputFinal} Full
* With this framework you can then do whatever enhancements you want to the policy compare expression on MyOutputFinal and if its larger then 80 or 90 send an email whatever.
Then you can create a monitor script to curl this endpoint (cron or Gateway Scheduled job).
Similar you can also create a script to gzip the files and cron or gateway schedule job to archive them. You can also likely use logrotated to zip automatically and control the retention rate. Though the proper way is to just control the gateway logs if possible via the Policy Manager -> Tasks -> Logging and Auditing -> Manage log sinks -> Choose the log file ssg* and properties -> File Setting and set what you wish.
Hope this helps charlie.
Charlie.