file_pattern - 文件绝对路径 regexp - regular expression describing the required content pattern encoding - code page identifiermaxlines - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of 'MaxLinesPerSecond' inzabbix_agentd.conf mode - possible values: all (default), skip (skip processing of older data). The mode parameter is supported from version 2.0. output - an optional output formatting template. The \0 escape sequence is replaced with the matched text 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). 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. The output parameter is supported from version 2.2.

The item must be configured as an active check. Log rotation is based on the last modification time of files. 示例: 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”.

示例keys: proc.mem[,root] – root的进程消耗了多少内存 proc.mem[zabbix_server,zabbix] – zabbix用户运行的zabbix_server使用了多少内存 proc.mem[,oracle,max,oracleZABBIX] – memory used by the most memory-hungry process running under oracle having oracleZABBIX in its command line

示例keys: proc.num[,mysql] – MySQL用户运行的进程数量 proc.num[apache2,www-data] – www-data运行了多少个apache2进程proc.num[,oracle,sleep,oracleZABBIX] – number of processes in sleep state running under oracle having oracleZABBIX in its command line备注：Windows系统只支持name和user两个参数

示例值: FreeBSD localhost 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov i386 Since Zabbix 2.2.0, the value for this item is obtained by using the uname() system call, whereas previously it was obtained by invoking “uname -a” on Unix systems. Hence, the value of this item might differ from the output of “uname -a” and does not include additional information that “uname -a” prints based on other sources.

不同操作系统的TYPE参数： FreeBSD – bps Linux – sps OpenBSD – operations Solaris – bytes 示例key: vfs.dev.read[,operations] 老命名方式: io[*] Usage of the type parameters ops, bps and sps on supported platforms used to be limited to 8 devices (7 individual devices and one “all”). Starting with Zabbix 2.0.1 this limit has been increased to 1024 (1023 individual devices and one for “all”). Zabbix 1.8.6开始支持LVM Until Zabbix 1.8.6, only relative device names may be used (for example, sda), since 1.8.6 an optional /dev/ prefix may be used (for example, /dev/sda)

vfs.dev.write[<device>,<type>,<mode>]

磁盘写入状态

整数（如下类型）: sectors,operations,bytes浮点型（如下类型）: sps, ops,bps

device - 磁盘设备 (默认值 “all”1) type - sectors, operations, bytes, sps, ops, bps (must specify exactly which parameter to use, since defaults are different under various OSes). sps, ops, bps means: sectors, operations, bytes per second respectively mode - one of avg1 (default),avg5 (average within 5 minutes), avg15. Note: The third parameter is supported only if the type is in: sps, ops, bps.

Default values of 'type' parameter for different OSes: FreeBSD – bps Linux – sps OpenBSD – operations Solaris – bytes Example: vfs.dev.write[,operations] Old naming: io[*] The type parameters ops, bps and sps on supported platforms used to be limited to 8 devices (7 individual devices and one “all”). Starting with Zabbix 2.0.1 this limit has been increased to 1024 (1023 individual devices and one for “all”). Supports LVM since Zabbix 1.8.6. Until Zabbix 1.8.6, only relative device names may be used (for example, sda), since 1.8.6 optional /dev/ prefix may be used (for example, /dev/sda)

vfs.file.cksum[file]

计算文件校验

File checksum, calculated by algorithm used by UNIX cksum.

file - 文件完整路径

例如，返回值: 1938292000 例如: vfs.file.cksum[/etc/passwd] 老命名规范: cksum

vfs.file.contents[file,<encoding>]

获取文本内容

Contents of a file or empty string if it is empty or it contains only LF/CR characters.

The matched string, or as specified by the optional<output>parameter. An empty string if no match was found.

host - 主机名 path - html文件路径 (默认值 /) port - 端口 (默认80)regexp - GNU正则表达式length - 返回的最大的字符串数量output - 输出格式模板可选项. The \0 escape sequence is replaced with the matched text 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). If <output> is left empty – the whole line containing the matched text is returned. The output parameter is supported from version 2.2.