This section provides details on the item keys that use communication with Zabbix agent for data gathering.
There are passive and active agent checks. When configuring an item, you can select the required type:
Note that all item keys supported by Zabbix agent on Windows are also supported by the new generation Zabbix agent 2. See the additional item keys that you can use with the agent 2 only.
The item keys that you can use with Zabbix agent are listed below.
The item keys are listed without parameters and additional information. Click on the item key to see the full details.
Item key | Description | Item group |
---|---|---|
kernel.maxfiles | The maximum number of opened files supported by OS. | Kernel |
kernel.maxproc | The maximum number of processes supported by OS. | |
kernel.openfiles | The number of currently open file descriptors. | |
log | The monitoring of a log file. | Log monitoring |
log.count | The count of matched lines in a monitored log file. | |
logrt | The monitoring of a log file that is rotated. | |
logrt.count | The count of matched lines in a monitored log file that is rotated. | |
modbus.get | Reads Modbus data. | Modbus |
net.dns | Checks the status of a DNS service. | Network |
net.dns.perf | Checks the performance of a DNS service. | |
net.dns.record | Performs a DNS query. | |
net.if.collisions | The number of out-of-window collisions. | |
net.if.discovery | The list of network interfaces. | |
net.if.in | The incoming traffic statistics on a network interface. | |
net.if.out | The outgoing traffic statistics on a network interface. | |
net.if.total | The sum of incoming and outgoing traffic statistics on a network interface. | |
net.tcp.listen | Checks if this TCP port is in LISTEN state. | |
net.tcp.port | Checks if it is possible to make a TCP connection to the specified port. | |
net.tcp.service | Checks if a service is running and accepting TCP connections. | |
net.tcp.service.perf | Checks the performance of a TCP service. | |
net.tcp.socket.count | Returns the number of TCP sockets that match parameters. | |
net.udp.listen | Checks if this UDP port is in LISTEN state. | |
net.udp.service | Checks if a service is running and responding to UDP requests. | |
net.udp.service.perf | Checks the performance of a UDP service. | |
net.udp.socket.count | Returns the number of UDP sockets that match parameters. | |
proc.cpu.util | The process CPU utilization percentage. | Processes |
proc.get | The list of OS processes and their parameters. | |
proc.mem | The memory used by the process in bytes. | |
proc.num | The number of processes. | |
sensor | Hardware sensor reading. | Sensors |
system.boottime | The system boot time. | System |
system.cpu.discovery | The list of detected CPUs/CPU cores. | |
system.cpu.intr | The device interrupts. | |
system.cpu.load | The CPU load. | |
system.cpu.num | The number of CPUs. | |
system.cpu.switches | The count of context switches. | |
system.cpu.util | The CPU utilization percentage. | |
system.hostname | The system host name. | |
system.hw.chassis | The chassis information. | |
system.hw.cpu | The CPU information. | |
system.hw.devices | The listing of PCI or USB devices. | |
system.hw.macaddr | The listing of MAC addresses. | |
system.localtime | The system time. | |
system.run | Run the specified command on the host. | |
system.stat | The system statistics. | |
system.sw.arch | The software architecture information. | |
system.sw.os | The operating system information. | |
system.sw.os.get | Detailed information about the operating system (version, type, distribution name, minor and major version, etc). | |
system.sw.packages | The listing of installed packages. | |
system.sw.packages.get | A detailed listing of installed packages. | |
system.swap.in | The swap-in (from device into memory) statistics. | |
system.swap.out | The swap-out (from memory onto device) statistics. | |
system.swap.size | The swap space size in bytes or in percentage from total. | |
system.uname | Identification of the system. | |
system.uptime | The system uptime in seconds. | |
system.users.num | The number of users logged in. | |
vfs.dev.discovery | The list of block devices and their type. | Virtual file systems |
vfs.dev.read | The disk read statistics. | |
vfs.dev.write | The disk write statistics. | |
vfs.dir.count | The directory entry count. | |
vfs.dir.get | The directory entry list. | |
vfs.dir.size | The directory size. | |
vfs.file.cksum | The file checksum, calculated by the UNIX cksum algorithm. | |
vfs.file.contents | Retrieving the contents of a file. | |
vfs.file.exists | Checks if the file exists. | |
vfs.file.get | Returns information about a file. | |
vfs.file.md5sum | The MD5 checksum of file. | |
vfs.file.owner | Retrieves the owner of a file. | |
vfs.file.permissions | Returns a 4-digit string containing the octal number with UNIX permissions. | |
vfs.file.regexp | Retrieve a string in the file. | |
vfs.file.regmatch | Find a string in the file. | |
vfs.file.size | The file size. | |
vfs.file.time | The file time information. | |
vfs.fs.discovery | The list of mounted filesystems with their type and mount options. | |
vfs.fs.get | The list of mounted filesystems with their type, available disk space, inode statistics and mount options. | |
vfs.fs.inode | The number or percentage of inodes. | |
vfs.fs.size | The disk space in bytes or in percentage from total. | |
vm.memory.size | The memory size in bytes or in percentage from total. | Virtual memory |
web.page.get | Get the content of a web page. | Web monitoring |
web.page.perf | The loading time of a full web page. | |
web.page.regexp | Find a string on the web page. | |
agent.hostmetadata | The agent host metadata. | Zabbix |
agent.hostname | The agent host name. | |
agent.ping | The agent availability check. | |
agent.variant | The variant of Zabbix agent (Zabbix agent or Zabbix agent 2). | |
agent.version | The version of Zabbix agent. | |
zabbix.stats | Returns a set of Zabbix server or proxy internal metrics remotely. | |
zabbix.stats | Returns the number of monitored items in the queue which are delayed on Zabbix server or proxy remotely. |
Except where specified differently in the item details, the agent items (and all parameters) are supported on:
Many agent items are also supported on Windows. See the Windows agent item page for details.
Parameters without angle brackets are mandatory. Parameters marked with angle brackets < > are optional.
The maximum number of opened files supported by OS.
Return value: Integer.
Supported platforms: Linux, FreeBSD, MacOS X, OpenBSD, NetBSD.
The maximum number of processes supported by OS.
Return value: Integer.
Supported platforms: Linux 2.6 and later, FreeBSD, Solaris, MacOS X, OpenBSD, NetBSD.
The number of currently open file descriptors.
Return value: Integer.
Supported platforms: Linux (the item may work on other UNIX-like platforms).
The monitoring of a log file.
Return value: Log.
See supported platforms.
Parameters:
Comments:
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.output
parameter takes place on the agent.Examples:
Example of using the 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] #this item 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.
Example of using the output
parameter for rewriting a 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"] #this item 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 the server.
The count of matched lines in a monitored log file.
Return value: Integer.
See supported platforms.
Parameters:
Comments:
The monitoring of a log file that is rotated.
Return value: Log.
See supported platforms.
Parameters:
Comments:
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.output
parameter takes place on the agent.Examples:
logrt["/home/zabbix/logs/^logfile[0-9]{1,3}$",,,100] #this item will match a file like "logfile1" (will not match ".logfile1")
logrt["/home/user/^logfile_.*_[0-9]{1,3}$","pattern_to_match","UTF-8",100] #this item will collect data from files such "logfile_abc_1" or "logfile__001"
Example of using the 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] #this item 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.
Example of using the output
parameter for rewriting a 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"] #this item 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 count of matched lines in a monitored log file that is rotated.
Return value: Integer.
See supported platforms.
Parameters:
Comments:
Reads Modbus data.
Return value: JSON object.
Supported platforms: Linux.
Parameters:
protocol://connection_string
;See a detailed description of parameters.
Checks the status of a DNS service.
Return values: 0 - DNS resolution failed (DNS server did not respond or returned an error); 1 - DNS resolution succeeded.
See supported platforms.
Parameters:
Comments:
type
are: ANY, A, NS, CNAME, MB, MG, MR, PTR, MD, MF, MX, SOA, NULL, WKS (not supported for Zabbix agent on Windows, Zabbix agent 2 on all OS), HINFO, MINFO, TXT, SRVtype
is set to PTR), you can provide the DNS name in both reversed and non-reversed format (see examples below). Note that when PTR record is requested, the DNS name is actually an IP address.Examples:
net.dns[198.51.100.1,example.com,MX,2,1]
net.dns[,198.51.100.1,PTR]
net.dns[,1.100.51.198.in-addr.arpa,PTR]
net.dns[,2a00:1450:400f:800::200e,PTR]
net.dns[,e.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.0.f.0.0.4.0.5.4.1.0.0.a.2.ip6.arpa,PTR]
Checks the performance of a DNS service.
Return value: Float (0 - service is down; seconds - the number of seconds spent waiting for a response from the service).
See supported platforms.
Parameters:
Comments:
type
are:type
is set to PTR), you can provide the DNS name in both reversed and non-reversed format (see examples below). Note that when PTR record is requested, the DNS name is actually an IP address.0
when the DNS server responds with an error code (for example, NXDOMAIN
or SERVFAIL
).Examples:
net.dns.perf[198.51.100.1,example.com,MX,2,1]
net.dns.perf[,198.51.100.1,PTR]
net.dns.perf[,1.100.51.198.in-addr.arpa,PTR]
net.dns.perf[,2a00:1450:400f:800::200e,PTR]
net.dns.perf[,e.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.0.f.0.0.4.0.5.4.1.0.0.a.2.ip6.arpa,PTR]
Performs a DNS query.
Return value: a character string with the required type of information.
See supported platforms.
Parameters:
Comments:
type
are:type
is set to PTR), you can provide the DNS name in reversed or non-reversed format (see examples below). Note that when PTR record is requested, the DNS name is actually an IP address.Examples:
net.dns.record[198.51.100.1,example.com,MX,2,1]
net.dns.record[,198.51.100.1,PTR]
net.dns.record[,1.100.51.198.in-addr.arpa,PTR]
net.dns.record[,2a00:1450:400f:800::200e,PTR]
net.dns.record[,e.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.0.f.0.0.4.0.5.4.1.0.0.a.2.ip6.arpa,PTR]
The number of out-of-window collisions.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris, AIX, MacOS X, OpenBSD, NetBSD. Root privileges are required on NetBSD.
Parameter:
The list of network interfaces. Used for low-level discovery.
Return value: JSON object.
Supported platforms: Linux, FreeBSD, Solaris, HP-UX, AIX, OpenBSD, NetBSD.
The incoming traffic statistics on a network interface.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris5, HP-UX, AIX, MacOS X, OpenBSD, NetBSD. Root privileges are required on NetBSD.
Parameters:
Comments:
Examples:
The outgoing traffic statistics on a network interface.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris5, HP-UX, AIX, MacOS X, OpenBSD, NetBSD. Root privileges are required on NetBSD.
Parameters:
Comments:
Examples:
The sum of incoming and outgoing traffic statistics on a network interface.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris5, HP-UX, AIX, MacOS X, OpenBSD, NetBSD. Root privileges are required on NetBSD.
Parameters:
Comments:
net.if.in
and net.if.out
work for dropped packets on your platform.Examples:
Checks if this TCP port is in LISTEN state.
Return values: 0 - it is not in LISTEN state; 1 - it is in LISTEN state.
Supported platforms: Linux, FreeBSD, Solaris, MacOS X.
Parameter:
On Linux kernels 2.6.14 and above, the information about listening TCP sockets is obtained from the kernel's NETLINK interface, if possible. Otherwise, the information is retrieved from /proc/net/tcp and /roc/net/tcp6 files.
Example:
Checks if it is possible to make a TCP connection to the specified port.
Return values: 0 - cannot connect; 1 - can connect.
See supported platforms.
Parameters:
Comments:
net.tcp.service.perf[tcp,<ip>,<port>]
;Example:
Checks if a service is running and accepting TCP connections.
Return values: 0 - service is down; 1 - service is running.
See supported platforms.
Parameters:
Comments:
net.tcp.port[]
for checks like these.Example:
net.tcp.service[ftp,,45] #this item can be used to test the availability of FTP server on TCP port 45
Checks the performance of a TCP service.
Return values: Float (0 - service is down; seconds - the number of seconds spent waiting for a response from the service).
See supported platforms.
Parameters:
Comments:
net.tcp.service.perf[tcp,<ip>,<port>]
for checks like these.Example:
net.tcp.service.perf[ssh] #this item can be used to test the speed of initial response from the SSH server
Returns the number of TCP sockets that match parameters.
Return value: Integer.
Supported platforms: Linux.
Parameters:
Example:
net.tcp.socket.count[,80,,,established] #the number of connections to local TCP port 80 in the established state
Checks if this UDP port is in LISTEN state.
Return values: 0 - it is not in LISTEN state; 1 - it is in LISTEN state.
Supported platforms: Linux, FreeBSD, Solaris, MacOS X.
Parameter:
Example:
Checks if a service is running and responding to UDP requests.
Return values: 0 - service is down; 1 - service is running.
See supported platforms.
Parameters:
Example:
net.udp.service[ntp,,45] #this item can be used to test the availability of NTP service on UDP port 45
Checks the performance of a UDP service.
Return values: Float (0 - service is down; seconds - the number of seconds spent waiting for a response from the service).
See supported platforms.
Parameters:
Example:
Returns the number of UDP sockets that match parameters.
Return value: Integer.
Supported platforms: Linux.
Parameters:
Example:
The process CPU utilization percentage.
Return value: Float.
Supported platforms: Linux, Solaris6.
Parameters:
Comments:
zone
parameter to current (or default) in case the agent has been compiled on a Solaris without zone support, but running on a newer Solaris where zones are supported, then the agent will return NOTSUPPORTED (the agent cannot limit results to only the current zone). However, all is supported in this case.Examples:
proc.cpu.util[,root] #CPU utilization of all processes running under the "root" user
proc.cpu.util[zabbix_server,zabbix] #CPU utilization of all zabbix_server processes running under the zabbix user
The list of OS processes and their parameters. Can be used for low-level discovery.
Return value: JSON object.
Supported platforms: Linux, FreeBSD, Windows, OpenBSD, NetBSD.
Parameters:
Comments:
-1
will be returned;name
and cmdline
parameters (Linux-specific).Examples:
proc.get[zabbix_server,zabbix,,process] #list of all zabbix_server processes running under the zabbix user, returns one entry per PID
proc.get[java,,,thread] #list of all Java processes, returns one entry per thread
proc.get[,zabbix,,summary] #combined data for processes of each type running under the zabbix user, returns one entry per process name
The memory used by the process in bytes.
Return value: Integer - with mode
as max, min, sum; Float - with mode
as avg
Supported platforms: Linux, FreeBSD, Solaris, AIX, OpenBSD, NetBSD.
Parameters:
Comments:
memtype
parameter is supported only on Linux, FreeBSD, Solaris6, AIX;name
and cmdline
parameters (Linux-specific).zabbix_agentd -t proc.mem[,,,apache2]
), one extra process will be counted, as the agent will count itself.Examples:
proc.mem[,root] #the memory used by all processes running under the "root" user
proc.mem[zabbix_server,zabbix] #the memory used by all zabbix_server processes running under the zabbix user
proc.mem[,oracle,max,oracleZABBIX] #the memory used by the most memory-hungry process running under Oracle having oracleZABBIX in its command line
The number of processes.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris6, HP-UX, AIX, OpenBSD, NetBSD.
Parameters:
Comments:
zabbix_agentd -t proc.num[,,,apache2]
), one extra process will be counted, as the agent will count itself;zone
parameter to current (or default) in case the agent has been compiled on a Solaris without zone support, but running on a newer Solaris where zones are supported, then the agent will return NOTSUPPORTED (the agent cannot limit results to only the current zone). However, all is supported in this case.name
and cmdline
parameters (Linux-specific).Examples:
proc.num[,mysql] #the number of processes running under the mysql user
proc.num[apache2,www-data] #the number of apache2 processes running under the www-data user
proc.num[,oracle,sleep,oracleZABBIX] #the number of processes in sleep state running under Oracle having oracleZABBIX in its command line
Hardware sensor reading.
Return value: Float.
Supported platforms: Linux, OpenBSD.
Parameters:
Comments:
Examples:
sensor[w83781d-i2c-0-2d,temp1]
sensor[cpu0,temp0] #the temperature of one CPU
sensor["cpu[0-2]$",temp,avg] #the average temperature of the first three CPUs
The system boot time.
Return value: Integer (Unix timestamp).
Supported platforms: Linux, FreeBSD, Solaris, MacOS X, OpenBSD, NetBSD.
The list of detected CPUs/CPU cores. Used for low-level discovery.
Return value: JSON object.
See supported platforms.
The device interrupts.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris, AIX, OpenBSD, NetBSD.
The CPU load.
Return value: Float.
See supported platforms.
Parameters:
Example:
The number of CPUs.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris, HP-UX, AIX, MacOS X, OpenBSD, NetBSD.
Parameter:
The max type parameter is supported only on Linux, FreeBSD, Solaris, MacOS X.
Example:
The count of context switches.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris, AIX, OpenBSD, NetBSD.
The CPU utilization percentage.
Return value: Float.
Supported platforms: Linux, FreeBSD, Solaris, HP-UX, AIX, OpenBSD, NetBSD.
Parameters:
Comments:
Example:
The system host name.
Return value: String.
See supported platforms.
Parameters:
The value is acquired by taking nodename
from the uname() system API output.
Examples of returned values:
system.hostname → linux-w7x1
system.hostname → example.com
system.hostname[shorthost] → example
system.hostname → WIN-SERV2008-I6
system.hostname[host] → Win-Serv2008-I6LonG
system.hostname[host,lower] → win-serv2008-i6long
system.hostname[fqdn,lower] → blog.zabbix.com
The chassis information.
Return value: String.
Supported platforms: Linux.
Parameter:
Comments:
Example:
The CPU information.
Return value: String or Integer.
Supported platforms: Linux.
Parameters:
Comments:
/proc/cpuinfo
and /sys/devices/system/cpu/[cpunum]/cpufreq/cpuinfo_max_freq
;Example:
The listing of PCI or USB devices.
Return value: Text.
Supported platforms: Linux.
Parameter:
Returns the output of either the lspci or lsusb utility (executed without any parameters).
Example:
The listing of MAC addresses.
Return value: String.
Supported platforms: Linux.
Parameters:
Comments:
interface
regular expression (all lists for all interfaces);format
is specified as short, interface names and identical MAC addresses are not listed.Example:
The system time.
Return value: Integer - with type
as utc; String - with type
as local.
See supported platforms.
Parameters:
Must be used as a passive check only.
Example:
system.localtime[local] #create an item using this key and then use it to display the host time in the *Clock* dashboard widget.
Run the specified command on the host.
Return value: Text result of the command or 1 - with mode
as nowait (regardless of the command result).
See supported platforms.
Parameters:
Comments:
text
data type. An empty result is also allowed;Example:
The system statistics.
Return value: Integer or float.
Supported platforms: AIX.
Parameters:
Comments:
system.stat[cpu,app]
- supported only on AIX LPAR of type "Shared"system.stat[cpu,ec]
- supported on AIX LPAR of type "Shared" and "Dedicated" ("Dedicated" always returns 100 (percent))system.stat[cpu,lbusy]
- supported only on AIX LPAR of type "Shared"system.stat[cpu,pc]
- supported on AIX LPAR of type "Shared" and "Dedicated"system.stat[ent]
- supported on AIX LPAR of type "Shared" and "Dedicated"
The software architecture information.
Return value: String.
See supported platforms.
The info is acquired from the uname()
function.
Example:
The operating system information.
Return value: String.
Supported platforms: Linux, Windows.
Parameter:
The info is acquired from (note that not all files and options are present in all distributions):
/proc/version
(full) on Linux;/proc/version_signature
(short) on Linux;/etc/os-release
on Linux-systems supporting it or /etc/issue.net
(name);HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion
registry key on Windows.Examples:
system.sw.os[short] → Ubuntu 2.6.35-28.50-generic 2.6.35.11
system.sw.os[full] → [s|Windows 10 Enterprise 22621.1.asd64fre.ni_release.220506-1250 Build 22621.963]
Detailed information about the operating system (version, type, distribution name, minor and major version, etc).
Return value: JSON object.
Supported platforms: Linux, Windows.
The listing of installed packages.
Return value: Text.
Supported platforms: Linux.
Parameters:
Comments:
format
is specified as full, packages are grouped by package managers (each manager on a separate line beginning with its name in square brackets);format
is specified as short, packages are not grouped and are listed on a single line.Example:
A detailed listing of installed packages.
Return value: JSON object.
Supported platforms: Linux.
Parameters:
Comments:
The swap-in (from device into memory) statistics.
Return value: Integer.
Supported platforms: Linux, FreeBSD, OpenBSD.
Parameters:
Comments:
Example:
The swap-out (from memory onto device) statistics.
Return value: Integer.
Supported platforms: Linux, FreeBSD, OpenBSD.
Parameters:
Comments:
/proc/swaps
, /proc/partitions
, /proc/stat
(Linux 2.4)/proc/swaps
, /proc/diskstats
, /proc/vmstat
(Linux 2.6)Example:
The swap space size in bytes or in percentage from total.
Return value: Integer - for bytes; Float - for percentage.
Supported platforms: Linux, FreeBSD, Solaris, AIX, OpenBSD.
Parameters:
Comments:
swap -s
command includes a portion of physical memory and swap devices (unlike swap -l
).Example:
Identification of the system.
Return value: String.
See supported platforms.
Comments:
Examples:
system.uname → FreeBSD localhost 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov i386
system.uname → Windows ZABBIX-WIN 6.0.6001 Microsoft® Windows Server® 2008 Standard Service Pack 1 x86
The system uptime in seconds.
Return value: Integer.
Supported platforms: Linux, FreeBSD, Solaris, AIX, MacOS X, OpenBSD, NetBSD.
In item configuration, use s or uptime units to get readable values.
The number of users logged in.
Return value: Integer.
See supported platforms.
The who command is used on the agent side to obtain the value.
The list of block devices and their type. Used for low-level discovery.
Return value: JSON object.
Supported platforms: Linux.
The disk read statistics.
Return value: Integer - with type
in sectors, operations, bytes; Float - with type
in sps, ops, bps.
Supported platforms: Linux, FreeBSD, Solaris, AIX, OpenBSD.
Parameters:
type
in: sps, ops, bps.Comments:
mode
parameter is supported only on Linux, FreeBSD;sda
) as well as an optional /dev/ prefix (for example, /dev/sda
);Example:
The disk write statistics.
Return value: Integer - with type
in sectors, operations, bytes; Float - with type
in sps, ops, bps.
Supported platforms: Linux, FreeBSD, Solaris, AIX, OpenBSD.
Parameters:
type
in: sps, ops, bps.Comments:
mode
parameter is supported only on Linux, FreeBSD;sda
) as well as an optional /dev/ prefix (for example, /dev/sda
);Example:
The directory entry count.
Return value: Integer.
See supported platforms.
Parameters:
types incl
) to NOT count. If some entry type is in both types incl
and types excl
, directory entries of this type are NOT counted.Comments:
regex incl
and regex excl
are being applied to files and directories when calculating the entry count, but are ignored when picking subdirectories to traverse (if regex incl
is “(?i)^.+\.zip$” and max depth
is not set, then all subdirectories will be traversed, but only the files of type zip will be counted).<min_size>
and <max_size>
, it is advisable to specify <types_incl>
as "file", to avoid surprises.Examples:
vfs.dir.count[/dev] #monitors the number of devices in /dev (Linux)
vfs.dir.count["C:\Users\ADMINI~1\AppData\Local\Temp"] #monitors the number of files in a temporary directory
The directory entry list.
Return value: JSON object.
See supported platforms.
Parameters:
types incl
) to NOT list. If some entry type is in both types incl
and types excl
, directory entries of this type are NOT listed.regex excl
)Comments:
regex incl
and regex excl
are being applied to files and directories when generating the entry list, but are ignored when picking subdirectories to traverse (if regex incl
is “(?i)^.+\.zip$” and max depth
is not set, then all subdirectories will be traversed, but only the files of type zip will be counted).min size
and max size
, it is advisable to specify types incl
as "file", to avoid surprises.Examples:
vfs.dir.get[/dev] #retrieves the device list in /dev (Linux)
vfs.dir.get["C:\Users\ADMINI~1\AppData\Local\Temp"] #retrieves the file list in a temporary directory
The directory size (in bytes).
Return value: Integer.
Supported platforms: Linux. The item may work on other UNIX-like platforms.
Parameters:
du -sb dir
), disk - gets disk usage (acts as du -s -B1 dir
). Unlike the du
command, the vfs.dir.size item takes hidden files in account when calculating the directory size (acts as du -sb .[^.]* *
within dir).regex excl
)Comments:
Examples:
vfs.dir.size[/tmp,log] #calculates the size of all files in /tmp containing 'log' in their names
vfs.dir.size[/tmp,log,^.+\.old$] #calculates the size of all files in /tmp containing 'log' in their names, excluding files with names ending with '.old'
The file checksum, calculated by the UNIX cksum algorithm.
Return value: Integer - with mode
as crc32, String - with mode
as md5, sha256.
See supported platforms.
Parameters:
The file size limit depends on large file support.
Example:
Examples of returned values (crc32/md5/sha256 respectively):
675436101
9845acf68b73991eb7fd7ee0ded23c44
ae67546e4aac995e5c921042d0cf0f1f7147703aa42bfbfb65404b30f238f2dc
Retrieving the contents of a file7.
Return value: Text.
See supported platforms.
Parameters:
Comments:
Example:
Checks if the file exists.
Return value: 0 - not found; 1 - file of the specified type exists.
See supported platforms.
Parameters:
Comments:
Examples:
vfs.file.exists[/tmp/application.pid]
vfs.file.exists[/tmp/application.pid,"file,dir,sym"]
vfs.file.exists[/tmp/application_dir,dir]
Returns information about a file.
Return value: JSON object.
See supported platforms.
Parameter:
Comments:
Example:
vfs.file.get[/etc/passwd] #return a JSON with information about the /etc/passwd file (type, user, permissions, SID, uid etc)
The MD5 checksum of file.
Return value: Character string (MD5 hash of the file).
See supported platforms.
Parameter:
The file size limit depends on large file support.
Example:
Example of returned value:
Retrieves the owner of a file.
Return value: String.
See supported platforms.
Parameters:
The file size limit depends on large file support.
Examples:
vfs.file.owner[/tmp/zabbix_server.log] #return the file owner of /tmp/zabbix_server.log
vfs.file.owner[/tmp/zabbix_server.log,,id] #return the file owner ID of /tmp/zabbix_server.log
Return a 4-digit string containing the octal number with UNIX permissions.
Return value: String.
Supported platforms: Linux. The item may work on other UNIX-like platforms.
Parameters:
The file size limit depends on large file support.
Example:
Retrieve a string in the file7.
Return value: The line containing the matched string, or as specified by the optional output
parameter.
See supported platforms.
Parameters:
Comments:
output
parameter takes place on the agent.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 a string in the file7.
Return values: 0 - match not found; 1 - found.
See supported platforms.
Parameters:
Comments:
Example:
The file size (in bytes).
Return value: Integer.
See supported platforms.
Parameters:
Comments:
Example:
The file time information.
Return value: Integer (Unix timestamp).
See supported platforms.
Parameters:
The file size limit depends on large file support.
Example:
The list of mounted filesystems with their type and mount options. Used for low-level discovery.
Return value: JSON object.
Supported platforms: Linux, FreeBSD, Solaris, HP-UX, AIX, MacOS X, OpenBSD, NetBSD.
The list of mounted filesystems with their type, available disk space, inode statistics and mount options. Can be used for low-level discovery.
Return value: JSON object.
Supported platforms: Linux, FreeBSD, Solaris, HP-UX, AIX, MacOS X, OpenBSD, NetBSD.
Comments:
The number or percentage of inodes.
Return value: Integer - for number; Float - for percentage.
See supported platforms.
Parameters:
If the inode count equals zero, which can be the case for file systems with dynamic inodes (e.g. btrfs), the pfree/pused values will be reported as "100" and "0" respectively.
Example:
The disk space in bytes or in percentage from total.
Return value: Integer - for bytes; Float - for percentage.
See supported platforms.
Parameters:
Comments:
Example:
The memory size in bytes or in percentage from total.
Return value: Integer - for bytes; Float - for percentage.
See supported platforms.
Parameter:
Comments:
Example:
Get the content of a web page.
Return value: Web page source as text (including headers).
See supported platforms.
Parameters:
scheme://host:port/path
, where only host is mandatory). Allowed URL schemes: http, https4. A missing scheme will be treated as http. If a 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 4. Punycode is supported in hostnames.Comments:
host
does not exist or is unavailable;host
can be a hostname, domain name, IPv4 or IPv6 address. But for IPv6 address Zabbix agent must be compiled with IPv6 support enabled.Examples:
web.page.get[www.example.com,index.php,80]
web.page.get[https://www.example.com]
web.page.get[https://blog.example.com/?s=zabbix]
web.page.get[localhost:80]
web.page.get["[::1]/server-status"]
The loading time of a full web page (in seconds).
Return value: Float.
See supported platforms.
Parameters:
scheme://host:port/path
, where only host is mandatory). Allowed URL schemes: http, https4. A missing scheme will be treated as http. If a 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 4. Punycode is supported in hostnames.Comments:
host
does not exist or is unavailable;host
can be a hostname, domain name, IPv4 or IPv6 address. But for IPv6 address Zabbix agent must be compiled with IPv6 support enabled.Examples:
Find a string on the web page.
Return value: The matched string, or as specified by the optional output
parameter.
See supported platforms.
Parameters:
scheme://host:port/path
, where only host is mandatory). Allowed URL schemes: http, https4. A missing scheme will be treated as http. If a 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 4. Punycode is supported in hostnames.Comments:
host
does not exist or is unavailable;host
can be a hostname, domain name, IPv4 or IPv6 address. But for IPv6 address Zabbix agent must be compiled with IPv6 support enabled.output
parameter takes place on the agent.Examples:
The agent host metadata.
Return value: String.
See supported platforms.
Returns the value of HostMetadata or HostMetadataItem parameters, or empty string if none are defined.
The agent host name.
Return value: String.
See supported platforms.
Returns:
The agent availability check.
Return value: Nothing - unavailable; 1 - available.
See supported platforms.
Use the nodata() trigger function to check for host unavailability.
The variant of Zabbix agent (Zabbix agent or Zabbix agent 2).
Return value: 1 - Zabbix agent; 2 - Zabbix agent 2.
See supported platforms.
The version of Zabbix agent.
Return value: String.
See supported platforms.
Example of returned value:
Returns a set of Zabbix server or proxy internal metrics remotely.
Return value: JSON object.
See supported platforms.
Parameters:
Comments:
Returns the number of monitored items in the queue which are delayed on Zabbix server or proxy remotely.
Return value: JSON object.
See supported platforms.
Parameters:
Note that the stats request will only be accepted from the addresses listed in the 'StatsAllowedIP' server/proxy parameter on the target instance.
1A Linux-specific note. Zabbix agent must have read-only access to filesystem /proc. Kernel patches from www.grsecurity.org limit access rights of non-privileged users.
2 vfs.dev.read[]
, vfs.dev.write[]
: Zabbix agent will terminate "stale" device connections if the item values are not accessed for more than 3 hours. This may happen if a system has devices with dynamically changing paths or if a device gets manually removed. Note also that these items, if using an update interval of 3 hours or more, will always return '0'.
3 vfs.dev.read[]
, vfs.dev.write[]
: If default all is used for the first parameter then the key will return summary statistics, including all block devices like sda, sdb, and their partitions (sda1, sda2, sdb3...) and multiple devices (MD raid) based on those block devices/partitions and logical volumes (LVM) based on those block devices/partitions. In such cases returned values should be considered only as relative value (dynamic in time) but not as absolute values.
4 SSL (HTTPS) is supported only if agent is compiled with cURL support. Otherwise the item will turn unsupported.
5 The bytes
and errors
values are not supported for loopback interfaces on Solaris systems up to and including Solaris 10 6/06 as byte, error and utilization statistics are not stored and/or reported by the kernel. However, if you're monitoring a Solaris system via net-snmp, values may be returned as net-snmp carries legacy code from the cmu-snmp dated as old as 1997 that, upon failing to read byte values from the interface statistics returns the packet counter (which does exist on loopback interfaces) multiplied by an arbitrary value of 308. This makes the assumption that the average length of a packet is 308 octets, which is a very rough estimation as the MTU limit on Solaris systems for loopback interfaces is 8892 bytes. These values should not be assumed to be correct or even closely accurate. They are guestimates. The Zabbix agent does not do any guess work, but net-snmp will return a value for these fields.
6 The command line on Solaris, obtained from /proc/pid/psinfo, is limited to 80 bytes and contains the command line as it was when the process was started.
7 vfs.file.contents[]
, vfs.file.regexp[]
, vfs.file.regmatch[]
items can be used for retrieving file contents. If you want to restrict access to specific files with sensitive information, run Zabbix agent under a user that has no access permissions to viewing these files.
Note that when testing or using item keys with zabbix_agentd or zabbix_get from the command line you should consider shell syntax too.
For example, if a certain parameter of the key has to be enclosed in double quotes you have to explicitly escape double quotes, otherwise they will be trimmed by the shell as special characters and will not be passed to the Zabbix utility.
Examples:
zabbix_agentd -t 'vfs.dir.count[/var/log,,,"file,dir",,0]'
zabbix_agentd -t vfs.dir.count[/var/log,,,\"file,dir\",,0]
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 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:
In case of passive checks, to prevent that item does not get any value because the server request to the agent times out first, the following should be noted:
Timeout
value in the agent configuration file.Timeout
value in the server configuration file may need to be higher than the Timeout
value in the agent configuration file.