Zabbix Documentation 4.4

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:config:items:itemtypes:zabbix_agent

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:config:items:itemtypes:zabbix_agent [2019/03/17 14:33]
dimir add link to passive checks description
manual:config:items:itemtypes:zabbix_agent [2020/01/16 13:31] (current)
martins-v removing agent 2 keys
Line 17: Line 17:
  
   * [[manual:​appendix:​items:​supported_by_platform|Items supported by platform]]   * [[manual:​appendix:​items:​supported_by_platform|Items supported by platform]]
 +  * [[manual:​config:​items:​itemtypes:​zabbix_agent:​zabbix_agent2|Item keys supported by Zabbix agent 2]]
   * [[manual:​config:​items:​itemtypes:​zabbix_agent:​win_keys|Item keys specific for Windows agent]]   * [[manual:​config:​items:​itemtypes:​zabbix_agent:​win_keys|Item keys specific for Windows agent]]
   * [[:​manual/​appendix/​items/​win_permissions|Minimum permission level for Windows agent items]]   * [[:​manual/​appendix/​items/​win_permissions|Minimum permission level for Windows agent items]]
Line 43: Line 44:
 | ||||| | |||||
 ^log[file,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>,<​maxdelay>​] ​ ^^^^^ ^log[file,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>,<​maxdelay>​] ​ ^^^^^
-^ |Log file monitoring. ​ |Log  |**file** - full path and name of log file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it! |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ If file is missing or permissions do not allow access, item turns unsupported.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => log[/​var/​log/​syslog]\\ => log[/​var/​log/​syslog,​error]\\ => log[/​home/​zabbix/​logs/​logfile,,,​100]\\ \\  //Using ''​output''​ parameter for extracting a number from log record://\\ => %%log[/​app1/​app.log,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only '​6080'​ to server. Because a numeric value is being sent, the "Type of information"​ for this item can be set to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%% \\ \\  //Using ''​output''​ parameter for rewriting log record before sending to server://\\ => %%log[/​app1/​app.log,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors+^ |Log file monitoring. ​ |Log  |**file** - full path and name of log file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​encoding_settings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it! |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ If file is missing or permissions do not allow access, item turns unsupported.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => log[/​var/​log/​syslog]\\ => log[/​var/​log/​syslog,​error]\\ => log[/​home/​zabbix/​logs/​logfile,,,​100]\\ \\  //Using ''​output''​ parameter for extracting a number from log record://\\ => %%log[/​app1/​app.log,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only '​6080'​ to server. Because a numeric value is being sent, the "Type of information"​ for this item can be set to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%% \\ \\  //Using ''​output''​ parameter for rewriting log record before sending to server://\\ => %%log[/​app1/​app.log,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors
 " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​maxdelay''​ parameter is supported since Zabbix 3.2. \\ \\ See also additional information on [[log_items|log monitoring]]. ​ | " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​maxdelay''​ parameter is supported since Zabbix 3.2. \\ \\ See also additional information on [[log_items|log monitoring]]. ​ |
 | ||||| | |||||
 ^log.count[file,<​regexp>,<​encoding>,<​maxproclines>,<​mode>,<​maxdelay>​] ​ ^^^^^ ^log.count[file,<​regexp>,<​encoding>,<​maxproclines>,<​mode>,<​maxdelay>​] ​ ^^^^^
-^ |Count of matched lines in log file monitoring. ​ |Integer ​ |**file** - full path and name of log file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxproclines** - maximum number of new lines per second the agent will analyze. Default value is 10*'​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]].\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it!  |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ If file is missing or permissions do not allow access, item turns unsupported. \\ \\ See also additional information on [[log_items|log monitoring]].\\ \\ This item is not supported for Windows Event Log.\\ \\ Supported since Zabbix 3.2.0. ​ |+^ |Count of matched lines in log file monitoring. ​ |Integer ​ |**file** - full path and name of log file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​encoding_settings|identifier]]\\ **maxproclines** - maximum number of new lines per second the agent will analyze. Default value is 10*'​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]].\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it!  |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ If file is missing or permissions do not allow access, item turns unsupported. \\ \\ See also additional information on [[log_items|log monitoring]].\\ \\ This item is not supported for Windows Event Log.\\ \\ Supported since Zabbix 3.2.0. ​ |
 | ||||| | |||||
 ^logrt[file_regexp,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>,<​maxdelay>,<​options>​] ​ ^^^^^ ^logrt[file_regexp,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>,<​maxdelay>,<​options>​] ​ ^^^^^
