manual:config:items:itemtypes:log_items

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
manual:config:items:itemtypes:log_items [2021/05/18 13:30]
marinagen fixing a typo
manual:config:items:itemtypes:log_items [2021/09/20 12:29] (current)
dimir [Extracting matching part of regular expression] improve description of how the 'output' parameter works
Line 72: Line 72:
 Since Zabbix 2.2.0, log items have the ability to extract desired values from matched lines. This is accomplished by the additional **output** parameter in ''​log''​ and ''​logrt''​ items. Since Zabbix 2.2.0, log items have the ability to extract desired values from matched lines. This is accomplished by the additional **output** parameter in ''​log''​ and ''​logrt''​ items.
  
-Using the '​output'​ parameter allows to indicate the subgroup ​of the match that we may be interested in. +Using the '​output'​ parameter allows to indicate the "​capturing group" ​of the match that we may be interested in. 
  
 So, for example So, for example
Line 84: Line 84:
   ID: 41726453/​User:​ AUser/Form: CFG:​ServiceLevelAgreement   ID: 41726453/​User:​ AUser/Form: CFG:​ServiceLevelAgreement
  
-The reason why Zabbix will return only the number ​is because ​'​output'​ here is defined by **\1** ​referring ​to the first and only subgroup of interest: **([0-9]+)**+Only the number ​will be returned ​because **\1** ​refers ​to the first and only capturing group: **([0-9]+)**.
  
 And, with the ability to extract and return a number, the value can be used to define triggers. And, with the ability to extract and return a number, the value can be used to define triggers.
- 
 === Using maxdelay parameter === === Using maxdelay parameter ===