First, the built-in key description:
Zabbix has a lot of rich key built-in, so that when we add the Linux OS template, we have defined the key so that we can directly link the template to use.
Our side of the story lists some of the built-in keys, and then makes some simple notes: when we have built-in key to collect data, we'd better not write the custom key to collect: (I have seen an article of the CTO's write monitoring user login number, and W to monitor, not directly call the built-in key):
Second, the details can view the official documents:
Https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/zabbix_agent#supported_item_keys
Third, built-in monitoring key list:
Agent.hostname
Returns the monitored End name (string)
How to use it: The following is the same way:
[Email protected] bin]#/zabbix_get-s 192.168.10.100-k agent.hostname
Zabbix Server
Agent.ping
Detects if the monitored side is alive (1: Running other: not running)-use function nodata () to detect whether the client is running
Agent.version
Zabbix Agent Version string
Kernel.maxfiles
The system supports the largest open files integers
Kernel.maxproc
Maximum number of processes supported by the system integer
Log[file,<regexp>,<encoding>,<maxlines>,<mode>,<output>]
Monitoring log files
File-detailed path to files
RegExp-Regular
Encoding-Encoding
The Maxlines-zabbix agent sends the maximum number of rows to the server or proxy.
This parameter overrides the ' Maxlinespersecond ' in the configuration file zabbxi_agentd.conf
Mode-Optional Value: All (default), skip (skip processing old data). Mode parameter supported from version 2.0
Output-optional, export format template.
Example: Log[/var/log/syslog] log[/var/log/syslog,error] log[/home/zabbix/logs/logfile,,, 100]
Logrt[file_pattern,<regexp>,<encoding>,<maxlines>,<mode>,<output>]
Monitoring of log file with log rotation.
File_pattern-File Absolute path
Net.if.discovery
Lists network cards. Typically used for low-level Discovery.json objects
Net.if.in[if,<mode>]
Network card ingress traffic integer.
If-Network card name
Mode-Available values: bytes-bytes (default)
Packets-Number of packages
Errors-Number of errors
Dropped-Number of lost packets
Example Keys:net.if.in[eth0,errors] Net.if.in[eth0]
Net.if.out[if,<mode>]
Network card egress flow (parameters see net.if.in)
Net.if.total[if,<mode>]
The sum of the card's in/out flow (parameters see net.if.in)
Net.tcp.listen[port]
Detects if the port is turned on 0– (not listen) 1–in listen Stateport
Example: net.tcp.listen[80]
Net.tcp.port[<ip>,port]
Whether you can connect to the specified TCP port 0–cannot connect 1–can Connect
IP-IP address (default is 127.0.0.1)
Port-Ports
Example: net.tcp.port[,80] Detecting whether the Web server port is running
Net.tcp.service[service,<ip>,<port>]
Detects if the service is on and the port is available 0 – service hangs in the service run
Service-as follows: SSH, NTP, LDAP, SMTP, FTP, HTTP, pop, nntp,imap, TCP, HTTPS, Telnet
Ip-ip address (default 127.0.0.1)
Port-Ports (the default is the standard port number)
Example KEY:NET.TCP.SERVICE[FTP,,45]
Net.tcp.service.perf[service,<ip>,<port>]
Detecting server Performance 0– service hangs up; seconds– link to server port consumption time
Service-as follows: SSH, NTP, LDAP, SMTP, FTP, HTTP, pop, nntp,imap, TCP, HTTPS, Telnet
Ip-ip address (default 127.0.0.1)
Port-Ports (the default is the standard port number)
Example KEY:NET.TCP.SERVICE.PERF[SSH]
Proc.mem[<name>,<user>,<mode>,<cmdline>]
The amount of memory memory consumed by the user process (in units of bytes).
Name-process name (default value "All Processes")
User-username (default "all users")
Mode-selectable values: AVG, max, min, sum (default)
CmdLine-command-line filtering (regular expression)
Example keys:proc.mem[,root]–root how much memory is consumed by the process
Proc.mem[zabbix_server,zabbix]–zabbix How much memory is used by the user running Zabbix_server
Proc.mem[,oracle,max,oraclezabbix]
Proc.num[<name>,<user>,<state>,<cmdline>]
Number of processes in certain States of a user process quantity
Name-process name (default "All Processes")
User-username (default "all users")
State-Available values: All (default), Run,sleep, Zomb
CmdLine-command-line filtering (regular expression)
Example Keys:proc.num[,mysql]–mysql number of processes run by user
Proc.num[apache2,www-data]–www-data How many apache2 processes are running
Proc.num[,oracle,sleep,oraclezabbix]
Note: Windows system only supports name and user two parameters
System.boottime
The system-initiated timestamp integer. UNIX timestamp
System.cpu.intr
Device Interrupt Integer
System.cpu.load[<cpu>,<mode>]
CPU Load Floating point number
CPU-Available values: All (Default), PERCPU (load of all online CPUs)
Mode-Available values: AVG1 (1-minute default), Avg5 (5-minute average), Avg15 (15-minute average)
Example KEY:SYSTEM.CPU.LOAD[,AVG5]
System.cpu.num[<type>]
Number of CPUs processor type-available values: Online (default), max example: System.cpu.num
System.cpu.switches
Context Exchange swap times old naming: System[switches]
System.cpu.util[<cpu>,<type>,<mode>]
Percent CPU utilization
CPU-CPU Number (default is all CPUs)
Type-AVAILABLE values: Idle, nice, user (default), System (Windows system default), Iowait, interrupt, Softirq,steal
Mode-Available values: AVG1 (average of one minute, default), Avg5 (5 min average, avg15 (15 min average)
Example KEY:SYSTEM.CPU.UTIL[0,USER,AVG5]
System.hostname[<type>]
Returns the host name string
Type (for Windows systems only) – Available values: NetBIOS (default) or host
System.hw.cpu[<cpu>,<info>]
Returns the CPU information character/number
Number of CPU-CPU or all (default)
Info-full (default), Curfreq, maxfreq, model, or vendor
For example: System.hw.cpu[0,vendor] authenticamd from/proc/cpuinfo,/sys/devices/system/cpu/[cpunum]/cpufreq/cpuinfo_max_ Freq get information. If the number of CPUs and Curfreq or maxfreq are specified, the value (HZ) will be returned.
System.hw.devices[<type>]
List PCI or USB text values
TYPE-PCI (default) or USB
Example: System.hw.devices[pci] 00:00.0 host bridge:advanced Micro devices [AMD] RS780 host Bridge [...] return LSPCI or LSUSB (without parameters)
System.hw.macaddr[<interface>,<format>]
List MAC address strings
Interface-all (default) or regular expression
Format-full (default), short
Example: system.hw.macaddr["eth0$", full] [eth0] 00:11:22:33:44:55 list specified interface MAC address if format is specified as Short,mac address, it will be ignored
System.localtime[<type>]
System time. Numbers or strings
System.run[command,<mode>]
Run the command text on the established host
Command-commands
Mode-wait (default, execution timeout), nowait (do not wait) maximum usable return 512KB data, including blank data. Command output data must be text
For example: system.run["ls-l/"]– the files and directories listed/.
Note: To enable this method, the agent configuration file must be configured with the Enableremotecommands=1 option
System.sw.arch
Returns the software information string
Example: System.sw.arch
System.sw.os[<info>]
Returns the System information string
Info-full (default), short, name
Example: System.sw.os[short] Ubuntu 2.6.35-28.50-generic 2.6.35.11
The information is from the following files:
/proc/version [Short]
/proc/version_signature [Name]
/etc/issue.net
System.sw.packages[<package>,<manager>,<format>]
Installed software list text values
Package-all (default) or regular expression
Manager-all (default) or a package Manager
Format-full (default), short
Example: System.sw.packages[http]
System.swap.in[<device>,<type>]
Swap partition in (disk swap to memory) digits
Device-swap partition device (default all)
Type-Optional Value: Count (number of swapins), sectors (sectors swapped in), pages (pages swapped in).
Example Key:system.swap.in[,pages]
Data acquisition from: Linux 2.4:/proc/swaps,/proc/partitions,/proc/stat
Linux 2.6:/proc/swaps,/proc/diskstats,/proc/vmstat
System.swap.out[<device>,<type>]
Swap out (f memory to disk). Digital
Device-swap device (default all)
Type-count (number of swapouts), sectors (sectors swapped out), pages (pages swapped out). Shown
Example Key:system.swap.out[,pages]
Data acquisition from: Linux 2.4:/proc/swaps,/proc/partitions,/proc/stat
Linux 2.6:/proc/swaps,/proc/diskstats,/proc/vmstat
System.swap.size[<device>,<type>]
Swap partition size bytes or percentages
Device-swap partition (default all)
Type-free (free swap space, default), Pfree (free swap space, in percent), pused (used swap space, in percent), total (t Otal swap space), used (used swap space)
Example system.swap.size[,pfree]– Idle swap percentage
System.uname
Returns the host trust information. String
System.uptime
System run time (seconds) How many seconds to use S/uptime to get
System.users.num
Number of logged-in users how many user agents use the WHO command to obtain
Vfs.dev.read[<device>,<type>,<mode>]
Disk read status integer, floating point number (if type is as follows)
Device-Disk device (default "all")
Type-selectable values: sectors, Operations, Bytes, SPS, OPS, bps (must be specified, different operating systems differ). SPS, OPS, bps stand for:sectors, operations, bytes per second, respectively
Mode-selectable values: AVG1, Avg5, Avg15.
Note: The third parameter is supported only when the type is SPS, OPS, bps.
Type parameters for different operating systems: freebsd–bps Linux–sps openbsd–operations solaris–bytes
Example Key:vfs.dev.read[,operations]
Vfs.dev.write[<device>,<type>,<mode>]
Disk Write status Integer,
Device-disk device (default all)
Type-sectors, operations, Bytes, SPS, OPS, bps
Mode-one of AVG1 (default), Avg5, Avg15.
Example:vfs.dev.write[,operations] Old Naming:io
Vfs.file.cksum[file]
Calculate file checksum UNIX cksum.
File-full path to files
Vfs.file.contents[file,<encoding>]
Gets the text content if it is empty, only LF/CR characters is returned.
File-full path to files
For example: vfs.file.contents[/etc/passwd] file can not exceed 64KB.
Vfs.file.exists[file]
Detects if a file exists 1 – Presence 0– does not exist
File-full path to files
Vfs.file.md5sum[file]
File MD5 checksum file MD5 hash value
FILE-Full path
Vfs.file.regexp[file,regexp,<encoding>,<start line>,<end Line>,<output>]
The search string in the file contains a string of rows, or an empty
File-full path to files
REGEXP-GNU Regular Expressions
Encoding-Encoding
Start line-from which line, the default first row
End line-from which line ends, default last row
such as: 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]
Vfs.file.regmatch[file,regexp,<encoding>,<start line>,<end Line>]
Search string in file 0– not found
File-full path to files
REGEXP-GNU Regular Expressions
Encoding-Encoding
Start line-which row starts, default first line
End line-which row ends, default last line
Example: Vfs.file.regmatch[/var/log/app.log,error]
Vfs.file.size[file]
File size byte Fzabbix must have permission to read this file
Vfs.file.time[file,<mode>]
File time Information Unix timestamp.
Mode-modify (default, modification time), access– last access time, change– last change time
Example: vfs.file.time[/etc/passwd,modify] Note: File size is limited
Vfs.fs.discovery
Lists mounted file systems for LLD. JSON object
Vfs.fs.inode[fs,<mode>]
Inodes Number of numbers
FS-File system
Mode-total (default), free, used, pfree (idle percentage), pused (percent used)
Example: Vfs.fs.inode[/,pfree]
Vfs.fs.size[fs,<mode>]
Disk space, returning the usage bytes of the local file system
FS-File system
Mode-total (default), free, used, pfree (idle percentage), pused (percent used).
Example: Vfs.fs.size[/tmp,free]
Vm.memory.size[<mode>]
Memory Size bytes or percentages
Mode-total (default), active, anon, buffers, cached, exec, file, free, inactive, pinned, GKFX, Wired, used, pused, availabl E
Monitoring item vm.memory.size[] allows three types of parameters:
First Class: Contains total-overall memory
Class II: System-specified memory type: Active, anon, buffers, cached, exec, file, free, inactive,pinned, GKFX, Wired. Class III: User level, how much memory is used altogether, and how much memory is available: Used, pused, available,pavailable.
Web.page.get[host,<path>,<port>]
Get Web page content page source code
Host-hostname/domain name
Path-file address, default/
Port-The default 80 returns an empty string indicating a failure. Example: web.page.get[
Web.page.perf[host,<path>,<port>]
Gets the full load of the page consumed by the length of the second, returning 0 indicates a failure
Host-hostname/domain name
Path-html address, default is/
Port-Ports, default 80
[Email protected] bin]#/zabbix_get-s 192.168.10.100-k web.page.perf[www.baidu.com]
Web.page.regexp[host,<path>,<port>,<regexp>,<length>,<output>]
A null character (mismatch) is returned if the search string fails in the Web page.
Host-hostname
path-html file path (default/)
Port-Ports (default 80)
REGEXP-GNU Regular Expressions
Length-The maximum number of strings returned
Output-The format template can be selected.
This article originates from: http://www.roncoo.com/article/detail/125832
Application based on Zabbix built-in key