<div dir="ltr"><div><div><div><div><div><div><div><div>Hi guys.<br></div>I tried to create my own plugin to check disk space and I'm almost done except that the plugin is not returning the expected data:<br></div>If i run the plugn from the command line I get:<br>
</div><br>/usr/lib/nagios/plugins/check_diskl.sh 80 90 /home<br>Critical Disk Space /home - Total: 985M - Usado: 970M - Libre 0<br><br></div>But from nagios I get:<br> free space: /home 0 MB (0% inode=94%): Do not know where on earth the inode information is taken from and is not the format expected I want this:<br>
<br>Critical Disk Space /home - Total: 985M - Usado: 970M - Libre 0<br><br></div><br></div>My script ends with <br>echo $RESULT<br>exit 0;<br><br></div>Where result is:<br></div>RESULT="$NOMBREDIR Total: $ESPACIOTOTAL Usado: $ESPACIOUSADO Libre $ESPACIOLIBRE"<br>
<div><div><br></div><div>This is the final part :<br></div><div>-- snip---<br><br></div><div>if [ "$PORCENTAJE" -ge "$CRIT" ]; then<br> echo "Critical $RESULT";<br> exit 2;<br>
fi<br><br>if [ "$PORCENTAJE" -ge "$WARN" ]; then<br> echo "Warning $RESULT";<br> exit 1;<br>fi<br><br>echo $RESULT<br>exit 0;<br><br><br></div><div><div><div><div><div><div><div>
<div><div>I'm ai missing something else?<br><br></div><div>Any advice really appreciated<br></div><div>Thanks<br>Regards<br></div><div><br></div></div></div></div></div></div></div></div></div></div></div>