<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">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>
On 9/15/2012 8:56 AM, Aravinth Anto wrote:<br>
</div>
<blockquote
cite="mid:CAJdPMAghyTbW2Vu=p=LaOgPzrgQtjD7tb6cAOxCOxSKEx4OAAw@mail.gmail.com"
type="cite">Hi <br>
<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 moz-do-not-send="true"
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 class="h5"><br>
<br>
On 9/14/2012 7:22 PM, Aravinth Anto wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<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 class="im">
<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 moz-do-not-send="true" href="http://ad.doubleclick.net/clk;262219671;13503038;y" target="_blank">http://ad.doubleclick.net/clk;262219671;13503038;y</a>?
<a moz-do-not-send="true" 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 moz-do-not-send="true" href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true"
href="http://ad.doubleclick.net/clk;262219671;13503038;y"
target="_blank">http://ad.doubleclick.net/clk;262219671;13503038;y</a>?<br>
<a moz-do-not-send="true"
href="http://info.appdynamics.com/FreeJavaPerformanceDownload.html"
target="_blank">http://info.appdynamics.com/FreeJavaPerformanceDownload.html</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a moz-do-not-send="true"
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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
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 class="moz-txt-link-freetext" href="http://ad.doubleclick.net/clk;262219672;13503038;z">http://ad.doubleclick.net/clk;262219672;13503038;z</a>?
<a class="moz-txt-link-freetext" href="http://info.appdynamics.com/FreeJavaPerformanceDownload.html">http://info.appdynamics.com/FreeJavaPerformanceDownload.html</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">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>
</blockquote>
<br>
</body>
</html>