Zabbix Documentation 2.4

2.23.04.0 (current)In development:4.2 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


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 [2016/02/09 08:57]
andris [Important notes] "Zabbix 2.4.6 fixes an issue ZBX-9290" note added
manual:config:items:itemtypes:log_items [2018/12/20 07:46] (current)
martins-v removing info that's duplicated over at the agent item section
Line 31: Line 31:
  
 |//​Type// ​  ​|Select **Zabbix agent (active)** here.   | |//​Type// ​  ​|Select **Zabbix agent (active)** here.   |
-|//​Key// ​  |Set either:\\ **log**[/​path/​to/​file/​file_name,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>​]\\ ​or\\ **logrt**[/​path/​to/​file/​regexp_describing_filename_pattern,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>​]\\ Zabbix agent will filter entries ​of the log file by the content regexp, if present.\\ Make sure that the file has read permissions for the '​zabbix'​ user otherwise the item status will be set to '​unsupported'​.\\ ​For more details see **log** and **logrt** entries in the supported [[zabbix_agent#​supported_item_keys|Zabbix agent item]] ​keys section. ​ | +|//​Key// ​  |Use one of the following item keys: **log[]** or **logrt[]**\\ These two item keys allow to monitor logs and filter ​log entries by the content regexp, if present.\\ ​For example: ''​log[/​var/​log/​syslog,​error]''​. ​Make sure that the file has read permissions for the '​zabbix'​ user otherwise the item status will be set to '​unsupported'​.\\ ​See supported [[zabbix_agent#​supported_item_keys|Zabbix agent item]] ​key section ​for details on using these item keys and their parameters.  | 
-|//Type of information// ​ |Select ​**Log** here.  |+|//Type of information// ​ |Select ​''​Log'' ​here.  |
 |//Update interval (in sec)// ​ |The parameter defines how often Zabbix agent will check for any changes in the log file. Setting it to 1 second will make sure that you get new records as soon as possible. ​ | |//Update interval (in sec)// ​ |The parameter defines how often Zabbix agent will check for any changes in the log file. Setting it to 1 second will make sure that you get new records as soon as possible. ​ |
 |//Log time format// ​  |In this field you may optionally specify the pattern for parsing the log line timestamp.\\ If left blank the timestamp will not be parsed.\\ Supported placeholders:​\\ ​    * **y**: //Year (0001-9999)//​\\ ​    * **M**: //Month (01-12)//​\\ ​    * **d**: //Day (01-31)//​\\ ​    * **h**: //Hour (00-23)//​\\ ​    * **m**: //Minute (00-59)//​\\ ​    * **s**: //Second (00-59)//\\ For example, consider the following line from the Zabbix agent log file:\\ " 23480:​20100328:​154718.045 Zabbix agent started. Zabbix 1.8.2 (revision 11211)."​\\ It begins with six character positions for PID, followed by date, time, and the rest of the line.\\ Log time format for this line would be "​pppppp:​yyyyMMdd:​hhmmss"​.\\ Note that "​p"​ and ":"​ chars are just placeholders and can be anything but "​yMdhms"​. ​  | |//Log time format// ​  |In this field you may optionally specify the pattern for parsing the log line timestamp.\\ If left blank the timestamp will not be parsed.\\ Supported placeholders:​\\ ​    * **y**: //Year (0001-9999)//​\\ ​    * **M**: //Month (01-12)//​\\ ​    * **d**: //Day (01-31)//​\\ ​    * **h**: //Hour (00-23)//​\\ ​    * **m**: //Minute (00-59)//​\\ ​    * **s**: //Second (00-59)//\\ For example, consider the following line from the Zabbix agent log file:\\ " 23480:​20100328:​154718.045 Zabbix agent started. Zabbix 1.8.2 (revision 11211)."​\\ It begins with six character positions for PID, followed by date, time, and the rest of the line.\\ Log time format for this line would be "​pppppp:​yyyyMMdd:​hhmmss"​.\\ Note that "​p"​ and ":"​ chars are just placeholders and can be anything but "​yMdhms"​. ​  |