Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23038

Bug when obtaining the item's previous value to use in messages using "{?last(//{ITEM.KEY},#2)}" when the item is of type "External check", and arguments are passed to the script.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.0.18, 6.0.19, 6.4.3, 6.4.4
    • None
    • Debian 11
      Zabbix 6.4.3
      Zabbix 6.0.10
      Zabbix 6.0.17
      Zabbix 6.0.18

      Bug when obtaining the item's previous value to use in messages using "

      {?last(//{ITEM.KEY},#2)}
      

      , when the item is of type "External check", and arguments are passed to the script.

      For example:

      script["{HOST.CONN}","{$SNMP_COMMUNITY}"]
      

      The information arrives as: "UNKNOWN".

      Also, in Zabbix 6.x the previous value of the items goes in the message without pre-processing.

      For example:

      Value processed: 5.77 Gbps
      Value obtained with "{?last(//{ITEM.KEY},#2)}": 5766602784
      

      In Zabbix 5.x both cases worked normally with "{{HOST.CONN}:{ITEM.KEY}.last(#2)}", seems to be a bug from version 6.x onwards.

      Screenshot 1 we have the item of type "External check" passing arguments in the script (trigger1.png).

      Screenshot 2 we have the "External check" item without passing arguments (trigger2.png).

      Screenshot 3 shows an example of a traffic item where the previous value was not processed when sending the alert (trigger3.png).

      Message templates:
      1 Problem
      Problem ❌
      Start in:

      {EVENT.TIME}

      Problem:

      {EVENT.NAME}
      Host: {HOST.NAME}
      Item: {ITEM.NAME}
      Host IP: {HOST.CONN}
      Severity: {EVENT.SEVERITY}
      Previous Status: {?last(//{ITEM.KEY},#2)}
      Current Status: {EVENT.OPDATA}
      Item ID: {ITEM.ID}
      Action: Check device.❌

      2 Problem recovery
      Problem recovery ✅
      Recovery in: {EVENT.RECOVERY.TIME} from {EVENT.RECOVERY.DATE}
      Problem: {EVENT.NAME}

      Duration:

      {EVENT.DURATION}

      Host:

      {HOST.NAME}

      Host IP:

      {HOST.CONN}

      Severity:

      {EVENT.SEVERITY}

      Previous Status: {?last(//{ITEM.KEY},#2)}
      Current Status:

      {EVENT.OPDATA}

      Item ID:

      {ITEM.ID}

      Action: The problem was solved ✅.

        1. trigger3.png
          trigger3.png
          40 kB
        2. trigger2.png
          trigger2.png
          39 kB
        3. trigger1.png
          trigger1.png
          40 kB

            tbross Tomass Janis Bross
            fernandoalmondes Fernando Almondes
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: