[ZBXNEXT-1250] count() filter by regexp Created: 2012 Jun 04 Updated: 2016 May 23 Resolved: 2016 May 06 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | API (A), Server (S) |
Affects Version/s: | None |
Fix Version/s: | 3.2.0alpha1 |
Type: | Change Request | Priority: | Minor |
Reporter: | richlv | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 12 |
Labels: | calculateditems, patch, triggerfunctions, triggers | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | zabbix-2.2.2-evalfunc_count_regexp.patch | ||||||||||||||||
Issue Links: |
|
Description |
currently trigger function count() accepts a pattern as the second param, but it can be at most searched as "like". that would include both trigger expressions and calculated item formulas |
Comments |
Comment by Michael Kolomiets [ 2014 Apr 08 ] |
I made change for regexp in count function. Used it for three month without any troubles. |
Comment by Ivo Kurzemnieks [ 2016 Apr 13 ] |
(1) No translation string changes. gunarspujats CLOSED |
Comment by Ivo Kurzemnieks [ 2016 Apr 13 ] |
Frontent part RESOLVED in svn://svn.zabbix.com/branches/dev/ZBXNEXT-1250 r59428 |
Comment by Aleksandrs Saveljevs [ 2016 Apr 13 ] |
Server side ready for testing in the same branch, too. |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Apr 22 ] |
(2) Updated to the latest trunk and resolved conflicts caused by asaveljevs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Apr 22 ] |
(3) Nowadays we have a great opportunity to show detailed function evaluation error messages in the frontend. Let's use it! Unfortunately, there is currently no way of distinguishing invalid non-global regular expression in second parameter and the case when no values match valid regexp. Troubleshooting will be somewhat inconvenient. RESOLVED in r59634. glebs.ivanovskis This solution was incorrect. Fixed in r59698. Still RESOLVED asaveljevs Please see a bit of stylistic suggestions in r59766. Still RESOLVED. glebs.ivanovskis Thank you very much! CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Apr 22 ] |
It's probably worth reviving Actually, glebs.ivanovskis RESOLVED in r59698 and r59699. asaveljevs The following definitions should be renamed, so that naming conflicts are less likely: #define NO_MATCH 0 #define MATCH 1 asaveljevs Function regexp_match_ex_regsub() returns FAIL on an invalid regular expression in case zbx_regexp() is used, but not in case of regexp_sub(). Why so? asaveljevs Function regexp_sub_ex() does not seem to propagate FAIL from regexp_match_ex_regsub() correctly. REOPENED glebs.ivanovskis We are currently in race condition with glebs.ivanovskis Naming, matching result inversion problem and issue with global regexps consisting of multiple strings/regexps RESOLVED in r59789. Please have a look. asaveljevs Function regexp_match_ex_substring() does not return FAIL, but we checked for it. Fixed that in r59793. glebs.ivanovskis Nice catch! Thanks again! |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Apr 25 ] |
(5) Minor bug in count(). It was decided not to fix it separately. Different functions are used to read mask for band operator. In evaluate_COUNT() it's either str2uint64() if it's simply mask or it's is_uint64() in case of pattern/mask. In evaluate_BAND() we use get_function_parameter_uint64() which is based on is_uint64(). I think the latter should be used in every case. glebs.ivanovskis RESOLVED in r59721. asaveljevs CLOSED |
Comment by Gunars Pujats (Inactive) [ 2016 Apr 26 ] |
(F) Frontend tested. |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Apr 26 ] |
(6) Support for numeric items added in r59721. asaveljevs CLOSED |
Comment by Aleksandrs Saveljevs [ 2016 Apr 28 ] |
Assuming that we are going to leave (4) for glebs.ivanovskis Yes, that part of (4) which is about distinguishing fails and not matches of regexp_sub() we leave for |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Apr 28 ] |
Available in pre-3.1.0 (trunk) r59797. |
Comment by Glebs Ivanovskis (Inactive) [ 2016 May 03 ] |
Documented in: asaveljevs Looks good! martins-v I did change the wording and formatting in both places a bit. If you wish to review it, please do. glebs.ivanovskis Thank you, Mārtiņš! |