[NSClient++] Topic #424 - send some performance data http://nsclient.org/nscp/discussion/topic/424 <p> send some performance data </p> en-us NSClient++ /trac/nswide.png http://nsclient.org/nscp/discussion/topic/424 Trac 1.0beta1 - DiscussionPlugin dinesh707 Thu, 23 Jul 2009 12:39:15 GMT Topic #424 - send some performance data http://nsclient.org/nscp/discussion/topic/424#topic http://nsclient.org/nscp/discussion/topic/424#topic <p> I need to send some performance data back to the nagios. </p> <p> Currently im monitoring a system using those External Scripts, but what i only get is status and some other details </p> <p> Can you please give me a sample of a .bat file which sends back performance data as well. </p> <p> And i need to know the format of performance data. (If there is any specific way) </p> <p> BR, </p> Topic dinesh707 Fri, 24 Jul 2009 08:37:37 GMT Reply #1324 to topic #424 - send some performance data http://nsclient.org/nscp/discussion/message/1324#message1324 http://nsclient.org/nscp/discussion/message/1324#message1324 <p> Thank you MickeM </p> <p> now it works fine </p> Message mickem Fri, 24 Jul 2009 04:52:45 GMT Reply #1323 to topic #424 - send some performance data http://nsclient.org/nscp/discussion/message/1323#message1323 http://nsclient.org/nscp/discussion/message/1323#message1323 <p> That will give you "":s though which you probably dont want and on NT based windows there are ways around it: <a class="ext-link" href="http://ss64.com/nt/echo.html"><span class="icon">​</span>http://ss64.com/nt/echo.html</a> </p> <p> Like so: </p> <pre class="wiki">C:\&gt;echo foo^|bar foo|bar </pre><p> <em> MickeM </em></p> Message mickem Fri, 24 Jul 2009 04:48:21 GMT Reply #1322 to topic #424 - send some performance data http://nsclient.org/nscp/discussion/message/1322#message1322 http://nsclient.org/nscp/discussion/message/1322#message1322 <p> ohh... </p> <p> The | char is a command so you need to escape it like so: </p> <pre class="wiki">C:\&gt;echo foo|bar bar är inte ett internt kommando, externt kommando, program eller kommandofil. C:\&gt;echo "foo|bar" "foo|bar" </pre><p> <em> MickeM </em></p> Message dinesh707 Thu, 23 Jul 2009 23:07:25 GMT Reply #1321 to topic #424 - send some performance data http://nsclient.org/nscp/discussion/message/1321#message1321 http://nsclient.org/nscp/discussion/message/1321#message1321 <p> The error code inside the NSClient++ is </p> <p> error:modules\CheckExternalScripts\CheckExternalScripts.cpp:141: The command (scripts\fi.oulu.ubilife.rm.core.NFCReader.bat) returned an invalid return code: 255 </p> Message dinesh707 Thu, 23 Jul 2009 23:04:08 GMT Reply #1320 to topic #424 - send some performance data http://nsclient.org/nscp/discussion/message/1320#message1320 http://nsclient.org/nscp/discussion/message/1320#message1320 <p> I tried in the same way. And i checked it in the nagios plugins as well. </p> <p> But when ever i add the grep symbol to that line it starts giving this error in the nagios. And the status of it changers to UNKNOWN as well. <strong> Status Information:'perfdata' is not recognized as an internal or external command, operable program or batch file.</strong> </p> <p> Can you please give a try on this and check an possible way to do this. </p> <p> Thank you </p> Message mickem Thu, 23 Jul 2009 12:55:29 GMT Reply #1318 to topic #424 - send some performance data http://nsclient.org/nscp/discussion/message/1318#message1318 http://nsclient.org/nscp/discussion/message/1318#message1318 <p> Can fix that later on, but in essence, the preformance data is passed "as is" so check how it looks for another command. </p> <p> In short though: </p> <pre class="wiki">echo &lt;string&gt;|&lt;performance data&gt; exit &lt;code&gt; </pre><p> &lt;performance data&gt; is along the following lines (dont recall from the top of my head so this is "aproximation"): &lt;key&gt;=&lt;value&gt;;&lt;warn&gt;;&lt;crit;&lt;max&gt;;&lt;min&gt;; </p> <p> so: </p> <pre class="wiki">echo OK We are all good|perfdata=34;10;12;100;0 exit 0 </pre><p> But again, I dont recall the exact syntax so check the nagios docs or a command... </p> <p> <em> Michael Medin </em></p> Message