[ZBXNEXT-3137] Trigger prototype expression: LLD Macros are not correctly replaced in timeleft function Created: 2016 Feb 10  Updated: 2016 Feb 10  Resolved: 2016 Feb 10

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: Stefan Priebe Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: lld, macros, triggerprototypes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBXNEXT-1667 support lld macros in trigger functio... Closed

 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.



 Comments   
Comment by Alexander Vladishev [ 2016 Feb 10 ]

LLD macros in function parameters does not supported yet. See documentation for more details.

You can create ticket under ZBXNEXT project for feature request.

Thank you.

Comment by Stefan Priebe [ 2016 Feb 10 ]

ah OK sorry then. Can't we jsut move this one to ZBXNEXT?

sasha Moved.

Comment by Alexander Vladishev [ 2016 Feb 10 ]

I close the issue as duplicate of ZBXNEXT-1667.

Generated at Tue Apr 23 11:19:23 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.