[Nagiosplug-help] Nagios 2 writes wrong number of files

Petr Hudeček pheek at seznam.cz
Tue Feb 24 09:12:22 CET 2009


Hello everybody,
I have problem with my script, here it is: 

#!/bin/sh

soubory=`find /home/yeti/Maildir/ -follow -type f | wc -l`

if [ $soubory -ge 1000 ]; then  

echo CRITICAL, number of files is $soubory
exit 2

fi

echo OK, number of files is $soubory
exit 0


When I run it  manually, it writes concrete number of files. But when Nagios runs it, there is always written 0. Could anyone help me? Thanks




More information about the Help mailing list