Hi,
i need to crate ssh script for monitoring a folder's space in CentOS. I created the script for check the space but i don't succeed to return the correct value to PRTG. In the sensor i return the code "Response not wellformed: "Spazio occupato 1326861750 byte Spazio disco ok " (code: PE132)"
I attach the script below.
CARTELLA_CLIENTE=/usr/backup/backup_neterprise/ SPAZIO_OCCUPATO=$(du -sb ${CARTELLA_CLIENTE} | cut -f1) echo Spazio occupato ${SPAZIO_OCCUPATO} byte check_service(){ if [ "$SPAZIO_OCCUPATO" -ge 2000000000 ] then echo 1:404:Spazio disco massimo superato. fi if [ "$SPAZIO_OCCUPATO" -lt 2000000000 ] then echo 0:200:Spazio disco ok. fi } main() { check_service } main
Can you help me? Regards
Davide Martinello
Add comment