Forum Discussion

dirome's avatar
dirome
Icon for Cirrus rankCirrus
Jun 25, 2019

Email notification for pool members

Hi,

 

Is possible to send an email when a specific pool member goes down or up? i tried to do configuring the user_alert.conf but i cannot see the email

 

 

  • try below sample

     

    create host entry in f5 for email gateway

    mail.ae - 10.1.122.13 

     

    cp /config/user_alert.conf /config/user_alert.conf.SOL3727

     

    modify /sys outbound-smtp mailhub mail.ae:25

     

    save /sys config

     

    echo "ssmtp test mail" | mail -vs "Test email for SOL13180" abc@mail.ae

     

     

    create /sys management-route 10.1.122.13/32 gateway 10.x.x.1

     

     

    echo "ssmtp test mail" | mail -vs "f5 test mail" abc@mail.ae

     

    tmsh restart /sys service alertd

     

     

    Full pool email alert

     

     

    custome pool email alerts

     

    ==================

    user alert file

     

    vi /config/user_alert.conf

     

    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_DOWN "Pool (.*?) member (.*?):(.*?) monitor status (.*?)." {

        email toaddress="netsec@mail..ae"

        fromaddress="primarybox@mail.ae"

        body="A pool member went down"

    }

     

    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_UP "Pool (.*?) member (.*?):(.*?) monitor status up." {

        email toaddress="netsec@mail.ae"

        fromaddress="primarybox@mail.ae"

        body="A pool member came back up"

    }

     

  • It is absolutely possible, and is explained in Solution K3667 (https://support.f5.com/csp/article/K3667), although the explanation of how to create the alert and matching conditions is incorrect, and you should have a look at solution K3727 (https://support.f5.com/csp/article/K3727) for how to create the match.

     

    You'll also need to configure an SMTP resource for the BIG-IP to be able to send mail, and that's covered in solution K13180 (https://support.f5.com/csp/article/K13180).

  • Snl's avatar
    Snl
    Icon for Cirrostratus rankCirrostratus

    try below sample

     

    create host entry in f5 for email gateway

    mail.ae - 10.1.122.13 

     

    cp /config/user_alert.conf /config/user_alert.conf.SOL3727

     

    modify /sys outbound-smtp mailhub mail.ae:25

     

    save /sys config

     

    echo "ssmtp test mail" | mail -vs "Test email for SOL13180" abc@mail.ae

     

     

    create /sys management-route 10.1.122.13/32 gateway 10.x.x.1

     

     

    echo "ssmtp test mail" | mail -vs "f5 test mail" abc@mail.ae

     

    tmsh restart /sys service alertd

     

     

    Full pool email alert

     

     

    custome pool email alerts

     

    ==================

    user alert file

     

    vi /config/user_alert.conf

     

    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_DOWN "Pool (.*?) member (.*?):(.*?) monitor status (.*?)." {

        email toaddress="netsec@mail..ae"

        fromaddress="primarybox@mail.ae"

        body="A pool member went down"

    }

     

    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_UP "Pool (.*?) member (.*?):(.*?) monitor status up." {

        email toaddress="netsec@mail.ae"

        fromaddress="primarybox@mail.ae"

        body="A pool member came back up"

    }

     

    • dirome's avatar
      dirome
      Icon for Cirrus rankCirrus

      Hi SNL, I really appreciate this answer, before you posted it i could did with coworkers help, but all your description in the example fit perfectly with this question 👏

    • Keyur's avatar
      Keyur
      Icon for Nimbostratus rankNimbostratus

      Here is my config and It does not work for me. Can you help??

      outbound smtp and name server are configured properly. Routes have been added to ping smtp.

      But somehow this does not work.

       

      alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS "Pool /Common/nginxtest_https_pool member /Common/stag-lnx-238:33001 monitor status down." {

      snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.10"

      email toaddress="xxxx@xxx.org"

          fromaddress="root"

          body="A pool member went down"

      }

      alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS_UP "Pool /Common/nginxtest_https_pool member /Common/stag-lnx-238:33001 monitor status up." {

      snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.11"

      email toaddress="xxxxx@xxx.org"

          fromaddress="root"

          body="A pool member is up"

      }