Current datetime in alerts

Clovertech Forums Cloverleaf Current datetime in alerts

  • Creator
    Topic
  • #119143
    Peter Cosman
    Participant

      Does anyone know if there is a way to include the current datetime in the mail body of the alerts in Cloverleaf 20.1 ?

      The only way I see is doing it in tcl but maybe there is a parameter like the %A to include the current datetime without having to write tcl code.

      It would be usefull for email alerts because there can be a delay between mail delivery and triggering of the alert. Having the exact datatime of the alert trigger in the mail body would be very interesting.

    Viewing 2 reply threads
    • Author
      Replies
      • #119147
        Charlie Bursell
        Participant

          Try $V.. It may be more than you want 🙂

          <tbody class=”tbody”>

          <td class=”entry nocellnorowborder” headers=”d138757e49 “><var class=”keyword varname”>%V</var>
          <td class=”entry nocellnorowborder” headers=”d138757e52 “>Current value
          <td class=”entry nocellnorowborder” headers=”d138757e55 “>The <var class=”keyword varname”>%V</var> characters are replaced with either the current source value or a keyed list of sources and values. If the current value of a source is not yet available, the two characters are replaced by the text (n/a).
          <ul id=”gqi1491837485790__ul_9ACE3B9A8A4E47259C6850AB7B71F6EC” class=”ul”>
          <li id=”gqi1491837485790__li_FBC80DBBC6D8416390C10EB0919E14F7″ class=”li”>
          <p class=”p”>When the value is a delta, the delta is shown as the current value.</p>
          <p class=”p”>For these alert types, <var class=”keyword varname”>%V</var> is replaced with the value keyed list:</p>

          <ul id=”gqi1491837485790__ul_53098004F7EF41DC95CC6E042324C821″ class=”ul”>
          <li id=”gqi1491837485790__li_1C0BF17FAA284347B98A7F15C14984A6″ class=”li”>transactions/sec
          <li id=”gqi1491837485790__li_C1DB00F86A20480BA4F605F41761BD44″ class=”li”>forward count
          <li id=”gqi1491837485790__li_3DC30B4EA3D04EB9A79E4E3AB3B5E35F” class=”li”>error count
          <li id=”gqi1491837485790__li_8F782647E17E4968BC7731CAE9FF040C” class=”li”>inbound queue depth
          <li id=”gqi1491837485790__li_6E441DB9A9614AFFB9B9B26CF4FFED96″ class=”li”>outbound queue depth
          <li id=”gqi1491837485790__li_40EB7E6A6B5448AE90378C28820DF460″ class=”li”>prexlate queue depth
          <li id=”gqi1491837485790__li_6DFDA80B74344A1DB9CF39358F4B25AC” class=”li”>postxlate queue depth
          <li id=”gqi1491837485790__li_1A5EA7E291684B77AA4E6D484C915E14″ class=”li”>error database messages
          <li id=”gqi1491837485790__li_954A3101F20B4A418B42EDB74237B342″ class=”li”>file size
          <li id=”gqi1491837485790__li_6F7F0D0789B4497BAFCF57523403A415″ class=”li”>inbound latency
          <li id=”gqi1491837485790__li_ECDE278F4D0F4CEFB86BAA0DB214F249″ class=”li”>outbound latency
          <li id=”gqi1491837485790__li_5D5A8822396B4FE888CA42CAC75C8872″ class=”li”>total latency
          <li id=”gqi1491837485790__li_D0260FBD90C34CE1A964A08F895160E1″ class=”li”>last receive
          <li id=”gqi1491837485790__li_697A9D28DB6048ADA9C41BAA38431DAC” class=”li”>last send

          <p class=”p”>For these single source alert types, <var class=”keyword varname”>%V</var> is replaced by the numerical value:</p>

          <ul id=”gqi1491837485790__ul_0736EAFB8E53419B9132E748320FB6E9″ class=”ul”>
          <li id=”gqi1491837485790__li_82EB454DCBF94B2A94DAFFC4EA251EF9″ class=”li”>tcl
          <li id=”gqi1491837485790__li_391E29E7272F4118A02E6B4F0DD89FF2″ class=”li”>system CPU %
          <li id=”gqi1491837485790__li_1B99D99E69AE4F808CD5E422CEE63BCE” class=”li”>wait CPU %
          <li id=”gqi1491837485790__li_28F2A5741ECB40A18CE59C5B310C3CAD” class=”li”>user CPU %
          <li id=”gqi1491837485790__li_E189B985C4DF49969F36E26DE91DEF0D” class=”li”>idle CPU %
          <li id=”gqi1491837485790__li_087EAFF20E9C470EA2ACC3560ADCF322″ class=”li”>virtual memory % free
          <li id=”gqi1491837485790__li_E9AB06C03D624CFF8EF50AB74853D0A4″ class=”li”>virtual memory free
          <li id=”gqi1491837485790__li_E2485A48DBEC4CAF9D08EA2A26DE026B” class=”li”>disk I/O per second
          <li id=”gqi1491837485790__li_887FD3D75BED476EAC04C28791E0B103″ class=”li”>disk % full
          <li id=”gqi1491837485790__li_508D6B6790374AD8A6C179C44DF7AD49″ class=”li”>disk free space

          • #119153
            Peter Cosman
            Participant

              %V only gives me the current value, no datetime info.

               

          • #119156
            Charlie Bursell
            Participant

              Sorry!  Bad copy/paste on my part.

              Looking at the docs I see an example at:

              <ol class=”ol steps”>
              <li id=”tcu1527778985147__step_N10022_N1001F_N1000E_N10001″ class=”li step stepexpand”>Joe opens the Alert Configurator and creates a new thread status alert for the <code class=”ph codeph”>adt_in</code> thread.
              <li id=”tcu1527778985147__step_N10033_N1001F_N1000E_N10001″ class=”li step stepexpand”>Joe clicks the Advanced button in the Actions pane. This opens the Custom Alert Message dialog box.
              <li id=”tcu1527778985147__step_N10045_N1001F_N1000E_N10001″ class=”li step stepexpand”>Joe sets the delimiter to “,“.
              <li id=”tcu1527778985147__step_N10052_N1001F_N1000E_N10001″ class=”li step stepexpand”>Joe selects these fields for the alert message:

              <ul id=”tcu1527778985147__ul_c1h_wj5_zdb” class=”ul”>
              <li class=”li”>Process
              <li class=”li”>Source
              <li class=”li”>Protocol Status
              <li class=”li”>Current Time

              <li id=”tcu1527778985147__step_N10080_N1001F_N1000E_N10001″ class=”li step stepexpand”>Joe saves and tests the alert. This alert is received:

              <pre class=”pre msgblock”>ADT, adt_in, Down, 03/19/2018 16:36:06</pre>
            • #119157
              Charlie Bursell
              Participant

                Sorry, every time I copy from the docs it pastes all the HTML code.  Here is what it should read:

                1. Joe opens the Alert Configurator and creates a new thread status alert for the adt_in thread.
                2. Joe clicks the ADVANCED button in the Actions pane. This opens the Custom Alert Message dialog box.
                3. Joe sets the delimiter to “,“.
                4. Joe selects these fields for the alert message:
                  Process
                  Source
                  Protocol Status
                  Current Time
                5. Joe saves and tests the alert. This alert is received:
                  ADT, adt_in, Down, 03/19/2018 16:36:06
            Viewing 2 reply threads
            • You must be logged in to reply to this topic.