Alert Emails

  • Creator
    Topic
  • #52209
    Kirby Knight
    Participant

      I am researching the best way to setup alerts for our Cloverleaf environment.  I have reviewed some of the forum posts and it seems there are a lot of different ways to setup email alerts.  

      Given our current configuration, what is the best way to setup email alerts?

      Here is our configuration;

      Server OS: Unix AIX

      Cloverleaf:  Version: 5.5PRev1

      Exchange Server

      Thanks in advance!

    Viewing 19 reply threads
    • Author
      Replies
      • #73420
        Keith McLeod
        Participant

          I always tried to keep it simple with something like:

          mail -s “[sitename] %A [end]” < %F

          for mail and for text msgs

          echo %A | mail

          I usually use an alias for the email address in the alert configuration so I can add groups or more individuals.  The action in this case is exec.  The one for text I intentionally leave out the subject and prefer no trailer be added since text msgs are short.  Hope this helps….

        • #73421
          David Harrison
          Participant

            Kirby,

            If you need it, the attached document details the notes I made for setting up sendmail on Solaris.

          • #73422
            Kirby Knight
            Participant

              Thanks for the response Kieth,

              Our Unix server person says that smtp request our pointed to our Exhange 2010 server.  Should what you posted still work in this environment?

            • #73423
              Keith McLeod
              Participant

                Yes.  The %A is a narrrative of the configuration.

                Example: Thread last inbound message received time of dcaptor_16075_in is more than or equal to 600.

                %F contains the same info in a temp file to add as the body of your alert if you wish.  I do it because some systems require the body be populated.

                There are many variations as to how you build on this….

              • #73424
                Kirby Knight
                Participant

                  This is what I am seeing in the log file.  I am not receiving an email as expected.

                  [aler:aler:INFO/0:  hcimonitord:01/19/2011 15:41:20] Loading config ‘/quovadx/qdx5.5/integrator/hurtest/Alerts/test.alrt’

                  [aler:aler:INFO/0:  hcimonitord:01/19/2011 15:41:20] New alert #0:

                  {VALUE status} {SOURCE {xcelera_ord_out }} {MODE actual} {WITH -1} {COMP {== down}} {FOR once} {WINDOW {* * * * * *}} {HOST {}} {ACTION {{exec {echo %A | mail <kknight1@hurleymc.com>}}}}

                  [aler:aler:INFO/0:  hcimonitord:01/19/2011 15:41:20] New alert #1:

                  {VALUE file} {SOURCE /quovadx/qdx5.5/integrator/hurtest/Alerts/test.alrt} {MODE actual} {WITH -1} {COMP diff} {FOR once} {ACTION internal}

                • #73425
                  Keith McLeod
                  Participant

                    Here is what I have as an exec in Cloverleaf 5.5.

                    echo “[TTH-PROD] %A [End]” | mail dcaptor_page

                    The log you are showing is the loading of the alert.  Have you triggered the alert?

                  • #73426
                    Kirby Knight
                    Participant

                      I have the “Alert Action” set to exec,

                      in the “Command” field I have echo

                      “[hurtest] %A [End]” | mail kknight1@hurleymc.com

                      hurtest is the site name, what is the %A for?

                      Here is a portion of the log.

                      {VALUE action} {SOURCE notify} {MODE actual} {WITH -1} {COMP none} {FOR once} {ACTION cascade}

                      [cmd :cmd :WARN/0:  hcimonitord:01/19/2011 16:19:27] alerts client 0x20d19a88

                      [cmd :cmd :INFO/0:  hcimonitord:01/19/2011 16:19:27] Received command: ‘iwant eonotify’

                      [cmd :cmd :INFO/0:  hcimonitord:01/19/2011 16:19:27] Doing ‘iwant’ command with args ‘eonotify’

                      [aler:aler:WARN/0:  hcimonitord:01/19/2011 16:19:27] Creating AlertAction: eocnotify

                      [aler:aler:INFO/0:  hcimonitord:01/19/2011 16:19:27] New alert #9:

                      {VALUE eocycle} {SOURCE all} {MODE actual} {WITH -1} {COMP none} {FOR once} {ACTION eocnotify}

                      [cmd :cmd :WARN/0:  hcimonitord:01/19/2011 16:19:27] eonotify client 0x20d19a88

                      [aler:aler:WARN/0:  hcimonitord:01/19/2011 16:19:30] Alert #0 triggered.

                      alert: {VALUE status} {SOURCE {xcelera_ord_out }} {MODE actual} {WITH -1} {COMP {== down}} {FOR once} {WINDOW {* * * * * *}} {HOST {}} {ACTION {{exec {echo “[hurtest] %A [End]” | mail kknight1@hurleymc.com}}}}

                      action: echo “[hurtest] Thread status of xcelera_ord_out is down  [End]” | mail kknight1@hurleymc.com &

                      [aler:aler:WARN/0:  hcimonitord:01/19/2011 16:19:30] Completed Cascade Actions

                      [aler:aler:WARN/0:  hcimonitord:01/19/2011 16:20:03] Alert #0 triggered.

                      alert: {VALUE status} {SOURCE {xcelera_ord_out }} {MODE actual} {WITH -1} {COMP {== down}} {FOR once} {WINDOW {* * * * * *}} {HOST {}} {ACTION {{exec {echo “[hurtest] %A [End]” | mail kknight1@hurleymc.com}}}}

                      action: echo “[hurtest] Thread status of xcelera_ord_out is down  [End]” | mail kknight1@hurleymc.com &

                      [aler:aler:WARN/0:  hcimonitord:01/19/2011 16:20:03] Completed Cascade Actions

                    • #73427
                      Keith McLeod
                      Participant

                        I think you want to remove the trailing &.

                        The %A is:

                        action: echo “[hurtest] Thread status of xcelera_ord_out is down  [End]” | mail kknight1@hurleymc.com &

                        Notice how it expanded the %A value above to include “Thread status of xcelera_ord_out is down”

                      • #73428
                        Kirby Knight
                        Participant

                          I have no trailing & in the command, I am not sure where that is coming from??

                          This is exactly what is in the command.

                          echo “[hurtest] %A [End]” | mail kknight1@hurleymc.com

                          Where is %A defined?  Is there something in the Cloverleaf manuals that references what %A and %F represent?

                        • #73429
                          Keith McLeod
                          Participant

                            Can you send mail from the command line?  I would use:

                            mail -v -s “Subject info here” email < /dev/null

                            This would allow you to see the dialog of the emaial attempt.  If you can make it work from the command line, it should work from an alert.

                            The command I gave with the echo statement I use for page/text messaging, but either should work.

                          • #73430
                            Kirby Knight
                            Participant

                              So I believe the issue is the mail setup on the Unix box.   Our Unix guy will have to make the changes.  I believe the instructions David posted should do the trick

                              😆

                            • #73431
                              Chris Williams
                              Participant

                                Have your Unix guy verify that sendmail is running on the box.

                                Also, the ampersand at the end of the line is Cloverleaf running that command in a background process.

                              • #73432
                                Kirby Knight
                                Participant

                                  send mail is running, the emails were getting delivery failures.  We had to edit the etc/hosts file to point ourExchangeSerer.com to 10.12.xxx.xxx.  Where the IP address is the server that will allow this box to send mail without having to authenticate.

                                  Thanks for all the help.

                                • #73433
                                  herm ernst
                                  Participant

                                    Hey McLeod,

                                    We’ve just upgraded to 5.8 from 5.3 and noticied the %A parameter now also lists all threads being checked in the alert, not just the offending thread.

                                    print “%A” | mail -s “Alert from Cloverleaf” IFteam@peacehealth.org

                                    5.8:

                                    Thread outbound queue depth (1) of tjmcafee has been more than or equal to 1 for 5 seconds, currently {tinterpth 0} {tiwell 0} {tjmcafee 1}

                                    5.3:

                                    Thread outbound queue depth (1) of tjmcafee has been more than or equal to 1 for 5 seconds

                                    How would we create a 5.8 alert email message to only display the offending thread name as in 5.3?

                                    I

                                  • #73434
                                    Keith McLeod
                                    Participant

                                      I would call it a bug.  When you apply an alert to multiple source threads, the verbiage gets littered with info from all of the threads and not just the one that triggered the alert.  When using for example %A in your subject line, it can cause the email to be filtered.  Subject is too long.

                                      %A – Thread last inbound message received time of hcll_chg_in is more than to 3600, currently {hcll_chg_in 35731} {lab_chg_in none}

                                      %F – /tmp/filewrv01n (contains contents of %A used to email)

                                      %G – (Not sure what this is, it just seems to be a newline or something)

                                      %N – anonymous alert #423

                                      %R – 0

                                      %V – {hcll_chg_in 35731} {lab_chg_in none}

                                      I would like to see a variable that only pulls from the thread that triggered the alert.  I would like to see possibly %D for current date and %T for current time.  Maybe a variable with just the triggering thread name.  This would allow for significant customization in the email alert.

                                      These variable do work there in the Message body for email and the Subject line.

                                    • #73435
                                      Donna Bailey
                                      Participant

                                        I’m working on a client that is on Windows, CL 5.8.  I’m using blat to send emails/texts to my information.  It was working fine up until about a month ago.  The client doesn’t know of anything that has changed, but now the email alerts and texts don’t work anymore.  I get an error “Have you set the ‘To:’ field correctly, or do you need authorization (-u/-pw) ?

                                        The SMTP server response was -> 550 5.7.1 Unable to relay for dledgerwood@micro-star-inc.com”.  But that’s my email and I’m using the correct verbage for the -u and -pw.  It works fine for an internal email.

                                        Anyone else have this happen?  Any suggestions?

                                        Thanks,

                                        Donna Bailey
                                        Tele: 315-729-3805
                                        dbailey@microstar.health
                                        Micro Star Inc.

                                      • #73436
                                        Keith McLeod
                                        Participant

                                          I had a similar issue where email would not bee relayed if the return or from address was not a valid domain name externally.  Unix servers in particular would add in their system names to the domain name like

                                          servername.time.org

                                          On the internet, servername would make this domain name invalid.  We had to remove the servername in order for our mail to be relayed for some external addresses if not all…. Typically we found this to occur when sending to cell phones.

                                        • #73437
                                          Donna Bailey
                                          Participant

                                            What would cause it to all of sudden quit working?  I was sending to email plus phone without any problem.  On windows, where would I need to look for this information?  Or is this on the SMTP server?

                                            Donna Bailey
                                            Tele: 315-729-3805
                                            dbailey@microstar.health
                                            Micro Star Inc.

                                          • #73438
                                            Keith McLeod
                                            Participant

                                              Check you return address of an email sent to your email address.  If it includes anything that would make the domain name invalid, you may want to see if you can eliminate that part.  Can you send to other external email?

                                            • #73439
                                              Chris Williams
                                              Participant

                                                We had been unable to email to the outside from Cloverleaf which sits on Linux. Messages from Linux were being blocked by our MS Exchange server. When we wanted to send an email outside, we had to send it to a local mailbox and have it forward to the outside. The fix for our environment was to change the Exchange server configuration to treat the Linux box as a “relay server”.

                                            Viewing 19 reply threads
                                            • The forum ‘Operating Systems’ is closed to new topics and replies.