[NSClient++] Topic #950 - checkMEM -> define service ?
http://nsclient.org/nscp/discussion/topic/950
<p>
checkMEM -> define service ?
</p>
en-usNSClient++/trac/nswide.png
http://nsclient.org/nscp/discussion/topic/950
Trac 1.0beta1 - DiscussionPluginTJ-DKTue, 10 Apr 2012 09:11:15 GMTTopic #950 - checkMEM -> define service ?
http://nsclient.org/nscp/discussion/topic/950#topic
http://nsclient.org/nscp/discussion/topic/950#topic
<p>
Help... plz...
</p>
<p>
I'm having problem understand the define service syntax for NSClient checkMEM.
</p>
<p>
It's not a problem with NSClient++, it works!, but I have tried several syntax for the checkMEM without luck... Hope you can help.
</p>
<p>
<strong>Monitor Remote</strong><br />
Server Win2k8 64bit<br />
NSClient++ 0.3.9.328<br />
NSC.ini: alias_mem=checkMem <a class="wiki" href="/nscp/wiki/MaxWarn">MaxWarn</a>=90% <a class="wiki" href="/nscp/wiki/MaxCrit">MaxCrit</a>=95% type=physical<br />
</p>
<p>
<strong>Monitor Server</strong><br />
Linux(Ubuntu) - Nagios<br />
NRPE Version: 2.12<br />
</p>
<p>
<strong>commands.cfg:</strong><br />
define command {<br />
</p>
<blockquote>
<p>
command_name CheckMEM<br />
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckMEM -a <a class="wiki" href="/nscp/wiki/MaxWarn">MaxWarn</a>=$ARG2$% <a class="wiki" href="/nscp/wiki/MaxCrit">MaxCrit</a>=$ARG3$% <a class="wiki" href="/nscp/wiki/ShowAll">ShowAll</a> type=physical<br />
}<br />
</p>
</blockquote>
<p>
<strong>windows.cfg</strong><br />
define service{<br />
</p>
<blockquote>
<p>
use generic-service<br />
host_name <<em>MISC SERVERSHOST</em>><br />
service_description Memory Usage - Physical<br />
<strong>check_command CheckMEM!????????????????????????????????</strong><br />
}<br />
</p>
</blockquote>
<p>
How should this looks like to before it works! I have a CRITICAL alarm no matter what I type in the check_commands "CheckMEM bla bla bla...."
</p>
<p>
Current Status: CRITICAL (for 0d 1h 2m 34s)
Status Information: CRITICAL: physical memory: Total: 128G - Used: 99.7G (77%) - Free: 28.3G (23%) > critical
Performance Data: 'physical memory %'=77%;0;0 'physical memory'=107075739648B;0;0;0;137428119552
Current Attempt: 3/3 (HARD state)
</p>
<p>
Normal Commands are working fine
</p>
<p>
# ./check_nrpe -H <<em>IP</em>> -c CheckMEM -a <a class="wiki" href="/nscp/wiki/MaxWarn">MaxWarn</a>=80% <a class="wiki" href="/nscp/wiki/MaxCrit">MaxCrit</a>=90% <a class="wiki" href="/nscp/wiki/ShowAll">ShowAll</a> type=physical<br />
OK: physical memory: 99.7G|'physical memory %'=77%;80;90 'physical memory'=99.71GB;102.39;115.19;0;127.99
</p>
<p>
But I don't see this output when trying in a define services. Plz help if time, need the know the physical memory. check_nt gives physical+page, that I can't use.
</p>
<p>
I have same issue on Win2k3 32bit.
</p>
TopicTJ-DKTue, 10 Apr 2012 13:47:06 GMTReply #2513 to topic #950 - checkMEM -> define service ?
http://nsclient.org/nscp/discussion/message/2513#message2513
http://nsclient.org/nscp/discussion/message/2513#message2513
<p>
Thank you...
</p>
<p>
I found this deeper in the commands.cfg file...
</p>
<blockquote>
<p>
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -n
</p>
</blockquote>
<p>
and because of that it would not work with $ARG1$ and $ARG2$...
</p>
<p>
I have now change it to one check_nrpe with correct arguments... and now it seems to work correct...
</p>
<p>
Thank you for you help.
</p>
<p>
<em>TJ</em>
</p>
MessagemickemTue, 10 Apr 2012 12:46:55 GMTReply #2512 to topic #950 - checkMEM -> define service ?
http://nsclient.org/nscp/discussion/message/2512#message2512
http://nsclient.org/nscp/discussion/message/2512#message2512
<p>
Actually not weird at all:
</p>
<pre class="wiki">command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckMEM -a MaxWarn=$ARG2$% MaxCrit=$ARG3$% ShowAll type=physical
</pre><p>
Your command says to use <strong>$ARG2$</strong> and <strong>$ARG3$</strong> which means you "discard" the first one...
Change into this:
</p>
<pre class="wiki">command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=physical
</pre><p>
And I think it will work as you expect it...
</p>
<p>
<em> Michael Medin
</em></p>
MessageTJ-DKTue, 10 Apr 2012 12:08:18 GMTReply #2511 to topic #950 - checkMEM -> define service ?
http://nsclient.org/nscp/discussion/message/2511#message2511
http://nsclient.org/nscp/discussion/message/2511#message2511
<p>
<strong>Solution:</strong> <em>was a bit wierd... 2X ! </em>
</p>
<blockquote>
<p>
check_command CheckMEM!!92%!97%
</p>
</blockquote>
<p>
Is it common !! are required when using NSClient++ internal scripts/features?
</p>
Message