<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.StileMessaggioDiPostaElettronica18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:985207358;
        mso-list-type:hybrid;
        mso-list-template-ids:1308292992 1396097738 68157443 68157445 68157441 68157443 68157445 68157441 68157443 68157445;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=IT link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Solved.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>There were two problems:<o:p></o:p></span></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>         
</span></span></span><![endif]><span lang=EN-US style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>In the command file, there
was an command without absolute path (but it is in the same folder of command
file, and that folder was setted like “script_dir” in the NSC.ini)<o:p></o:p></span></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>         
</span></span></span><![endif]><span lang=EN-US style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>The variable “script_dir”
in the NSC.ini is totally useless </span><span lang=EN-US style='font-size:
11.0pt;font-family:Wingdings;color:#1F497D'>L</span><span lang=EN-US
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Now my problem is understand how to manipulate the output like I
do in unix (shell scripting), because I don’t know an equivalent command
in DOS like AWK ?!?!?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards for all suggestions , were very useful for me.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Marco<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif"'>Da:</span></b><span
style='font-size:10.0pt;font-family:"Segoe UI","sans-serif"'> Natxo Asenjo
[mailto:natxo.asenjo@gmail.com] <br>
<b>Inviato:</b> marted́ 6 ottobre 2009 18.52<br>
<b>A:</b> Nagios Users Mailinglist<br>
<b>Oggetto:</b> Re: [Nagios-users] R: R: R: nsclient++ and nrpe commands<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>hi,<br>
<br>
could you post your nsc.ini and bat files, please? <br>
<br>
sanitize as necessary (do not post passwords ;-) )<br clear=all>
-- <br>
Groeten,<br>
J.Asenjo<br>
<br>
<o:p></o:p></p>

<div>

<p class=MsoNormal>On Tue, Oct 6, 2009 at 8:28 AM, Marco Borsani <<a
href="mailto:m.borsani@it.net">m.borsani@it.net</a>> wrote:<o:p></o:p></p>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>Hi</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>I setted the full
path (C:\program files\....) in this way, tha batch did not work at all .</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>I try also to put an
“@exit 0” at the end of ths script, notting changed.</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Any other ideas ?</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Marco</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>

<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>

<p><b><span style='font-size:10.0pt'>Da:</span></b><span style='font-size:10.0pt'>
Natxo Asenjo [mailto:<a href="mailto:natxo.asenjo@gmail.com" target="_blank">natxo.asenjo@gmail.com</a>]
<br>
<b>Inviato:</b> luned́ 5 ottobre 2009 18.38<br>
<b>A:</b> Nagios Users Mailinglist<br>
<b>Oggetto:</b> Re: [Nagios-users] R: R: nsclient++ and nrpe commands</span><o:p></o:p></p>

</div>

<p> <o:p></o:p></p>

<div>

<p>On Mon, Oct 5, 2009 at 3:23 PM, Marco Borsani <<a
href="mailto:m.borsani@it.net" target="_blank">m.borsani@it.net</a>> wrote:<o:p></o:p></p>

<div>

<div>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Excuse me , I did
not wrote the real error message I am receiving.</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>I run from nagios
server:</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>./check_nrpe -H
<ip address> -c disk0</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>And receive this:</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>'check_openmanage.exe'
is not recognized as an internal or external command, operable program or batch
file.</span><o:p></o:p></p>

</div>

</div>

<div>

<p>ok, so the bat file disk0 is being executed. Try setting the full path to
check_openmanage.exe in the bat file because apparently it is not in the path
of your windows session.<br>
 <o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204)'>

<div>

<div>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>The nsc.ini file
there are all the parameters you suggested me and the command
“disk0” is defined:</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>disk0=scripts\Disk0.bat</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>If you run Disk0.bat
in MSdos shell, it works correctly. </span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Is has only one raw
(@check_openmanage.exe -v | find "Physical Disk 0:0")</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>In the nsclientlog
we read:</span><o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>2009-10-05 15:22:09:
error:modules\NRPEListener\NRPEListener.cpp:263: The command (disk0) returned
an invalid return code: 255</span><o:p></o:p></p>

</div>

</div>

</blockquote>

<div>

<p><br>
you need to return valid error levels that nagios understand: 0 is 0k, 1 is warning,
2 is critical and 3 is unknown. Otherwise nagios does not know what to do with
them.<br>
 <o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204)'>

<div>

<div>

<p> <o:p></o:p></p>

<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>I always restart
nsclientpp when I modified the NSC.ini file.</span><o:p></o:p></p>

</div>

</div>

</blockquote>

<div>

<p>good, just checking ;-)<br>
 <br>
natxo<o:p></o:p></p>

</div>

</div>

<p> <o:p></o:p></p>

</div>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</body>

</html>