On Oct 20, 2010, at 8:34 AM, Trond Hasle Amundsen wrote:
Beyond just good programming practice, always use full paths to external
programs within your scripts. $PATH may not be what you expect it to be,
especially when being run by the nagios daemon which has a more restrictive
On Oct 19, 2010, at 2:20 PM, steve f wrote:
Hello All,
I have the following script created to check free space on a remote legacy
box via rsh.
used=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $4}'`
free=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $5}'`
Marc Powell li...@xodus.org writes:
On Oct 19, 2010, at 2:20 PM, steve f wrote:
Hello All,
I have the following script created to check free space on a remote legacy
box via rsh.
used=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $4}'`
free=`sudo rsh $1 df -v |grep
On 10/19/10 14:20, steve f wrote:
Hello All,
I have the following script created to check free space on a remote
legacy box via rsh.
used=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $4}'`
8
snip
8
If I run this from the command line, I get the following
Hello All,
I have the following script created to check free space on a remote legacy box
via rsh.
used=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $4}'`
free=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $5}'`
full=`echo $(($used+$free))`
percent=`echo
Spent some more time with it now getting a little closer
I added this to my script on the dist server running the check:
CLOCK=`date +%s`
HOST=$1
SVC=Starlite Size
STATUS=$3
OUTPUT=$4
Changed the following lines
exit 0 toSTATUS=0
exit 1 toSTATUS=1
exit 2 to