<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Yadvendra.</p>
    <p>In order to define the alarms threshold, you have to edit your
      custom monitoring and test the returned value to decide its color
      (yellow = warning, red = alert)</p>
    <p>There are different ways to implement this, depending on the
      logic of your monitoring script.</p>
    <p>If you have only one value to test, and using a shell script, you
      may use something like</p>
    <p><code><br>
    </p>
    <p>max_warning = 5<br>
    </p>
    <p>max_alert = 10</p>
    <p>color = undefined<br>
    </p>
    <p>if [ $value -ge $max_alert]; then</p>
    <p>    color = red<br>
    </p>
    <p>elif [$value -ge $max_warning] ; then</p>
    <p>    color = yellow</p>
    <p>else<br>
    </p>
    <p>    color = green</p>
    <p></code><br>
    </p>
    <p>Then you send the color to xymon server using the appropriate
      syntax.</p>
    <div class="moz-cite-prefix">Le 27/08/2019 à 15:30, Yadvendra
      kushwaha a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHeMQAtb=mWu0iHLiU-DFg9dihzSGS+8OJZ77PLvW3WfYC8yqw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">I managed to get the data on server form client,
        Need help in setting the threshold part (warning and critical )</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Aug 27, 2019 at 8:18
          AM Yadvendra kushwaha <<a
            href="mailto:yyyadvendra@gmail.com" moz-do-not-send="true">yyyadvendra@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">Hi There 
            <div>
              <div>I am looking for a custom monitoring, my script runs
                on a client  and returns a number, I need to add this to
                the server and the threshold levels</div>
              <div>Ex- </div>
              <div>my-test 5 10</div>
              <div><br>
              </div>
              <div>any help please?</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Xymon mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
</pre>
    </blockquote>
  </body>
</html>