Forum Discussion

SP_266134's avatar
SP_266134
Icon for Nimbostratus rankNimbostratus
Dec 26, 2017

Customize the Email alert messages F5 - Subject

How to get the subject message and replace it in the body and have a more friendly Subject like pool member down or Member up. In the body I would like to see the details of the error.

 

I am using 13.0 versions and My research indicate that we can append the Subject in the body of the email . body="subject=test/n fsafsfsafsaffaf" IS this the only way. ? Can this be customized like this?

 

Subject: Pool Member Down Body: A Pool /Common/POOL Name member /Common/Server Name monitor status down. [ /Common/http: down; last error: /Common/http: No successful responses received before deadline.; Unable to connect @2017/12/23 20:35:53. ]

 

alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS_UP { snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.11"; email toaddress="" fromaddress="" body="" }

 

  • I am using 13.0 versions and My research indicate that we can append the Subject in the body of the email . body="subject=test/n fsafsfsafsaffaf" IS this the only way. ? Can this be customized like this?

    did you test and it worked?

    i do not think it works because there is newline between subject and body i.e. subject in user_alert.conf is not being recognized.

    e.g.

    // config
    
    [root@ve13a:Active:In Sync] config  cat user_alert.conf
    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS {
      email toaddress=
      fromaddress="ve13a@f5.com"
      body="subject=test\nThe test of this Solution worked!"
    }
    
    // tcpdump
    
    220  ESMTP
    HELO ve13a.acme.local
    250 
    MAIL FROM:
    250 sender  ok
    RCPT TO:
    250 recipient  ok
    DATA
    354 go ahead
    Received: by ve13a.acme.local (sSMTP sendmail emulation); Wed, 27 Dec 2017 08:28:18 +0800
    Date: Wed, 27 Dec 2017 08:28:18 +0800
    From: ve13a@f5.com
    To: 
    Subject: 01070638:5: Pool /Common/foo member /Common/200.200.200.101:80 monitor status down. [ /Common/fake: down; last error:  ]  [ was unchecked for 0hr:4mins:47sec ]
    
    subject=test\nThe test of this Solution worked!
    .
    250 ok:  Message 30998457 accepted
    QUIT
    221 
    
    // mail client
    
    -----Original Message-----
    From: ve13a@f5.com [mailto:ve13a@f5.com] 
    Sent: Wednesday, December 27, 2017 8:28 AM
    To: 
    Subject: 01070638:5: Pool /Common/foo member /Common/200.200.200.101:80 monitor status down. [ /Common/fake: down; last error: ] [ was unchecked for 0hr:4mins:47sec ]
    
    subject=test\nThe test of this Solution worked!
    

    there is rfe which not implemented yet.

    ID273716 RFE: allow user customizable subject line for alertd e-mails