ZABBIX BUGS AND ISSUES

Trigger expression helper (popup_trexpr.php) shows incorrect options

Details

  • Zabbix ID:
    RTF

Description

Here is several improvements to make trigger expression constructor more consistent for different functions which have similar logic.

1. #count as a parameter for fuzzytime is allowed - but should be limited to seconds only.
 - 'Timestamp not different from Zabbix server time for more than T seconds, then N = 1, 0 - otherwise'

2. For regexp, iregexp - there only seconds available but #count should be as well.
 - 'Regular expression V matching last value in period T, then N = 1, 0 - otherwise'
 - 'Regular expression V matching last value in period T, then N = 1, 0 - otherwise (non case-sensitive)'

3. str function should have similar form design as for example regexp
 - 'Find string T in last (most recent) value. N = 1 - if found, 0 - otherwise'

Maybe other function should be checked as well

Activity

Hide
Toms added a comment - - edited

Oleksiy, please write according function descriptions (visible in Function dropdown in popup_trexpr.php) for given trigger functions (fuzzytime, for example).

What do you think about that in 2.0 along description function name would be visible in function dropdown "(abschange) Absolute difference between last and previous value < N" for example.

"trigger expression constructor" - I believe you meant "Trigger expression condition" window, as expression constructor is something different laying just below expression.

Oleksiy Zagorskyi I'm not sure but I think it would be better to finish and merge ZBX-3204 and then return to this issue.
There are changes in similar sources, strings rewritten significantly, I'm afraid about conflicts (just my assumption).
Ok?

Oleksiy Zagorskyi

  • New strings (as they will be after merging the ZBX-3204) added to issue description.
  • about writing description in the suggested way ("(abschange) Absolute ...") I don't have any objections but need to ask addition opinions.
  • yes, I meant the "Trigger expression condition" window, sorry for my own terms
Show
Toms added a comment - - edited Oleksiy, please write according function descriptions (visible in Function dropdown in popup_trexpr.php) for given trigger functions (fuzzytime, for example). What do you think about that in 2.0 along description function name would be visible in function dropdown "(abschange) Absolute difference between last and previous value < N" for example. "trigger expression constructor" - I believe you meant "Trigger expression condition" window, as expression constructor is something different laying just below expression. Oleksiy Zagorskyi I'm not sure but I think it would be better to finish and merge ZBX-3204 and then return to this issue. There are changes in similar sources, strings rewritten significantly, I'm afraid about conflicts (just my assumption). Ok? Oleksiy Zagorskyi
  • New strings (as they will be after merging the ZBX-3204) added to issue description.
  • about writing description in the suggested way ("(abschange) Absolute ...") I don't have any objections but need to ask addition opinions.
  • yes, I meant the "Trigger expression condition" window, sorry for my own terms
Hide
Oleksiy Zagorskyi added a comment - - edited

(4)
We should mention 3rd parameter in description for count function.

To make this correct the form should have additional field (O) for 3rd (operator) parameter.

Current description:
Number of successfully retrieved values V for period of time T > N

Suggested description:
Number of successfully retrieved values V (which fulfill operator O) for period of time T > N

And also add a field to put a Timeshift.
It's singe place where it missing since it supported there as 4th param.

Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5637 r31002

Oleksiy Zagorskyi REOPENED
You forgot to update function description as I suggested.

Operator "O" we should be inserted in expression with double quotes around, as shown in documentation <- but first ask opinion of other devs.

The timeshift field is still missing. How it could be resolved ?

Oleg Egorov RESOLVED

Oleksiy Zagorskyi heh, works nice now, but I fount additional point which has to be implemented: 1st parameter supports sec or #num.
So need to change "Last of (T)" to the drop-down style to be able insert the count "#N" in expression.

Oleg Egorov RESOLVED

Oleksiy Zagorskyi Successfully tested. CLOSED

Oleksiy Zagorskyi I wrote this comment during the ZBX-3204 development, so I originally used here not finished string (with unneeded "of time").
So in this development you actually have changed:
Number of successfully retrieved values V of a period T is > N
to
Number of successfully retrieved values V (which fulfill operator O) for period of time T > N
which is not very good (note added "of time").

Change these strings please to:
Number of successfully retrieved values V (which fulfill operator O) for period T > N

