Re: [Nagios-users] How to dtermine disk space in Linux

2009-01-29 Thread Kevin Keane
I'm not sure what 3 plugins you are trying. I am using a bash script 
with a little df and awk thrown in:

The whole script does a lot more, but the key part is this:

The critical and warn percentages are in $CDISKUSAGE and $WDISKUSAGE, 
respectively.

Note that this will check all file systems, including CDROM, removable 
disks, etc. So you may need to modify the call to df a bit to make it 
work for you. Hint: try the -t or -x arguments to check only the file 
systems you are interested in.

function checkdiskspace()
{
   local retval
   df -Ph | awk  { if(int(\$5)=$CDISKUSAGE) { print \CRIT\, 
\$0,\br\ } else if (int(\$5)=$WDISKUSAGE) {print \WARN\, 
\$0,\br\ } }  /tmp/$$
   cat /tmp/$$
   retval=0
   grep ^CRIT  /tmp/$$ /dev/null
   if [ $? -eq 0 ]
   then
  retval=2
   else
  grep ^WARN  /tmp/$$ /dev/null
  if [ $? -eq 0 ]
  then
  retval=1
  else
  echo All disks OK
  fi
   fi
   rm -f /tmp/$$
   return $retval
}


Edwin Zoeller wrote:
 I hope someone can help and explain this to me. I am trying to use one
 of three plugins for Nagios to check disk space on a Linux file system.
 When I plug in values that I thinks would work, I don't understand what
 its telling me. Can someone shed some lite. I am used to the plugins on
 Solaris which you can set up a percentage, much easier.

 Thanks

-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] How to dtermine disk space in Linux

2009-01-29 Thread Marc Powell

On Jan 29, 2009, at 5:38 AM, Edwin Zoeller wrote:

 I hope someone can help and explain this to me. I am trying to use one
 of three plugins for Nagios to check disk space on a Linux file  
 system.
 When I plug in values that I thinks would work, I don't understand  
 what
 its telling me. Can someone shed some lite. I am used to the plugins  
 on
 Solaris which you can set up a percentage, much easier.

I'm test driving three cars. Can you tell me the difference between  
them? You should tell us what plugins you're using and provide example  
output to be interpreted. There are many disk check plugins all with  
different output. I'm also not sure why you need different plugins  
between solaris and linux? Is there a reason?

Also, please do not create a new subject by responding to someone  
else's post (Chris's check_snmp_storage.pl question). Create a new  
message to the list.

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null