<br><div class="gmail_quote">On Mon, Sep 17, 2012 at 7:34 AM, PRA <span dir="ltr"><<a href="mailto:nagiospra@gmail.com" target="_blank">nagiospra@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>if your echo statement has $stacktrace
      it will print that only till to the limit "Additional Info field".<br>
      <br>
      NAGIOS gets string and return code from its plugins.String is to
      print the message and return code is to identify the type of alert
      (ok,warning,critical).<br>
      So as long as you send it to nagios to this format it identifies.<br>
      <br>
      Now coming to your script, you echo statements at the last part of
      IF , Should have your stack trace.<br>
      <br>
      ============SNIP=============<br>
      <br>
              then<br>
                  echo "$stacktrace"    #### The stack trace should hold
      the stack trace string.<br>
              exit $ST_CR<br>
      <br>
      ===========SNIP===========<br>
      <br>
      <br>
      -PRA<br>
      <br></div></div></blockquote><div><br></div><div>Thanks for your reply. It works now. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<div>
      On 9/15/2012 8:56 AM, Aravinth Anto wrote:<br>
    </div>
    <blockquote type="cite">Hi <br><div><div class="h5">
      <div><br>
      </div>
      <div>Thanks for the reply. I have attached my script. And if I say
        I'm returning the stack trace from my script, how come Nagios
        will know that? I can name the hole stack trace a name and can
        use $stacktrace in nagios will work?</div>
      <div><br>
      </div>
      <div>Thanks in advance.<br>
        <br>
        <div class="gmail_quote">On Sat, Sep 15, 2012 at 12:31 AM, PRA <span dir="ltr"><<a href="mailto:nagiospra@gmail.com" target="_blank">nagiospra@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>The script shoud generate two types of out put
                (return code and text ), If the can be anything if you
                pass the stack trace to text it would print that only <br>
                in the alerts<br>
                -S
                <div>
                  <div><br>
                    <br>
                    On 9/14/2012 7:22 PM, Aravinth Anto wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div>Hello all,</div>
                    <div><br>
                    </div>
                    I wish to customize my email alerts that is sent by
                    Nagios. Say for example, I want to send the email
                    along with error trace of Tomcat which caused
                    the exception.
                    <div><br>
                    </div>
                    <div><br>
                    </div>
                    <div>Are there any ways to do it?</div>
                    <div><br>
                    </div>
                    <div><br>
                    </div>
                    <div>Thanks in advance.<br>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <div>
                  <pre>------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
<a href="http://ad.doubleclick.net/clk;262219671;13503038;y" target="_blank">http://ad.doubleclick.net/clk;262219671;13503038;y</a>?
<a href="http://info.appdynamics.com/FreeJavaPerformanceDownload.html" target="_blank">http://info.appdynamics.com/FreeJavaPerformanceDownload.html</a></pre>
                  <br>
                  <fieldset></fieldset>
                  <br>
                  <pre>_______________________________________________
Nagios-users mailing list
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null</pre>
                </div>
              </blockquote>
              <br>
            </div>
            <br>
------------------------------------------------------------------------------<br>
            Got visibility?<br>
            Most devs has no idea what their production app looks like.<br>
            Find out how fast your code is with AppDynamics Lite.<br>
            <a href="http://ad.doubleclick.net/clk;262219671;13503038;y" target="_blank">http://ad.doubleclick.net/clk;262219671;13503038;y</a>?<br>
            <a href="http://info.appdynamics.com/FreeJavaPerformanceDownload.html" target="_blank">http://info.appdynamics.com/FreeJavaPerformanceDownload.html</a><br>
            _______________________________________________<br>
            Nagios-users mailing list<br>
            <a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
            <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
            ::: Please include Nagios version, plugin version (-v) and
            OS when reporting any issue.<br>
            ::: Messages without supporting info will risk being sent to
            /dev/null<br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
<a href="http://ad.doubleclick.net/clk;262219672;13503038;z" target="_blank">http://ad.doubleclick.net/clk;262219672;13503038;z</a>?
<a href="http://info.appdynamics.com/FreeJavaPerformanceDownload.html" target="_blank">http://info.appdynamics.com/FreeJavaPerformanceDownload.html</a></pre><div class="im">
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Nagios-users mailing list
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null</pre>
    </div></blockquote>
    <br>
  </div>

<br>------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>