[ZBX-8295] document all places where global regexps can and can not be used Created: 2014 Jun 03  Updated: 2024 Apr 10  Resolved: 2017 Feb 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: globalregexps, regexps
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team A
Sprint: Sprint 1

 Description   

global regexp implementation was not properly completed - there still are places where they do not work. until that is fixed, let's document :

  • all locations where they can be used
  • all locations where regexps are supported, but global regexps - not

this is asked by users quite often.

the place to document this probably is https://www.zabbix.com/documentation/2.2/manual/regular_expressions



 Comments   
Comment by richlv [ 2014 Jun 03 ]

incomplete list to get the idea what this is supposed to achieve.

can :

  • logfiles, regexp param (both log and logrt)
  • lld rule filtering

can not :

  • web.page.get
  • web monitoring, required string -?
  • web monitoring, value extracting -?
Comment by Constantin Oshmyan [ 2016 Nov 16 ]

It seems that at the moment (v3.0, I didn't analyze v3.2) global regexps in the parameters of Item keys are:

  • supported for the log items (eventlog, log and logrt), they all could work in active mode of Zabbix agent only;
  • not supported for all other standard Zabbix agent items (proc.cpu.util, proc.num, proc.mem, system.hw.macaddr, system.sw.packages, vfs.file.regexp, vfs.file.regmatch and web.page.regexp).

It seems that real implementation of full support of global RE's in the item keys is not a trivial job. It will require, at least, the following:

  • some changes of the server code (to recognize the necessity to send global regexps for all these keys for active checks);
  • some changes of the agent code (also, to recognize the necessity to resolve global regexps in these keys);
  • the most important: it is necessary to have some mechanism to send regexps from server to agent working in passive mode.

I understand that it will require a resources (first of all – time). Therefore, my proposal is: as a short term workaround to include the sentence like the following to the documentation:

Currently, global regular expressions as parameters of item keys are supported only for the following standard keys: eventlog, log and logrt.

Later this phrase could be modified to reflect a real progress (referring to specific keys, server/agent versions, etc.).

Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 13 ]

Gathered all information in https://www.zabbix.com/documentation/3.4/manual/regular_expressions#global_regular_expression_support_by_location

martins-v How about regular expression support? As opposed to "global" regular expressions?

glebs.ivanovskis That would be an all-"Yes" column. Does it make sense?

martins-v No, what I meant is places where normal regexps are supported but our global regexps are not. I'm taking this from the issue description. If that's an all "yes", perhaps I'll add it just so there are no questions about it.

glebs.ivanovskis Added icon mapping to the table, thanks to richlv. If we add column for regular regular expression support, shouldn't comments be updated? Currently they mention parameters where global regular expressions are supported.

martins-v Good point, thanks. Do we need comments for regular regular expression support? If not then the column could be just renamed.

glebs.ivanovskis Updated table with more locations and more comments.

Comment by richlv [ 2017 Feb 14 ]

other locations missing :

  • icon mapping
  • web monitoring, required string
  • proc.cpu.util, cmdline param
  • proc.mem, cmdline param
  • proc.num, cmdline param
Comment by Constantin Oshmyan [ 2017 Feb 14 ]

Just now it seems for me that the column "Regexp support" in the table (for regular regular expressions) is redundant (especially, taking into account that the section name and "Comment" column relates to global regexps only).
I'd like to see just the note before this table, something like: "The usual regular expressions could be used in all mentioned places, but support for global regular expressions is figured in the following table".

Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 14 ]

Dear richlv and constantin.oshmyan, thank you a lot for your input!

I think the table is not the ultimate solution. Ideally, would be nice to be able to link precisely to item descriptions. Then there would be no need for comments and maintaining such docs would be so much easier.

Comment by Martins Valkovskis [ 2017 Feb 14 ]

The manner in which the info is presented can be further improved, but for now I think it's great to have the information available in one place.

Generated at Thu Apr 25 01:15:00 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.