ZABBIX BUGS AND ISSUES

Triggers which have expression with space(s) before and/or after an operator sign (<>#=) will be not shown in a graph legend

Details

  • Zabbix ID:
    NA

Description

It turned out that if trigger expression has a space(s) before and/or after an operator sign (<>#=) - this trigger will be *not* shown in a graph legend.

Will be shown:
{host:itemkey.last(0)}>444

Will not:
{host:itemkey.last(0)} > 444

It's absolutely unclear what's going on, should be fixed.

Yes, many users are using spaces there when writing/editing expression manually, and it's not user's mistake, such expression is supported.

Activity

Hide
Oleg Egorov added a comment -

RESOLVED in r30489

Show
Oleg Egorov added a comment - RESOLVED in r30489
Hide
Toms added a comment - - edited

(1) There is no need to change trigger expression. I think expression in preg_match() function should be extended, so the all matching would be in the same place.
And FYI str_replace(' ', '', $txt) is much (simple benchmark showed more than 4x difference) faster than preg_replace('/\s+/', '', $txt);

Oleg Egorov
In this situation:
preg_replace('/\s+/', '', $txt); - 0.000035 s.
str_replace(' ', '', $txt) - 0.000028 s.
Yes, I know, str_replace faster, but not so big difference I think.

RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5644 r30681

Toms CLOSED

Show
Toms added a comment - - edited (1) There is no need to change trigger expression. I think expression in preg_match() function should be extended, so the all matching would be in the same place. And FYI str_replace(' ', '', $txt) is much (simple benchmark showed more than 4x difference) faster than preg_replace('/\s+/', '', $txt); Oleg Egorov In this situation: preg_replace('/\s+/', '', $txt); - 0.000035 s. str_replace(' ', '', $txt) - 0.000028 s. Yes, I know, str_replace faster, but not so big difference I think. RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5644 r30681 Toms CLOSED
Hide
Toms added a comment -

TESTED

Show
Toms added a comment - TESTED
Hide
richlv added a comment - - edited

(2) current changelog entry says "fixed problem with spaces in triggers expressions"
it is impossible for user to figure out what was that.
i'd suggest something like "fixed triggers with spaces in the expression missing from the graph legend" or similar

<richlv> was fixed, CLOSED

Show
richlv added a comment - - edited (2) current changelog entry says "fixed problem with spaces in triggers expressions" it is impossible for user to figure out what was that. i'd suggest something like "fixed triggers with spaces in the expression missing from the graph legend" or similar <richlv> was fixed, CLOSED
Hide
Oleg Egorov added a comment - - edited

Fixed in 2.0.4 r30686, 2.1.0 r30687

Show
Oleg Egorov added a comment - - edited Fixed in 2.0.4 r30686, 2.1.0 r30687

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: