if your echo statement has $stacktrace it will print that only till to the limit "Additional Info field".

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).
So as long as you send it to nagios to this format it identifies.

Now coming to your script, you echo statements at the last part of IF , Should have your stack trace.

============SNIP=============

        then
echo "$stacktrace" #### The stack trace should hold the stack trace string.
        exit $ST_CR

===========SNIP===========


-PRA

On 9/15/2012 8:56 AM, Aravinth Anto wrote:
Hi

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?

Thanks in advance.

On Sat, Sep 15, 2012 at 12:31 AM, PRA <nagios...@gmail.com <mailto:nagios...@gmail.com>> wrote:

    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
    in the alerts
    -S


    On 9/14/2012 7:22 PM, Aravinth Anto wrote:
    Hello all,

    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.


    Are there any ways to do it?


    Thanks in advance.




    
------------------------------------------------------------------------------
    Got visibility?
    Most devs has no idea what their production app looks like.
    Find out how fast your code is with AppDynamics Lite.
    http://ad.doubleclick.net/clk;262219671;13503038;y?
    http://info.appdynamics.com/FreeJavaPerformanceDownload.html


    _______________________________________________
    Nagios-users mailing list
    Nagios-users@lists.sourceforge.net  
<mailto:Nagios-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/nagios-users
    ::: Please include Nagios version, plugin version (-v) and OS when 
reporting any issue.
    ::: Messages without supporting info will risk being sent to /dev/null


    
------------------------------------------------------------------------------
    Got visibility?
    Most devs has no idea what their production app looks like.
    Find out how fast your code is with AppDynamics Lite.
    http://ad.doubleclick.net/clk;262219671;13503038;y?
    http://info.appdynamics.com/FreeJavaPerformanceDownload.html
    _______________________________________________
    Nagios-users mailing list
    Nagios-users@lists.sourceforge.net
    <mailto:Nagios-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/nagios-users
    ::: Please include Nagios version, plugin version (-v) and OS when
    reporting any issue.
    ::: Messages without supporting info will risk being sent to /dev/null




------------------------------------------------------------------------------
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.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html


_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue.
::: Messages without supporting info will risk being sent to /dev/null

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

Reply via email to