From: Cook, G. <GW...@ma...> - 2004-08-17 22:49:01
|
Jon, From looking at the bottom of this thread, it appears as though you did get the correct file. However, I have made changes to further improve the performance data output of check_nt since that first post. Please grab the check_nt.c.patch from the Plugins section of the PerfParse web site (http://perfparse.sf.net/). Once you have the patch, you should apply it to check_nt.c in the Nagios plugins source directory. You should be using at least version 1.4.0alpha plugins, if not the latest CVS. If you need help applying the patch, see the manuals for patch and possibly diff ('man patch' & 'man diff'). Once you've applied the patch to check_nt.c, you should recompile your plugins source using the 'configure' and 'make' commands. Then you can either 'make install' to reinstall all plugins, or simply copy the compiled check_nt binary to your nagios plugins directory (usually /usr/local/nagios/libexec/). -g Jon Lyons wrote: > Garry, I tried the check_nt plugin, however it doesn't > report the performace info..Did I get the right file?? >=20 >=20 > nagios# ./check_nt -H 10.4.1.115 -v MEMUSE -w 10 -c 50 > Memory usage: total:1983.00 Mb - used: 89.27 Mb (5%) - free: 1893.73 > Mb (95%) nagios# ./check_nt -H 10.4.1.115 -p1248 -v CPULOAD -l > 10,80,95,60,80,95,1440,80,95 CPU Load 0% (10 min average) 0% (60 min > average) 0% (1440 min average) nagios# ./check_nt -H 10.4.1.115 -v > MEMUSE -w 10 -c 50 Memory usage: total:1983.00 Mb - used: 89.21 Mb > (4%) - free: 1893.79 Mb (96%) nagios# >=20 >=20 >=20 > --- "Cook, Garry" <GW...@ma...> wrote: >=20 >> First off, I'm sorry for the cross-post, there were several people >> interested in this on different lists. If you're on a list that does >> not allow attachments, contact me off-list and I'll send you a copy >> of the plugin source. >>=20 >> I've added Performance Data to the check_nt plugin >> distributed with >> NSClient and Nagios plugins. A copy of the source is attached, please >> feel free to compile and test (don't forget to >> backup your original >> check_nt plugin). >>=20 >> I'm not a master coder, just a hacker, but I was >> able to make it work >> well for my implementation. >> With that said, if anyone has any problems with it, please let me >> know. But keep in mind that I don't have a lot of >> different systems to compile >> on, so I may not be able to fix it for you. >>=20 >> I've commented the code pretty well, so it should be readily apparent >> where things have been added by me. I have not >> changed the revision >> number, so I'll probably submit this as a patch >> after I have some >> feedback from people. I'm guessing that I should >> submit it to both >> Nagios Plugins devel as well as the NSClient >> developers. If any of you >> reading this are developers of NSClient, please >> contact me off-list and >> I'll be happy to submit this in whatever format your require. >>=20 >> Some notes on this updated plugin: >>=20 >> If checking a windows COUNTER, a definition is >> required in order to >> generate perfdata. >> The definition is usually optional. >>=20 >> The following checks return performance data: >> CPULOAD >> USEDDISKSPACE >> MEMUSE >> COUNTER >>=20 >> The following checks do NOT return performance data: CLIENTVERSION >> UPTIME >> SERVICESTATE >> PROCSTATE >>=20 >> I didn't see a need for, nor an easy way to add, >> performance data for >> the CLIENTVERSION, UPTIME, SERVICESTATE, & PROCSTATE checks. If you >> disagree with my assessment of the need for perfdata with any of >> these, please let me know and maybe I'll try to add that as well. >>=20 >> I have also changed the code for the MEMUSE check, >> as it did not appear >> to give the proper output originally. Please let me know if I've >> borked this somehow, although on my systems it shows output that >> looks good. Alternatively, just look at the code. I've >> documented the change and >> anyone that can compile and install Nagios should >> easily be able to >> change it back and recompile the plugin. >>=20 >> Garry W. Cook, CCNA >> Network Infrastructure Manager >> MACTEC, Inc. - http://www.mactec.com/ >> 303.308.6228 (Office) - 720.220.1862 (Mobile) >>=20 >=20 >> ATTACHMENT part 2 application/octet-stream name=3Dcheck_nt.c Garry W. Cook, CCNA Network Infrastructure Manager MACTEC, Inc. - http://www.mactec.com/ 303.308.6228 (Office) - 720.220.1862 (Mobile) |