Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-3137

Trigger prototype expression: LLD Macros are not correctly replaced in timeleft function

    Details

    • Type: New Feature Request
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Server (S)

      Description

      In a rather complex trigger expression LLD Marco is not replaced inside the timeleft function.

      Trigger prototype:

      {ph-os-filesystems:vfs.fs.size[{#FSNAME},free].last(0)} >= 0 and 
      {ph-os-filesystems:echo[{#FSTYPE}|{#FSNAME}].regexp("^tmpfs\|")} = 0 and
      {ph-os-filesystems:echo[{#FSTYPE}|{#FSNAME}].regexp("/ceph/osd")} = 0 and
      (
      {$FS_FREE_TIMELEFT_P:"{#FSNAME}"} > 0 and
      {ph-os-filesystems:vfs.fs.size[{#FSNAME},free].timeleft({$FS_FREE_TIMELEFT_P:"{#FSNAME}"},,0)} < {$FS_FREE_TIMELEFT_P:"{#FSNAME}"}
      )
      

      Result after discovery:

      {myhost.de:vfs.fs.size[/boot,free].last(0)} >= 0 and {myhost.de:echo[ext2|/boot].regexp("^tmpfs\|")} = 0 and {myhost.de:echo[ext2|/boot].regexp("/ceph/osd")} = 0 and ( {myhost.de:vfs.fs.size[/boot,free].timeleft({$FS_FREE_TIMELEFT_P:"{#FSNAME}"},,0)}<{$FS_FREE_TIMELEFT_P:"/boot"} )
      

      Expected result:

      {myhost.de:vfs.fs.size[/boot,free].last(0)} >= 0 and {myhost.de:echo[ext2|/boot].regexp("^tmpfs\|")} = 0 and {myhost.de:echo[ext2|/boot].regexp("/ceph/osd")} = 0 and ( {myhost.de:vfs.fs.size[/boot,free].timeleft({$FS_FREE_TIMELEFT_P:"/boot"},,0)}<{$FS_FREE_TIMELEFT_P:"/boot"} )
      

      So in the timeleft function

      {$FS_FREE_TIMELEFT_P:"{#FSNAME}"}
      

      wasn't replaced.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                spriebe Stefan Priebe
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: