Forum Discussion

Ashish_Jais_668's avatar
Ashish_Jais_668
Icon for Nimbostratus rankNimbostratus
May 22, 2012

Email Alert on F5 GTM

Hi, I am trying to configure email alert in GTM and some forums were very helpful to get this done. Now I need to send multiple lines in body field through email when event triggers. when I use single line (config attached), it works fine but multiple lines dont work.

 

Is there any limitation of this body field or any syntax for that?

 

 

 

Thanks!!!

 

  • Hi Ashish,

     

     

    If you are planning to send multi line mail, I would recommend you to create a temp file will all the required data (Body of the mail. Can be multiple lines) and use the linux command to send mail.

     

     

    mail -s "" <

     

     

    Eg:

     

     

    mail -s "Test message from F5" abcdef@f5.com < /var/tmp/test.tmp

     

     

    where, test.tmp has the body of the mail.

     

     

     

    - Santosh.

     

  • Thanks Santosh, I can use this method and send the email manually. But I want the same when snmp trap triggers. I used below but was getting """"local/gtm-cidc emerg logger: Re-starting alertd"""" errors

     

     

    alert MEX_POOL_DOWN "SNMP_TRAP: Pool Proxy_Mex state change green --> red (Pool Proxy_MeX: No enabled pool members available)" {

     

    snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.655"

     

    }

     

     

     

    alert MEX_POOL_DOWN "SNMP_TRAP: Pool Proxy_Mex state change green --> red (Pool Proxy_Mex: No enabled pool members available)" {

     

    snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.655";

     

    mail -s "testmail" xxx@f5.com < /tmp/email_test.tmp

     

    }