<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Here is a link to the nagios plugin developer guidelines - <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html">http://nagiosplug.sourceforge.net/developer-guidelines.html</a> - you should read this over first to get some basic ideas down. <div><br></div><div>For your own purposes you don't need to meet all the requirements there, you just need a script that does what you need.</div><div><br></div><div>You could change your script to accept values for "warning" and "critical" values (look at check_procs syntax, use the -c and -w flags) and then compare the amount of free space available to these values. Your script should do some basic error checking to ensure the warning level is higher than the critical level. If the free space is above both values then the script should write "DISK OK" to stdout (and more text if you wish) and then exit with a return code of 0 (meaning everything is fine). If disk space is below warning level but above critical level then script should write "DISK WARNING" and exit with return code of 1. If free space is below warning and critical levels then the script should write "DISK CRITICAL" and exit with return code 2. Return code 3 and 4 are for other conditions but can't recall them now (you can look this up).. </div><div><br></div><div>Now you need to start your coding, you can use almost any language you wish. </div><div><br></div><div>good luck</div><div><br></div><div>kyle</div><div><br><div><div>On Sep 17, 2008, at 1:04 PM, Kalpesh Patel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>I have written perl script which gives the used disk space shown below:</div> <div> </div> <div> <div>For Ex. check_disk_used --dir=/var</div> <div> </div> <div>output = Used Disk space on /var == 161.26MB 1.73%</div> <div> </div> <div>How can I use this script with check_nrpe to get it work from nagios server?<br><br></div></div> <div class="gmail_quote">On Wed, Sep 17, 2008 at 3:59 PM, Kyle Smith <span dir="ltr"><<a href="mailto:kyles@apple.com">kyles@apple.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div style="WORD-WRAP: break-word">O yes you are right, check_disk uses free space values to determine if disk space is ok or not. <div><br></div> <div>You should write your own plugin if this will not work for you.</div> <div><br></div> <div>good luck</div> <div><br></div><font color="#888888"> <div>kyle</div></font> <div> <div></div> <div class="Wj3C7c"> <div><br></div> <div> <div> <div>On Sep 17, 2008, at 12:51 PM, Kalpesh Patel wrote:</div><br> <blockquote type="cite"> <div dir="ltr"> <div>Just to make sure...</div> <div> </div> <div>I am asking for getting used disk space not free disk space as per my original mail.</div> <div> </div> <div>Will this do?<br><br></div> <div class="gmail_quote">On Wed, Sep 17, 2008 at 3:44 PM, Kyle Smith <span dir="ltr"><<a href="mailto:kyles@apple.com" target="_blank">kyles@apple.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div style="WORD-WRAP: break-word">Use check_disk and the -p flag, follow -p with your nfs mounted filesystem <div><br> <div>good luck</div> <div><br></div><font color="#888888"> <div>kyle</div></font> <div> <div></div> <div> <div><br> <div> <div> <div>On Sep 17, 2008, at 12:33 PM, Kalpesh Patel wrote:</div><br> <blockquote type="cite"> <div dir="ltr"> <div>but this is for checking local disks not NFS/mounts..right? </div> <div> </div> <div>I want to check the used disk space for all type of file systems.<br><br></div> <div class="gmail_quote">On Wed, Sep 17, 2008 at 1:21 PM, Alex Dehaini <span dir="ltr"><<a href="mailto:alexdehaini@gmail.com" target="_blank">alexdehaini@gmail.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div dir="ltr">udr check_local_disk plugin<br><br> <div class="gmail_quote"> <div> <div></div> <div>On Wed, Sep 17, 2008 at 5:15 PM, Kalpesh Patel <span dir="ltr"><<a href="mailto:kalpesh2582@gmail.com" target="_blank">kalpesh2582@gmail.com</a>></span> wrote:<br></div></div> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"> <div> <div></div> <div> <div dir="ltr"> <div>Hi,</div> <div> </div> <div>I am using perl script to get used disk space. I have to pass variavle for the particular file system.</div> <div>I need help in using this script with check_nrpe plugin.</div> <div> </div> <div>For Ex. check_disk_used --dir=/var</div> <div> </div> <div>output = Used Disk space on /var == 161.26MB 1.73%</div> <div> </div> <div>How can I use this script with check_nrpe ?</div> <div> </div> <div>Is there any plugin i can use to get used disk space?</div> <div> </div> <div>Thanks,</div> <div>Kalpesh</div></div><br></div></div>-------------------------------------------------------------------------<br>This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>Build the coolest Linux based applications with Moblin SDK & win great prizes<br> Grand prize is a trip for two to an Open Source event anywhere in the world<br><a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br> _______________________________________________<br>Nagiosplug-help mailing list<br><a href="mailto:Nagiosplug-help@lists.sourceforge.net" target="_blank">Nagiosplug-help@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br> ::: Please include plugins version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br><br></blockquote></div><br><br clear="all"><br>-- <br>Alex Dehaini<br>Developer<br> Site - <a href="http://www.alexdehaini.com/" target="_blank">www.alexdehaini.com</a><br>Email - <a href="mailto:alexdehaini@gmail.com" target="_blank">alexdehaini@gmail.com</a><br></div></blockquote></div><br></div>-------------------------------------------------------------------------<br> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>Build the coolest Linux based applications with Moblin SDK & win great prizes<br>Grand prize is a trip for two to an Open Source event anywhere in the world<br> <a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________</a><br> Nagiosplug-help mailing list<br><a href="mailto:Nagiosplug-help@lists.sourceforge.net" target="_blank">Nagiosplug-help@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br> ::: Please include plugins version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br></div></div></div></div></div></div></blockquote> </div><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></blockquote></div><br></div></body></html>