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/08/15 07:39]
martins-v fixing typo/copy-paste error
manual:config:items:itemtypes:zabbix_agent [2021/03/03 10:54] (current)
marinagen [ZBX-18345] net.tcp.port <ip> parameter can also be a DNS
Line 75: Line 75:
 | ||||| | |||||
 ^net.tcp.port[<​ip>,​port] ​ ^^^^^ ^net.tcp.port[<​ip>,​port] ​ ^^^^^
-^ |Checks if it is possible to make TCP connection to specified port.  |0 - cannot connect\\ \\ 1 - can connect ​ |**ip** - IP address ​(default is 127.0.0.1)\\ **port** - port number ​ |Example:\\ => net.tcp.port[,​80] -> can be used to test availability of web server running on port 80.\\ \\ For simple TCP performance testing use net.tcp.service.perf[tcp,<​ip>,<​port>​]\\ \\ Note that these checks may result in additional messages in system daemon logfiles (SMTP and SSH sessions being logged usually). \\ \\ Old naming: //​check_port[*]//​|+^ |Checks if it is possible to make TCP connection to specified port.  |0 - cannot connect\\ \\ 1 - can connect ​ |**ip** - IP or DNS name (default is 127.0.0.1)\\ **port** - port number ​ |Example:\\ => net.tcp.port[,​80] -> can be used to test availability of web server running on port 80.\\ \\ For simple TCP performance testing use net.tcp.service.perf[tcp,<​ip>,<​port>​]\\ \\ Note that these checks may result in additional messages in system daemon logfiles (SMTP and SSH sessions being logged usually). \\ \\ Old naming: //​check_port[*]//​|
 | ||||| | |||||
 ^net.tcp.service[service,<​ip>,<​port>​] ​ ^^^^^ ^net.tcp.service[service,<​ip>,<​port>​] ​ ^^^^^
Line 125: Line 125:
 | ||||| | |||||
 ^system.cpu.util[<​cpu>,<​type>,<​mode>​] ​ ^^^^^ ^system.cpu.util[<​cpu>,<​type>,<​mode>​] ​ ^^^^^
-^ |CPU utilisation percentage. ​ |Float ​ |**cpu** - //<CPU number>//​ or //all// (default)\\ **type** - possible values:\\ //idle//, //nice//, //user// (default), //system// (default for Windows), //iowait//, //​interrupt//,​ //​softirq//,​ //steal//, //guest// (on Linux kernels 2.6.24 and above), //​guest_nice//​ (on Linux kernels 2.6.33 and above). Parameters //user// and //nice// time no longer include //guest// time and //​guest_nice//​ time since Zabbix 3.0.14.\\ **mode** - possible values:\\ //avg1// (one-minute average, default), //avg5//, //​avg15// ​ |Example:\\ => system.cpu.util[0,​user,​avg5]\\ \\ Old naming: //​system.cpu.idleX,​ system.cpu.niceX,​ system.cpu.systemX,​ system.cpu.userX// ​ |+^ |CPU utilisation percentage. ​ |Float ​ |**cpu** - //<CPU number>//​ or //all// (default)\\ **type** - possible values:\\ //idle//, //nice//, //user// (default), //system// (default for Windows), //iowait//, //​interrupt//,​ //​softirq//,​ //steal//, //guest// (on Linux kernels 2.6.24 and above), //​guest_nice//​ (on Linux kernels 2.6.33 and above). Parameters //user// and //nice// time no longer include //guest// time and //​guest_nice//​ time since Zabbix 3.0.14.\\ See also [[:​manual/​appendix/​items/​supported_by_platform|platform-specific]] details for this parameter.\\ **mode** - possible values:\\ //avg1// (one-minute average, default), //avg5//, //​avg15// ​ |Example:\\ => system.cpu.util[0,​user,​avg5]\\ \\ Old naming: //​system.cpu.idleX,​ system.cpu.niceX,​ system.cpu.systemX,​ system.cpu.userX// ​ |
 | ||||| | |||||
 ^system.hostname[<​type>​] ​ ^^^^^ ^system.hostname[<​type>​] ​ ^^^^^
Line 160: Line 160:
 | ||||| | |||||
 ^system.sw.packages[<​package>,<​manager>,<​format>​] ​ ^^^^^ ^system.sw.packages[<​package>,<​manager>,<​format>​] ​ ^^^^^
-^ |Listing of installed packages. ​ |Text  |**package** - //all// (default) or a regular expression\\ **manager** - //all// (default) or a package manager\\ **format** - //full// (default) or //short// |Lists (alphabetically) installed packages whose name matches the given ''​package''​ regexp (//all// lists them all).\\ \\ Example:\\ => system.sw.packages[mini,​dpkg,​short] -> python-minimal,​ python2.6-minimal,​ ubuntu-minimal\\ \\ Supported package managers (executed command):\\ dpkg (dpkg %%--get-selections%%)\\ pkgtool (ls /​var/​log/​packages)\\ rpm (rpm -qa)\\ pacman (pacman -Q)\\ \\ If ''​format''​ is specified as //full//, packages are grouped by package managers (each manager on a seperate ​line beginning with its name in square brackets).\\ If ''​format''​ is specified as //short//, packages are not grouped and are listed on a single line.\\ \\ Supported since Zabbix agent version 2.0. |+^ |Listing of installed packages. ​ |Text  |**package** - //all// (default) or a regular expression\\ **manager** - //all// (default) or a package manager\\ **format** - //full// (default) or //short// |Lists (alphabetically) installed packages whose name matches the given ''​package''​ regexp (//all// lists them all).\\ \\ Example:\\ => system.sw.packages[mini,​dpkg,​short] -> python-minimal,​ python2.6-minimal,​ ubuntu-minimal\\ \\ Supported package managers (executed command):\\ dpkg (dpkg %%--get-selections%%)\\ pkgtool (ls /​var/​log/​packages)\\ rpm (rpm -qa)\\ pacman (pacman -Q)\\ \\ If ''​format''​ is specified as //full//, packages are grouped by package managers (each manager on a separate ​line beginning with its name in square brackets).\\ If ''​format''​ is specified as //short//, packages are not grouped and are listed on a single line.\\ \\ Supported since Zabbix agent version 2.0. |
 | ||||| | |||||
 ^system.swap.in[<​device>,<​type>​] ​ ^^^^^ ^system.swap.in[<​device>,<​type>​] ​ ^^^^^
-^ |Swap in (from device into memory) statistics. ​ |Integer ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //count// (number of swapins), //sectors// (sectors swapped in), //pages// (pages swapped in). See [[manual:appendix:items:supported_by_platform|supported by platform]] for details on defaults.|Example:​\\ => system.swap.in[,​pages]\\ \\ The source of this information is:\\ /​proc/​swaps,​ /​proc/​partitions,​ /proc/stat (Linux 2.4)\\ /​proc/​swaps,​ /​proc/​diskstats,​ /​proc/​vmstat (Linux 2.6)  |+^ |Swap in (from device into memory) statistics. ​ |Integer ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //count// (number of swapins), //sectors// (sectors swapped in), //pages// (pages swapped in).\\ See also [[:manual/appendix/items/supported_by_platform|platform-specific]] details ​for this parameter |Example:\\ => system.swap.in[,​pages]\\ \\ The source of this information is:\\ /​proc/​swaps,​ /​proc/​partitions,​ /proc/stat (Linux 2.4)\\ /​proc/​swaps,​ /​proc/​diskstats,​ /​proc/​vmstat (Linux 2.6)  |
 | ||||| | |||||
 ^system.swap.out[<​device>,<​type>​] ​ ^^^^^ ^system.swap.out[<​device>,<​type>​] ​ ^^^^^
-^ |Swap out (from memory onto device) statistics. ​ |Integer ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //count// (number of swapouts), //sectors// (sectors swapped out), //pages// (pages swapped out). See [[manual:appendix:items:supported_by_platform|supported by platform]] for details on defaults.|Example:​\\ => system.swap.out[,​pages]\\ \\ The source of this information is:\\ /​proc/​swaps,​ /​proc/​partitions,​ /proc/stat (Linux 2.4)\\ /​proc/​swaps,​ /​proc/​diskstats,​ /​proc/​vmstat (Linux 2.6) |+^ |Swap out (from memory onto device) statistics. ​ |Integer ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //count// (number of swapouts), //sectors// (sectors swapped out), //pages// (pages swapped out).\\ See also [[:manual/appendix/items/supported_by_platform|platform-specific]] details ​for this parameter |Example:\\ => system.swap.out[,​pages]\\ \\ The source of this information is:\\ /​proc/​swaps,​ /​proc/​partitions,​ /proc/stat (Linux 2.4)\\ /​proc/​swaps,​ /​proc/​diskstats,​ /​proc/​vmstat (Linux 2.6) |
 | ||||| | |||||
 ^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 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// ​ |+^ |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)\\ See also [[:​manual/​appendix/​items/​supported_by_platform|platform-specific]] details for this parameter. ​ ​|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 181: Line 181:
 | ||||| | |||||
 ^vfs.dev.read[<​device>,<​type>,<​mode>​] ​ ^^^^^ ^vfs.dev.read[<​device>,<​type>,<​mode>​] ​ ^^^^^
-^ |Disk read statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //bps//\\ \\ //Note//: Since 3.0.25, if using an update interval of three hours or more<​sup>​**[[#​footnotes|2]]**</​sup>,​ will always return '​0' ​ |**device** - disk device (default is //all// <​sup>​**[[#​footnotes|3]]**</​sup>​) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //​bps//​\\ ​This parameter ​must be specified, since defaults ​differ under various OSes.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |You may use relative device names (for example, ''​sda''​) as well as an optional /dev/ prefix (for example, ''/​dev/​sda''​).\\ \\ LVM logical volumes are supported.\\ \\ Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.read[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 devices (1023 individual and one for //all//).\\ \\ Old naming: //​io[*]// ​ |+^ |Disk read statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //bps//\\ \\ //Note//: Since 3.0.25, if using an update interval of three hours or more<​sup>​**[[#​footnotes|2]]**</​sup>,​ will always return '​0' ​ |**device** - disk device (default is //all// <​sup>​**[[#​footnotes|3]]**</​sup>​) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //​bps//​\\ ​Note that '​type' ​parameter ​support and defaults ​depend on the platform. See [[:​manual/​appendix/​items/​supported_by_platform|platform-specific]] details.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |You may use relative device names (for example, ''​sda''​) as well as an optional /dev/ prefix (for example, ''/​dev/​sda''​).\\ \\ LVM logical volumes are supported.\\ \\ Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.read[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 devices (1023 individual and one for //all//).\\ \\ Old naming: //​io[*]// ​ |
 | ||||| | |||||
 ^vfs.dev.write[<​device>,<​type>,<​mode>​] ​ ^^^^^ ^vfs.dev.write[<​device>,<​type>,<​mode>​] ​ ^^^^^
