From: Cook, G. <GW...@ma...> - 2004-08-11 22:26:52
|
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. 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). 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. 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. Some notes on this updated plugin: If checking a windows COUNTER, a definition is required in order to generate perfdata. The definition is usually optional. The following checks return performance data: CPULOAD USEDDISKSPACE MEMUSE COUNTER The following checks do NOT return performance data: CLIENTVERSION UPTIME SERVICESTATE PROCSTATE 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. 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. Garry W. Cook, CCNA Network Infrastructure Manager MACTEC, Inc. - http://www.mactec.com/ 303.308.6228 (Office) - 720.220.1862 (Mobile)=20 |