Hi,
When it comes to this sensor and Linux/JSON I am fairly new so lease bare with me on this.
Goal: Is to get the size of a directory on a volume that is used by a CentOS server. I only have SSH access to the server from PRTG.
Script code
dirSize=$(du -sh /home/data/sites/portal-acceptation/www/media/orders/ | awk '{print $1}')
echo 0:$dirSize:OK
Running the script manually on the server gives me, what I think is the correct format
[root@pvh scriptsxml]# bash dirsize.sh
0:133G:OK
[root@pvh scriptsxml]#
The 133G is the size of the folder as I am writing this.
The sensor keeps returning
XML: The returned XML does not match the expected schema. (code: PE233) -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)
Where did I took a wrong exit?
Add comment