<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi everybody,<br>
      I've the following situation. I' using a script, which is run in
      the <execstatement>.<br>
      The script gets some parameters from the CLI:<br>
    </p>
    <p><execstatement>{"check":"/usr/bin/python3.5
      /usr/local/nagios/libexec/script_test.py -h hostname <b>-w
        host=myHost and par=myPar</b> ",
      "label":"value"}</execstatement></p>
    <p>One of the CLI parameters, (-w in this example), takes a string
      separated by spaces (%s). <br>
      I've seen that Bischeck in this case does not run the
      script,raising an exception,  probably does not recognize the
      spaces.<br>
      Also surrounding the parameter with ' or escaped \" does not work:</p>
    <p><b>-w 'host=myHost and par=myPar'<br>
      </b><b><b>-w \"host=myHost and par=myPar\"</b></b></p>
    <p><b><b><br>
        </b></b></p>
    <p>The workaround i found is to separate the string argument with a
      comma, and inside the script split them by the comma and recreate
      the desired string.<b><b> </b></b>(host=myHost,and,par=myPar).<br>
      Is there an easier way?</p>
    <p>Thanks,<br>
      Francesco<br>
    </p>
    <p><b><b><br>
        </b></b></p>
    <p><br>
    </p>
    <p><br>
    </p>
    <div class="moz-signature">-- <br>
      <meta http-equiv="content-type" content="text/html;
        charset=iso-8859-15">
      <title></title>
      <p class="MsoNormal"><font color="#3333ff" size="-1">Francesco
          Giuseppe Toffoli</font><span
          style="font-size:10.0pt;font-family:"Times New
          Roman","serif";color:black;mso-fareast-language:IT"><br>
          Monitoring Engineer</span><span
          style="mso-fareast-language:IT"></span></p>
      <p class="MsoNormal"><span
          style="font-size:10.0pt;font-family:"Times New
          Roman","serif";mso-fareast-language:IT">GSE
          Department</span><span style="mso-fareast-language:IT"></span>
      </p>
      <p class="MsoNormal"><span
          style="font-size:10.0pt;font-family:"Times New
          Roman","serif";mso-fareast-language:IT">Tel:
          +39 0112738748<font size="-1">8</font></span><span
          style="mso-fareast-language:IT"><o:p></o:p></span></p>
      <span style="font-size:10.0pt;font-family:"Times New
        Roman","serif";mso-fareast-language:IT">Mobile:
        +39 349.800.60.35 <span style="color:black"><br>
          Email: </span><u><span style="color:blue"><a
              href="mailto:ftoffoli@skylogic.it">ftoffoli@skylogic.it</a></span></u></span><span
        style="font-size:12.0pt;font-family:"Times New
        Roman","serif";color:black;mso-fareast-language:IT"><br>
      </span><b><span style="font-size:12.0pt;font-family:"Times
          New
Roman","serif";color:#000099;mso-fareast-language:IT"><img
            shrinktofit="true" id="_x0000_i1025"
src="imap://ftoffoli@imap.skylogic.it:143/fetch%3EUID%3E/Drafts%3E250579?part=&filename=/home/franz/skylogic_logo.jpeg"
            width="190" border="0" height="44"><br>
        </span></b><b><span
          style="font-size:10.0pt;font-family:"Times New
          Roman","serif";color:#000099;mso-fareast-language:IT">Skylogic
          S. p. A.</span></b><span
        style="font-size:10.0pt;font-family:"Times New
        Roman","serif";color:black;mso-fareast-language:IT"><br>
        Strada Pianezza, 289<br>
        10151 Torino, Italy </span> </div>
  
<br><html><body> This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the Company.<br> No employee or agent is authorized to conclude any binding agreement on behalf of this Company nor, through thi
 s latter, any of the Eutelsat Communication group with another party by email without express written confirmation by a duly authorized officer of the Company. The list of duly authorized officers and the scope of their powers is published on the Trade Register according to the national law of each affiliate.</body></html>

<br></body>
</html>