[ZBX-2461] Trigger expression dont understand constants K,M,G Created: 2010 May 25  Updated: 2017 May 30  Resolved: 2010 May 31

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.3
Fix Version/s: 1.8.3

Type: Incident report Priority: Blocker
Reporter: Fyodor Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

PHP 5.2.10 (cli) (built: Dec 22 2009 18:51:51)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


Issue Links:
Duplicate

 Description   

Trigger expression don't understood constants G,M,K
When i try to create trigger with it or update existing trigger (created in 1.8.2) i get error
Not allowed symbols or sequence of symbols in expression element detected: Check expression part starting from '>2G'
Trigger expression like

{HOST:dir.size[usercheck].last(0)}

>2G



 Comments   
Comment by richlv [ 2010 May 25 ]

that's probably a different bug, but additionally, an expression like :

{A Test Host:traptest.avg(3600)}

/

{A Test Host:traptest.avg(3600,86400)}

>1
fails with an incorrect message:
Function '' does not accept parameters. Check expression part starting from '(3600,86400)}>1'

edit : this seems to happen with all functions that accept fore than one parameter

Comment by Maxim Andruhovich (Inactive) [ 2010 May 26 ]

svn://svn.zabbix.com/branches/dev/ZBX-2461

Comment by Maxim Andruhovich (Inactive) [ 2010 May 28 ]

Bug fixed in version pre 1.8.3 revision 12346

Comment by Jimmy Cappaert [ 2010 May 30 ]

I don't think this is fixed. Just tried an import in pre-zabbix-1.8.3.x-12366, got the same error again while adding a trigger that checks on port 3000 via TCP.

"Not allowed symbols or sequence of symbols in expression element detected: Check expression part starting from 'tcp,3000.avg(600)}=0'"

Trigger details from import:

<trigger>
<description>CASP</description>
<type>0</type>
<expression>{{HOSTNAME}:tcp,3000.avg(600)}=0</expression>
<url></url>
<status>0</status>
<priority>4</priority>
<comments></comments>
</trigger>

Comment by Maxim Andruhovich (Inactive) [ 2010 May 31 ]

confirming, not fixed, forgot about simple checks

Comment by Maxim Andruhovich (Inactive) [ 2010 May 31 ]

fixed, please see revision 12378

Comment by richlv [ 2010 May 31 ]

dev branch rev 12393.

user macro doesn't work as a parameter for a simple check, for example :

{Host:ssh,{$SSH_PORT}.last(0)}=0

Comment by Maxim Andruhovich (Inactive) [ 2010 May 31 ]

Sorry, forgot about macros, now all macros should work, see revision 12394

Comment by richlv [ 2010 May 31 ]

confirming the fix in dev branch rev 12398.

Comment by Maxim Andruhovich (Inactive) [ 2010 May 31 ]

Bug fixed in version pre 1.8.3 revision 12400

Comment by Gao Bo [ 2011 Sep 06 ]

The K/M/G in trigger now stands for 1024/1024*1024/1024*1024*1024, but in Graph, it stands for 1,000/1,000,000/1,000,000,000, this will cause a lot confusion. In real world, 1KB mean 1024 bytes memory, or 1000bytes disk space. For network traffic, it follow same rules of disk space. can we use a more consistent way to use K/M/G, and add a switch to control the meaning?

Generated at Fri Mar 29 01:09:34 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.