REOPENED

Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31172

Oleksiy Zagorskyi checked, CLOSED

Show
Oleksiy Zagorskyi added a comment - - edited (4) We should mention 3rd parameter in description for count function. To make this correct the form should have additional field (O) for 3rd (operator) parameter. Current description: Number of successfully retrieved values V for period of time T > N Suggested description: Number of successfully retrieved values V (which fulfill operator O) for period of time T > N And also add a field to put a Timeshift. It's singe place where it missing since it supported there as 4th param. Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5637 r31002 Oleksiy Zagorskyi REOPENED You forgot to update function description as I suggested. Operator "O" we should be inserted in expression with double quotes around, as shown in documentation <- but first ask opinion of other devs. The timeshift field is still missing. How it could be resolved ? Oleg Egorov RESOLVED Oleksiy Zagorskyi heh, works nice now, but I fount additional point which has to be implemented: 1st parameter supports sec or #num. So need to change "Last of (T)" to the drop-down style to be able insert the count "#N" in expression. Oleg Egorov RESOLVED Oleksiy Zagorskyi Successfully tested. CLOSED Oleksiy Zagorskyi I wrote this comment during the ZBX-3204 development, so I originally used here not finished string (with unneeded "of time"). So in this development you actually have changed: Number of successfully retrieved values V of a period T is > N to Number of successfully retrieved values V (which fulfill operator O) for period of time T > N which is not very good (note added "of time"). Change these strings please to: Number of successfully retrieved values V (which fulfill operator O) for period T > N REOPENED Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31172 Oleksiy Zagorskyi checked, CLOSED
Hide
Oleksiy Zagorskyi added a comment - - edited

(1) - successfully TESTED
(2) - why unneeded "timeshift" field as 3rd appeared and required "V" field as 1st disappeared ?
(3) - hey, updated "str" looks like old "regexp". But this is wrong - updated "str" should be like new "regexp", see (2) first ! Also please read function description - it there "T" variable used then corresponding field should use "T" label

Oleg Egorov RESOLVED

Oleksiy Zagorskyi
(2) why the label is "O" but not "V" as used in description ?
if use "count" in drop down and fill a value then a hash mark # will be inserted in expression before 1st parameter, but it should be before 2nd parameter. This is wrong such example: {:.iregexp(#reg,3)}=1

(3) Note that I just said above that there must be "T" label. This is still not fixed, still is "O". Btw, I suggest to use "V" label in function description and in field label.
Also the same problem with the hash mark #, as for (2)

REOPENED

Oleg Egorov RESOLVED

Oleksiy Zagorskyi Perfect ! CLOSED

Show
Oleksiy Zagorskyi added a comment - - edited (1) - successfully TESTED (2) - why unneeded "timeshift" field as 3rd appeared and required "V" field as 1st disappeared ? (3) - hey, updated "str" looks like old "regexp". But this is wrong - updated "str" should be like new "regexp", see (2) first ! Also please read function description - it there "T" variable used then corresponding field should use "T" label Oleg Egorov RESOLVED Oleksiy Zagorskyi (2) why the label is "O" but not "V" as used in description ? if use "count" in drop down and fill a value then a hash mark # will be inserted in expression before 1st parameter, but it should be before 2nd parameter. This is wrong such example: {:.iregexp(#reg,3)}=1 (3) Note that I just said above that there must be "T" label. This is still not fixed, still is "O". Btw, I suggest to use "V" label in function description and in field label. Also the same problem with the hash mark #, as for (2) REOPENED Oleg Egorov RESOLVED Oleksiy Zagorskyi Perfect ! CLOSED
Hide
Oleksiy Zagorskyi added a comment -