-^ |Log file monitoring with log rotation support. ​ |Log  |**file_regexp** - absolute path to file and regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the file name pattern\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required content pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it!\\ **options** - type of log file rotation. Possible values:\\ //rotate// (default), //​copytruncate//​. Note that //​copytruncate//​ cannot be used together with //​maxdelay//​. In this case //​maxdelay//​ must be 0 or not specified. See [[log_items#​notes_on_handling_copytruncate_log_file_rotation|copytruncate]] notes.|The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ Log rotation is based on the last modification time of files.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => %%logrt["/​home/​zabbix/​logs/​^logfile[0-9]{1,​3}$",,,​100]%% -> %%will match a file like "​logfile1"​ (will not match "​.logfile1"​)%%\\ => %%logrt["/​home/​user/​^logfile_.*_[0-9]{1,​3}$","​pattern_to_match","​UTF-8",​100]%% -> %%will collect data from files such "​logfile_abc_1"​ or "​logfile__001"​.%%\\ \\ //Using ''​output''​ parameter for extracting a number from log record://\\ => %%logrt[/​app1/​^test.*log$,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only '​6080'​ to server. Because a numeric value is being sent, the "Type of information"​ for this item can be set to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%%\\ \\ //Using ''​output''​ parameter for rewriting log record before sending to server://\\ => %%logrt[/​app1/​^test.*log$,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors+^ |Log file monitoring with log rotation support. ​ |Log  |**file_regexp** - absolute path to file and regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the file name pattern\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required content pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​encoding_settings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it!\\ **options** - type of log file rotation. Possible values:\\ //rotate// (default), //​copytruncate//​. Note that //​copytruncate//​ cannot be used together with //​maxdelay//​. In this case //​maxdelay//​ must be 0 or not specified. See [[log_items#​notes_on_handling_copytruncate_log_file_rotation|copytruncate]] notes.|The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ Log rotation is based on the last modification time of files.\\ \\ Note that logrt is designed to work with one currently active log file, with several other matching inactive files rotated. If, for example, a directory has many active log files, a separate logrt item should be created for each one. Otherwise if one logrt item picks up too many files it may lead to exhausted memory and a crash of monitoring.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => %%logrt["/​home/​zabbix/​logs/​^logfile[0-9]{1,​3}$",,,​100]%% -> %%will match a file like "​logfile1"​ (will not match "​.logfile1"​)%%\\ => %%logrt["/​home/​user/​^logfile_.*_[0-9]{1,​3}$","​pattern_to_match","​UTF-8",​100]%% -> %%will collect data from files such "​logfile_abc_1"​ or "​logfile__001"​.%%\\ \\ //Using ''​output''​ parameter for extracting a number from log record://\\ => %%logrt[/​app1/​^test.*log$,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only '​6080'​ to server. Because a numeric value is being sent, the "Type of information"​ for this item can be set to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%%\\ \\ //Using ''​output''​ parameter for rewriting log record before sending to server://\\ => %%logrt[/​app1/​^test.*log$,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"]%% -> %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors
 " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​maxdelay''​ parameter is supported since Zabbix 3.2.\\ The ''​options''​ parameter is supported since Zabbix 4.0.\\ \\ See also additional information on [[log_items|log monitoring]]. ​ | " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​maxdelay''​ parameter is supported since Zabbix 3.2.\\ The ''​options''​ parameter is supported since Zabbix 4.0.\\ \\ See also additional information on [[log_items|log monitoring]]. ​ |
 | ||||| | |||||
 ^logrt.count[file_regexp,<​regexp>,<​encoding>,<​maxproclines>,<​mode>,<​maxdelay>,<​options>​] ​ ^^^^^ ^logrt.count[file_regexp,<​regexp>,<​encoding>,<​maxproclines>,<​mode>,<​maxdelay>,<​options>​] ​ ^^^^^
-^ |Count of matched lines in log file monitoring with log rotation support. ​ |Integer ​ |**file_regexp** - absolute path to file and regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the file name pattern\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required content pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxproclines** - maximum number of new lines per second the agent will analyze. Default value is 10*'​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]].\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it! \\ **options** - type of log file rotation. Possible values:\\ //rotate// (default), //​copytruncate//​. Note that //​copytruncate//​ cannot be used together with //​maxdelay//​. In this case //​maxdelay//​ must be 0 or not specified. See [[log_items#​notes_on_handling_copytruncate_log_file_rotation|copytruncate]] notes.|The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ Log rotation is based on the last modification time of files.\\ \\ See also additional information on [[log_items|log monitoring]].\\ \\ The ''​options''​ parameter is supported since Zabbix 4.0.\\ \\ This item is not supported for Windows Event Log.\\ \\ Supported since Zabbix 3.2.0. ​ |+^ |Count of matched lines in log file monitoring with log rotation support. ​ |Integer ​ |**file_regexp** - absolute path to file and regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the file name pattern\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required content pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​encoding_settings|identifier]]\\ **maxproclines** - maximum number of new lines per second the agent will analyze. Default value is 10*'​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]].\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **maxdelay** - maximum delay in seconds. Type: float. Values: 0 - (default) never ignore log file lines; > 0.0 - ignore older lines in order to get the most recent lines analyzed within "​maxdelay"​ seconds. Read the [[log_items#​using_maxdelay_parameter|maxdelay]] notes before using it! \\ **options** - type of log file rotation. Possible values:\\ //rotate// (default), //​copytruncate//​. Note that //​copytruncate//​ cannot be used together with //​maxdelay//​. In this case //​maxdelay//​ must be 0 or not specified. See [[log_items#​notes_on_handling_copytruncate_log_file_rotation|copytruncate]] notes.|The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ Log rotation is based on the last modification time of files.\\ \\ See also additional information on [[log_items|log monitoring]].\\ \\ The ''​options''​ parameter is supported since Zabbix 4.0.\\ \\ This item is not supported for Windows Event Log.\\ \\ Supported since Zabbix 3.2.0. ​ |
 | ||||| | |||||
 ^net.dns[<​ip>,​name,<​type>,<​timeout>,<​count>,<​protocol>​] ​ ^^^^^ ^net.dns[<​ip>,​name,<​type>,<​timeout>,<​count>,<​protocol>​] ​ ^^^^^
Line 102: Line 103:
 | ||||| | |||||
 ^proc.mem[<​name>,<​user>,<​mode>,<​cmdline>,<​memtype>​] ​ ^^^^^ ^proc.mem[<​name>,<​user>,<​mode>,<​cmdline>,<​memtype>​] ​ ^^^^^
-^ |Memory used by process in bytes. ​ |Integer - with ''​mode''​ as //max//, //min//, //sum//\\ \\ Float - with ''​mode''​ as //​avg// ​ |**name** - process name (default is //all processes//​)\\ **user** - user name (default is //all users//)\\ **mode** - possible values:\\ //avg//, //max//, //min//, //sum// (default)\\ **cmdline** - filter by command line (it is a regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​) \\ **memtype** - [[:​manual/​appendix/​items/​proc_mem_notes|type of memory]] used by process ​ |Examples:​\\ => proc.mem[,​root] -> memory used by all processes running under the "​root"​ user\\ => proc.mem[zabbix_server,​zabbix] -> memory used by all zabbix_server processes running under the zabbix user\\ => proc.mem[,​oracle,​max,​oracleZABBIX] -> memory used by the most memory-hungry process running under oracle having oracleZABBIX in its command line\\ \\ //Note//: When several processes use shared memory, the sum of memory used by processes may result in large, unrealistic values.\\ \\ See [[manual:​appendix:​items:​proc_mem_num_notes|notes]] on selecting processes with ''​name''​ and ''​cmdline''​ parameters (Linux-specific).\\ \\ When this item is invoked from the command line and contains a command line parameter (e.g. using the agent test mode: ''​zabbix_agentd -t proc.num[,,,​apache2]''​),​ one extra process will be counted, as the agent will count itself.\\ \\ The ''​memtype''​ parameter is supported on several [[manual:​appendix:​items:​supported_by_platform|platforms]] since Zabbix 3.0.0. ​ |+^ |Memory used by process in bytes. ​ |Integer - with ''​mode''​ as //max//, //min//, //sum//\\ \\ Float - with ''​mode''​ as //​avg// ​ |**name** - process name (default is //all processes//​)\\ **user** - user name (default is //all users//)\\ **mode** - possible values:\\ //avg//, //max//, //min//, //sum// (default)\\ **cmdline** - filter by command line (it is a regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​) \\ **memtype** - [[:​manual/​appendix/​items/​proc_mem_notes|type of memory]] used by process ​ |Examples:​\\ => proc.mem[,​root] -> memory used by all processes running under the "​root"​ user\\ => proc.mem[zabbix_server,​zabbix] -> memory used by all zabbix_server processes running under the zabbix user\\ => proc.mem[,​oracle,​max,​oracleZABBIX] -> memory used by the most memory-hungry process running under oracle having oracleZABBIX in its command line\\ \\ //Note//: When several processes use shared memory, the sum of memory used by processes may result in large, unrealistic values.\\ \\ See [[manual:​appendix:​items:​proc_mem_num_notes|notes]] on selecting processes with ''​name''​ and ''​cmdline''​ parameters (Linux-specific).\\ \\ When this item is invoked from the command line and contains a command line parameter (e.g. using the agent test mode: ''​zabbix_agentd -t proc.mem[,,,​apache2]''​),​ one extra process will be counted, as the agent will count itself.\\ \\ The ''​memtype''​ parameter is supported on several [[manual:​appendix:​items:​supported_by_platform|platforms]] since Zabbix 3.0.0. ​ |
 | ||||| | |||||
 ^proc.num[<​name>,<​user>,<​state>,<​cmdline>,<​zone>​] ​ ^^^^^ ^proc.num[<​name>,<​user>,<​state>,<​cmdline>,<​zone>​] ​ ^^^^^
Line 175: Line 176:
 | ||||| | |||||
 ^system.swap.size[<​device>,<​type>​] ​ ^^^^^ ^system.swap.size[<​device>,<​type>​] ​ ^^^^^
-^ |Swap space size in bytes or in percentage from total. ​ |Integer - for bytes\\ \\ Float - for percentage ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //free// (free swap space, default), //pfree// (free swap space, in percent), //pused// (used swap space, in percent), //total// (total swap space), //used// (used swap space) ​ |Example:\\ => system.swap.size[,​pfree] -> free swap space percentage\\ \\ If //device// is not specified Zabbix agent will only take into account swap devices (files), physical memory will be ignored. For example, on Solaris systems //swap -s// command includes a portion of physical memory and swap devices (unlike //swap -l//).\\ \\ Note that this key might report incorrect percentage on virtualized (VMware ESXi, VirtualBox) Windows platforms. In this case use perf_counter[\700(_Total)\702] key to obtain correct swap usage data.\\ \\ Old naming: //​system.swap.free//,​ //​system.swap.total// ​ |+^ |Swap space size in bytes or in percentage from total. ​ |Integer - for bytes\\ \\ Float - for percentage ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //free// (free swap space, default), //pfree// (free swap space, in percent), //pused// (used swap space, in percent), //total// (total swap space), //used// (used swap space) ​ |Example:\\ => system.swap.size[,​pfree] -> free swap space percentage\\ \\ If //device// is not specified Zabbix agent will only take into account swap devices (files), physical memory will be ignored. For example, on Solaris systems //swap -s// command includes a portion of physical memory and swap devices (unlike //swap -l//).\\ \\ Note that this key might report incorrect ​swap space size/percentage on virtualized (VMware ESXi, VirtualBox) Windows platforms. In this case you may use the ''​perf_counter[\700(_Total)\702]'' ​key to obtain correct swap space percentage.\\ \\ Old naming: //​system.swap.free//,​ //​system.swap.total// ​ |
 | ||||| | |||||
 ^system.uname ​ ^^^^^ ^system.uname ​ ^^^^^
Line 185: Line 186:
 ^system.users.num ​ ^^^^^ ^system.users.num ​ ^^^^^
 ^ |Number of users logged in.  |Integer ​ |  |**who** command is used on the agent side to obtain the value. ​ | ^ |Number of users logged in.  |Integer ​ |  |**who** command is used on the agent side to obtain the value. ​ |
 +| |||||
 +^systemd.unit.info[<​unit name>,<​property>,<​interface>​] ​ ^^^^^
 +^ |Systemd unit information. ​ |String ​ |**unit name** - unit name (you may want to use the {#​UNIT.NAME} macro in item prototype to discover the name)\\ **property** - unit property (e.g. ActiveState (default), LoadState, Description)\\ **interface** - unit interface type (e.g. Unit (default), Socket, Service) ​ |This item allows to retrieve a specific property from specific type of interface as described in [[https://​www.freedesktop.org/​wiki/​Software/​systemd/​dbus/​|dbus API]].\\ \\ This item is only supported in Zabbix agent 2.\\ \\ This item is supported on Linux platform only.\\ \\ Examples:\\ => systemd.unit.info["​{#​UNIT.NAME}"​] - collect active state (active, reloading, inactive, failed, activating, deactivating) info on discovered systemd units\\ => systemd.unit.info["​{#​UNIT.NAME}",​LoadState] - collect load state info on discovered systemd units\\ => systemd.unit.info[mysqld.service,​Id] - retrieve service technical name (mysqld.service)\\ => systemd.unit.info[mysqld.service,​Description] - retrieve service desciption (MySQL Server)\\ => systemd.unit.info[mysqld.service,​ActiveEnterTimestamp] - retrieve the last time the service entered the active state (1562565036283903)\\ => systemd.unit.info[dbus.socket,​NConnections,​Socket] - collect the number of connections from this socket unit  |
 +| |||||
 +^vfs.dev.discovery ​ ^^^^^
 +^ |List of block devices and their type. Used for low-level discovery. ​ |JSON object ​ |  |This item is supported on Linux platform only.\\ \\ Supported since Zabbix 4.4.0. ​ |
 | ||||| | |||||
 ^vfs.dev.read[<​device>,<​type>,<​mode>​] ​ ^^^^^ ^vfs.dev.read[<​device>,<​type>,<​mode>​] ​ ^^^^^
Line 202: Line 209:
 | ||||| | |||||
 ^vfs.file.contents[file,<​encoding>​] ​ ^^^^^ ^vfs.file.contents[file,<​encoding>​] ​ ^^^^^
-^ |Retrieving contents of a file.  |Text  |**file** - full path to file\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]] ​ |Returns an empty string if the file is empty or contains LF/CR characters only.\\ \\ Example:\\ => vfs.file.contents[/​etc/​passwd]\\ \\ This item is limited to files no larger than 64 Kbytes.\\ \\ Supported since Zabbix agent version 2.0.  |+^ |Retrieving contents of a file.  |Text  |**file** - full path to file\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​encoding_settings|identifier]] ​ |Returns an empty string if the file is empty or contains LF/CR characters only.\\ \\ Byte order mark (BOM) is excluded from the output since Zabbix 4.4.2.\\ \\ Example:\\ => vfs.file.contents[/​etc/​passwd]\\ \\ This item is limited to files no larger than 64 Kbytes.\\ \\ Supported since Zabbix agent version 2.0.  |
 | ||||| | |||||
 ^vfs.file.exists[file] ​ ^^^^^ ^vfs.file.exists[file] ​ ^^^^^
Line 211: Line 218:
 | ||||| | |||||
 ^vfs.file.regexp[file,​regexp,<​encoding>,<​start line>,<​end line>,<​output>​] ​ ^^^^^ ^vfs.file.regexp[file,​regexp,<​encoding>,<​start line>,<​end line>,<​output>​] ​ ^^^^^
-^ |Find string in a file.  |The line containing the matched string, or as specified by the optional ''​output''​ parameter ​ |**file** - full path to file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **start line** - the number of first line to search (first line of file by default).\\ **end line** - the number of last line to search (last line of file by default).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |Only the first matching line is returned.\\ An empty string is returned if no line matched the expression.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​start line'',​ ''​end line''​ and ''​output''​ parameters are supported from version 2.2.\\ \\ Examples:\\ => vfs.file.regexp[/​etc/​passwd,​zabbix]\\ => %%vfs.file.regexp[/​path/​to/​some/​file,"​([0-9]+)$",,​3,​5,​\1]%%\\ => %%vfs.file.regexp[/​etc/​passwd,​^zabbix:​.:​([0-9]+),,,,​\1]%% -> getting the ID of user //zabbix// |+^ |Find string in a file.  |The line containing the matched string, or as specified by the optional ''​output''​ parameter ​ |**file** - full path to file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​encoding_settings|identifier]]\\ **start line** - the number of first line to search (first line of file by default).\\ **end line** - the number of last line to search (last line of file by default).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |Only the first matching line is returned.\\ An empty string is returned if no line matched the expression.\\ \\ Byte order mark (BOM) is excluded from the output since Zabbix 4.4.2.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​start line'',​ ''​end line''​ and ''​output''​ parameters are supported from version 2.2.\\ \\ Examples:\\ => vfs.file.regexp[/​etc/​passwd,​zabbix]\\ => %%vfs.file.regexp[/​path/​to/​some/​file,"​([0-9]+)$",,​3,​5,​\1]%%\\ => %%vfs.file.regexp[/​etc/​passwd,​"^zabbix:​.:​([0-9]+)",,,,\1]%% -> getting the ID of user //zabbix// |
 | ||||| | |||||
 ^vfs.file.regmatch[file,​regexp,<​encoding>,<​start line>,<​end line>​] ​ ^^^^^ ^vfs.file.regmatch[file,​regexp,<​encoding>,<​start line>,<​end line>​] ​ ^^^^^
-^ |Find string in a file.  |0 - match not found\\ \\ 1 - found  |**file** - full path to file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **start line** - the number of first line to search (first line of file by default).\\ **end line** - the number of last line to search (last line of file by default). ​ |The ''​start line''​ and ''​end line''​ parameters are supported from version 2.2.\\ \\ Example:\\ => vfs.file.regmatch[/​var/​log/​app.log,​error] ​ |+^ |Find string in a file.  |0 - match not found\\ \\ 1 - found  |**file** - full path to file\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​encoding_settings|identifier]]\\ **start line** - the number of first line to search (first line of file by default).\\ **end line** - the number of last line to search (last line of file by default). ​ |Byte order mark (BOM) is ignored since Zabbix 4.4.2.\\ ​ \\ The ''​start line''​ and ''​end line''​ parameters are supported from version 2.2.\\ \\ Example:\\ => vfs.file.regmatch[/​var/​log/​app.log,​error] ​ |
 | ||||| | |||||
 ^vfs.file.size[file] ​ ^^^^^ ^vfs.file.size[file] ​ ^^^^^
Line 235: Line 242:
 | ||||| | |||||
 ^web.page.get[host,<​path>,<​port>​] ​ ^^^^^ ^web.page.get[host,<​path>,<​port>​] ​ ^^^^^
-^ |Get content of web page.  |Web page source as text (including headers) ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)  |Returns an empty string on fail. \\ \\ Example:\\ => %%web.page.get[www.zabbix.com,​index.php,​80]%% ​ |+^ |Get content of web page.  |Web page source as text (including headers) ​ |**host** - hostname ​or URL (as ''​%%scheme://​host:​port/​path%%'',​ where only //host// is mandatory).\\ Allowed URL schemes: //http//, //​https//<​sup>​**[[#​footnotes|5]]**</​sup>​. Missing scheme will be treated as //http//. If URL is specified ''​path''​ and ''​port''​ must be empty. Specifying user name/​password when connecting to servers that require authentication,​ for example: ''​%%http://​user:​[email protected]%%''​ is only possible with cURL support <​sup>​**[[#​footnotes|5]]**</​sup>​.\\ Punycode is suported in hostnames.\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80 for HTTP)  |This item turns unsupported if the resource specified in ''​host''​ does not exist or is unavailable.\\ \\ ''​host''​ can be hostname, domain name, IPv4 or IPv6 address. But for IPv6 address Zabbix agent must be compiled with IPv6 support enabled.\\ \\ Example:\\ => %%web.page.get[www.zabbix.com,​index.php,​80]%%\\  => %%web.page.get[https://​www.zabbix.com]%%\\ => %%web.page.get[https://​blog.zabbix.com/?​s=zabbix]%%\\ ​ => %%web.page.get[localhost:​80]%%\\ => %%web.page.get["​[::​1]/​server-status"​]%%  |
 | ||||| | |||||
 ^web.page.perf[host,<​path>,<​port>​] ​ ^^^^^ ^web.page.perf[host,<​path>,<​port>​] ​ ^^^^^
-^ |Loading time of full web page (in seconds). ​ |Float ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)  |Returns 0 on fail. \\ \\ Example:\\ => %%web.page.perf[www.zabbix.com,​index.php,​80]%% |+^ |Loading time of full web page (in seconds). ​ |Float ​ |**host** - hostname ​or URL (as ''​%%scheme://​host:​port/​path%%'',​ where only //host// is mandatory).\\ Allowed URL schemes: //http//, //​https//<​sup>​**[[#​footnotes|5]]**</​sup>​. Missing scheme will be treated as //http//. If URL is specified ''​path''​ and ''​port''​ must be empty. Specifying user name/​password when connecting to servers that require authentication,​ for example: ''​%%http://​user:​[email protected]%%''​ is only possible with cURL support <​sup>​**[[#​footnotes|5]]**</​sup>​.\\ Punycode is suported in hostnames.\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80 for HTTP)  |This item turns unsupported if the resource specified in ''​host''​ does not exist or is unavailable.\\ \\ ''​host''​ can be hostname, domain name, IPv4 or IPv6 address. But for IPv6 address Zabbix agent must be compiled with IPv6 support enabled.\\ \\ Example:\\ => %%web.page.perf[www.zabbix.com,​index.php,​80]%%\\  => %%web.page.perf[https://​www.zabbix.com]%%  ​|
 | ||||| | |||||
 ^web.page.regexp[host,<​path>,<​port>,​regexp,<​length>,<​output>​] ​ ^^^^^ ^web.page.regexp[host,<​path>,<​port>,​regexp,<​length>,<​output>​] ​ ^^^^^
-^ |Find string on a web page.  | The matched string, or as specified by the optional ''​output''​ parameter ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **length** - maximum number of characters to return\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |Returns an empty string ​if no match was found or on fail.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​output''​ parameter is supported from version 2.2. \\ \\  Example:\\ => %%web.page.regexp[www.zabbix.com,​index.php,​80,​OK,​2]%% ​ |+^ |Find string on a web page.  | The matched string, or as specified by the optional ''​output''​ parameter ​ |**host** - hostname ​or URL (as ''​%%scheme://​host:​port/​path%%'',​ where only //host// is mandatory).\\ Allowed URL schemes: //http//, //​https//<​sup>​**[[#​footnotes|5]]**</​sup>​. Missing scheme will be treated as //http//. If URL is specified ''​path''​ and ''​port''​ must be empty. Specifying user name/​password when connecting to servers that require authentication,​ for example: ''​%%http://​user:​[email protected]%%''​ is only possible with cURL support <​sup>​**[[#​footnotes|5]]**</​sup>​.\\ Punycode is suported in hostnames.\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80 for HTTP)\\ **regexp** - regular expression<​sup>​**[[#​footnotes|4]]**</​sup>​ describing the required pattern\\ **length** - maximum number of characters to return\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |This item turns unsupported ​if the resource specified in ''​host''​ does not exist or is unavailable.\\ \\ ''​host''​ can be hostname, domain name, IPv4 or IPv6 address. But for IPv6 address Zabbix agent must be compiled with IPv6 support enabled.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​output''​ parameter is supported from version 2.2. \\ \\  Example:\\ => %%web.page.regexp[www.zabbix.com,​index.php,​80,​OK,​2]%%\\ ​ => %%web.page.regexp[https://​www.zabbix.com,,​,​OK,​2]%% ​ |
 ^zabbix.stats[<​ip>,<​port>​] ​ ^^^^^ ^zabbix.stats[<​ip>,<​port>​] ​ ^^^^^
 ^ |Return a set of Zabbix server or proxy internal metrics remotely. ​ |JSON object ​ |**ip** - IP/​DNS/​network mask list of servers/​proxies to be remotely queried (default is 127.0.0.1)\\ **port** - port of server/​proxy to be remotely queried (default is 10051) ​ |Note that the stats request will only be accepted from the addresses listed in the '​StatsAllowedIP'​ [[:​manual/​appendix/​config/​zabbix_server|server]]/​[[:​manual/​appendix/​config/​zabbix_proxy|proxy]] parameter on the target instance.\\ \\ A selected set of internal metrics is returned by this item. For details, see [[:​manual/​appendix/​items/​remote_stats#​exposed_metrics|Remote monitoring of Zabbix stats]]. ​ | ^ |Return a set of Zabbix server or proxy internal metrics remotely. ​ |JSON object ​ |**ip** - IP/​DNS/​network mask list of servers/​proxies to be remotely queried (default is 127.0.0.1)\\ **port** - port of server/​proxy to be remotely queried (default is 10051) ​ |Note that the stats request will only be accepted from the addresses listed in the '​StatsAllowedIP'​ [[:​manual/​appendix/​config/​zabbix_server|server]]/​[[:​manual/​appendix/​config/​zabbix_proxy|proxy]] parameter on the target instance.\\ \\ A selected set of internal metrics is returned by this item. For details, see [[:​manual/​appendix/​items/​remote_stats#​exposed_metrics|Remote monitoring of Zabbix stats]]. ​ |
Line 258: Line 265:
 <​sup>​**4**</​sup>​ [[https://​en.wikipedia.org/​wiki/​Perl_Compatible_Regular_Expressions|Perl Compatible Regular Expression]] (PCRE) since Zabbix 3.4; POSIX-extended regular expression before that. See also: [[:​manual/​regular_expressions#​regular_expression_support_by_location|Regular expressions supported by location]]. <​sup>​**4**</​sup>​ [[https://​en.wikipedia.org/​wiki/​Perl_Compatible_Regular_Expressions|Perl Compatible Regular Expression]] (PCRE) since Zabbix 3.4; POSIX-extended regular expression before that. See also: [[:​manual/​regular_expressions#​regular_expression_support_by_location|Regular expressions supported by location]].
  
-=== Available encodings ​===+<​sup>​**5**</​sup>​ SSL (HTTPS) is supported only if agent is compiled with cURL support. Otherwise the item will turn unsupported. 
 + 
 +=== Encoding settings ​===
  
-The ''​encoding''​ parameter ​is used to specify encoding for processing corresponding item checks, so that data acquired will not be corruptedFor a list of supported encodings (code page identifiers), please consult respective documentation,​ such as documentation for [[http://​www.gnu.org/​software/​libiconv/​|libiconv]] (GNU Project) or Microsoft Windows SDK documentation for "Code Page Identifiers"​. ​+To make sure that the acquired data are not corrupted you may specify the correct encoding for processing the check (e.g. '​vfs.file.contents'​) in the ''​encoding''​ parameter. ​The list of supported encodings (code page identifiers) ​may be found in documentation for [[http://​www.gnu.org/​software/​libiconv/​|libiconv]] (GNU Project) or in Microsoft Windows SDK documentation for "Code Page Identifiers"​. ​ 
 +  
 +If no encoding is specified in the ''​encoding''​ parameter ​ the following resolution strategies are applied:
  
-If empty ''​encoding''​ is passed, then UTF-8 (default locale for newer Unix/Linux distributions, see your system'​s settingsor  ​ANSI with system-specific extension ​(Windows) ​is used by default.+  * Standard resolution - UTF-8 is used in Unix/​Linux ​(default in newer distributions)ANSI with system-specific extension is used in Windows; 
 +  * BOM analysis -  applicable for items '​vfs.file.contents',​ '​vfs.file.regexp',​ '​vfs.file.regmatch'​ since Zabbix 4.4.2. An attempt is made to determine the correct encoding ​by using the byte order mark (BOM) at the beginning of the file. If BOM is not present - standard resolution (see above) is applied instead.
  
 === Troubleshooting agent items === === Troubleshooting agent items ===
  
   * If used with the passive agent, //Timeout// value in server configuration may need to be higher than //Timeout// in the agent configuration file. Otherwise the item may not get any value because the server request to agent timed out first.   * If used with the passive agent, //Timeout// value in server configuration may need to be higher than //Timeout// in the agent configuration file. Otherwise the item may not get any value because the server request to agent timed out first.