-^ |Disk write statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //bps//\\ \\ //Note//: Since 3.0.25, if using an update interval of three hours or more<​sup>​**[[#​footnotes|2]]**</​sup>,​ will always return '​0' ​ |**device** - disk device (default is //all// <​sup>​**[[#​footnotes|3]]**</​sup>​) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //​bps//​\\ ​This parameter ​must be specified, since defaults ​differ under various OSes.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |You may use relative device names (for example, ''​sda''​) as well as an optional /dev/ prefix (for example, ''/​dev/​sda''​).\\ \\ LVM logical volumes are supported.\\ \\ Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.write[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 (1023 individual and one for //all//).\\ \\ Old naming: //​io[*]// ​ |+^ |Disk write statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //bps//\\ \\ //Note//: Since 3.0.25, if using an update interval of three hours or more<​sup>​**[[#​footnotes|2]]**</​sup>,​ will always return '​0' ​ |**device** - disk device (default is //all// <​sup>​**[[#​footnotes|3]]**</​sup>​) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //​bps//​\\ ​Note that '​type' ​parameter ​support and defaults ​depend on the platform. See [[:​manual/​appendix/​items/​supported_by_platform|platform-specific]] details.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |You may use relative device names (for example, ''​sda''​) as well as an optional /dev/ prefix (for example, ''/​dev/​sda''​).\\ \\ LVM logical volumes are supported.\\ \\ Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.write[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 (1023 individual and one for //all//).\\ \\ Old naming: //​io[*]// ​ |
 | ||||| | |||||
 ^vfs.file.cksum[file] ​ ^^^^^ ^vfs.file.cksum[file] ​ ^^^^^
Line 199: Line 199:
 | ||||| | |||||
 ^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** - GNU regular expression\\ **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** - GNU regular expression\\ **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// |
 | ||||| | |||||
 ^vfs.file.regmatch[file,​regexp,<​encoding>,<​start line>,<​end line>​] ​ ^^^^^ ^vfs.file.regmatch[file,​regexp,<​encoding>,<​start line>,<​end line>​] ​ ^^^^^
Line 220: Line 220:
 | ||||| | |||||
 ^vm.memory.size[<​mode>​] ​ ^^^^^ ^vm.memory.size[<​mode>​] ​ ^^^^^
-^ |Memory size in bytes or in percentage from total. ​ |Integer - for bytes\\ \\ Float - for percentage ​ |**mode** - possible values: \\ //total// (default), //active//, //anon//, //​buffers//,​ //cached//, //exec//, //file//, //free//, //​inactive//,​ //pinned//, //shared//, //wired//, //used//, //pused// (used, percentage),​ //​available//,​ //​pavailable//​ (available, percentage) ​ |This item accepts three categories of parameters:​\\ \\ 1) //total// - total amount of memory;\\ 2) platform-specific memory types: //active//, //anon//, //​buffers//,​ //cached//, //exec//, //file//, //free//, //​inactive//,​ //pinned//, //shared//, //​wired//;​\\ 3) user-level estimates on how much memory is used and available: //used//, //pused//, //​available//,​ //​pavailable//​.\\ \\ See a more detailed description of vm.memory.size [[manual:​appendix:​items:​vm.memory.size_params|parameters]].\\ \\ Old naming: //​vm.memory.buffers//,​ //​vm.memory.cached//,​ //​vm.memory.free//,​ //​vm.memory.shared//,​ //​vm.memory.total// ​ |+^ |Memory size in bytes or in percentage from total. ​ |Integer - for bytes\\ \\ Float - for percentage ​ |**mode** - possible values: \\ //total// (default), //active//, //anon//, //​buffers//,​ //cached//, //exec//, //file//, //free//, //​inactive//,​ //pinned//, //shared//, //wired//, //used//, //pused// (used, percentage),​ //​available//,​ //​pavailable//​ (available, percentage)\\ See also [[:​manual/​appendix/​items/​supported_by_platform|platform-specific]] support and [[manual:​appendix:​items:​vm.memory.size_params|additional details]] for this parameter. ​ |This item accepts three categories of parameters:​\\ \\ 1) //total// - total amount of memory;\\ 2) platform-specific memory types: //active//, //anon//, //​buffers//,​ //cached//, //exec//, //file//, //free//, //​inactive//,​ //pinned//, //shared//, //​wired//;​\\ 3) user-level estimates on how much memory is used and available: //used//, //pused//, //​available//,​ //​pavailable//​. ​ |
 | ||||| | |||||
 ^web.page.get[host,<​path>,<​port>​] ​ ^^^^^ ^web.page.get[host,<​path>,<​port>​] ​ ^^^^^