After using such a form (didn't used it before ) I have to say that here still are points which could be "polished" to be more "clear".
I mean more clear functions description and description for input fields but that's NOT a bug.
Probably will be improved once it the future.

I think now there no errors.
Ready to review by others devs.

Show
Oleksiy Zagorskyi added a comment - After using such a form (didn't used it before ) I have to say that here still are points which could be "polished" to be more "clear". I mean more clear functions description and description for input fields but that's NOT a bug. Probably will be improved once it the future. I think now there no errors. Ready to review by others devs.
Hide
Eduards Samersovs added a comment -

Tested!

Show
Eduards Samersovs added a comment - Tested!
Hide
Oleg Egorov added a comment -

FIXED IN 2.0.4rc1 r31072, 2.1.0(trunk) r31073
CLOSED

Show
Oleg Egorov added a comment - FIXED IN 2.0.4rc1 r31072, 2.1.0(trunk) r31073 CLOSED
Hide
Alexander Vladishev added a comment - - edited

(4) Cannot add a trigger with str/regexp/iregexp functions without a second optional parameter.

Incorrect trigger function "regexp('aaa')" provided in expression. Mandatory parameter is missing. Check expression part starting from "{Template OS Linux:system.hostname.regexp('aaa')}#0".

Oleksiy Zagorskyi Oleg created dev branch and has fixed this issue. I successfully tested.

Show
Alexander Vladishev added a comment - - edited (4) Cannot add a trigger with str/regexp/iregexp functions without a second optional parameter. Incorrect trigger function "regexp('aaa')" provided in expression. Mandatory parameter is missing. Check expression part starting from "{Template OS Linux:system.hostname.regexp('aaa')}#0". Oleksiy Zagorskyi Oleg created dev branch and has fixed this issue. I successfully tested.
Hide
Oleksiy Zagorskyi added a comment - - edited

(5) take a look to ZBX-5754

Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5637 r31118

Oleksiy Zagorskyi CLOSED

Show
Oleksiy Zagorskyi added a comment - - edited (5) take a look to ZBX-5754 Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5637 r31118 Oleksiy Zagorskyi CLOSED
Hide
Eduards Samersovs added a comment -

Tested!

Show
Eduards Samersovs added a comment - Tested!
Hide
Oleg Egorov added a comment -

FIXED IN 2.0.4rc1 r31122, 2.1.0 r31123
CLOSED

Show
Oleg Egorov added a comment - FIXED IN 2.0.4rc1 r31122, 2.1.0 r31123 CLOSED
Hide
Oleksiy Zagorskyi added a comment - - edited

(6) for "last" function (Last (most recent) T value is < N) when we select "count" mode we have to be able put there a number but its input field is disabled

this is a REGRESSION from 2.0.3 !!!

REOPENED

Oleg EgorovRESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31161

Oleksiy Zagorskyi tested, CLOSED

Show
Oleksiy Zagorskyi added a comment - - edited (6) for "last" function (Last (most recent) T value is < N) when we select "count" mode we have to be able put there a number but its input field is disabled this is a REGRESSION from 2.0.3 !!! REOPENED Oleg EgorovRESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31161 Oleksiy Zagorskyi tested, CLOSED
Hide
Oleksiy Zagorskyi added a comment - - edited

(7) strlen should work identically to the "last", see just described in (6)
but currently when "Seconds" mode selected then its input field is allowed to be filled, but it should not.

this error came from 2.0.3

Oleg EgorovRESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31161

Oleksiy Zagorskyi now in both cases the fields is not allowed to be filled, it's wrong.
So it as already done for last function.
See documentation http://www.zabbix.com/documentation/2.0/manual/appendix/triggers/functions
REOPENED

Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31172

Oleksiy Zagorskyi successfully tested, CLOSED

Show
Oleksiy Zagorskyi added a comment - - edited (7) strlen should work identically to the "last", see just described in (6) but currently when "Seconds" mode selected then its input field is allowed to be filled, but it should not. this error came from 2.0.3 Oleg EgorovRESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31161 Oleksiy Zagorskyi now in both cases the fields is not allowed to be filled, it's wrong. So it as already done for last function. See documentation http://www.zabbix.com/documentation/2.0/manual/appendix/triggers/functions REOPENED Oleg Egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31172 Oleksiy Zagorskyi successfully tested, CLOSED
Hide
Oleksiy Zagorskyi added a comment -

Ready to review by another dev.

Show
Oleksiy Zagorskyi added a comment - Ready to review by another dev.
Hide
Oleg Egorov added a comment -

FIXED IN 2.0.5rc1 r31998, 2.1.0 r31999
CLOSED

Show
Oleg Egorov added a comment - FIXED IN 2.0.5rc1 r31998, 2.1.0 r31999 CLOSED

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: