ZabbixManual1.4/ZabbixProcesses:修订间差异
第25行: | 第25行: | ||
The configuration file contains parameters for zabbix_server. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters: | The configuration file contains parameters for zabbix_server. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters: | ||
{|border='1' | {|border='1' border-color='black' margin='1px' padding='0px' | ||
|Parameter||Mandatory||Default value||Description | |Parameter||Mandatory||Default value||Description | ||
|- | |- |
2007年10月10日 (三) 22:41的版本
ZABBIX Processes
ZABBIX Server
ZABBIX Server is a central process of ZABBIX software. ZABBIX Server can be started by executing:
shell> cd bin shell> ./zabbix_server
ZABBIX Server runs as a daemon process.
ZABBIX Server accepts the following command line parameters:
-c --config <file> specify configuration file, default is /etc/zabbix/zabbix_server.conf -h --help give this help -v --version display version number
In order to get this help run:
shell> zabbix_server -h
Example of command line parameters:
shell> zabbix_server –c /usr/local/etc/zabbix_server.conf shell> zabbix_server --help shell> zabbix_server -v
The configuration file contains parameters for zabbix_server. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters:
Parameter | Mandatory | Default value | Description |
AlertScriptsPath | No | /home/zabbix/bin | Location of scripts for user-defined media types. |
DBHost | Yes | - | Database name. Usually ‘zabbix’. |
DBName | Yes | - | Database name. Usually ‘zabbix’. |
DBSocket | No | - | DB socket name. Used for non-TCP connection to MySQL database. Example: /tmp/mysql.sock |
DBPassword | No | NULL | Database password. If password is not used, then this parameter must be commented. |
DBUser | No | NULL | User name for connecting to the database. |
DebugLevel | No | 3 | Debug level, one of
0 – none 1 – critical 2 – errors 3 – warnings 4 – debug |
DisableHousekeeping | No | 0 | If set to 1, housekeeper will be disabled. |
ExternalScripts | No | /etc/zabbix/exter | Location of scripts for external checks. |
FpingLocation | No | /usr/sbin/fping | Location of ICMP pinger. It must have setuid flag set. |
HousekkepingFrequency | No | 1 | The parameter defines how often the daemon must perform housekeeping procedure (in hours). If PostgreSQL is used set the value to 24 as it will perform command VACUUM. |
No - Use this parameter to include Include a file into the configuration file. Number of parameters Include is not limited. For example: Include=/etc/zabbix/db_conn. conf No - Interface to listen by trapper ListenIP
Copyright 2006 ZABBIX SIA Page 55 of 181
ZABBIX Manual v1.4 Parameter Mandatory Default value Description processes. Trapper will listen to all interfaces if this parameter is not set. No 10051 Port number to listen by ListenPort trapper processes. No - Name of log file. If not set, LogFile syslog is used. No 1 This parameter controls log LogFileSize rotation setting for LogFile. By default, ZABBIX automatically roatates log file when it reaches 1MB. This parameter is in MB. If set to 0, no log rotation will be performed. No 0 Unique NodeID (0-999). Must NodeID be ‘0’ or missing for standalone ZABBIX Server. No /tmp/zabbix_serv Name of file to store PID PidFile er.pid No 30 ZABBIX server ping servers PingerFrequenc once per PingerFrequency y seconds (1-3600). No 30 The parameter defines how SenderFrequenc often the daemon must try to y send alerts (in seconds) No 1 Number of discoverers to StartDiscoverers start (0-255). No 5 Number of HTTP pollers to StartHTTPPoller start (0-255). s No 5 Number of pollers to start (0- StartPollers 255). No 1 Number of pollers for StartPollersUnre unreachable hosts to start (0- achable 255). No 5 Number of trappers to start StartTrappers (0-255) No 5 Do not spend more than Timeout Timeout seconds on retrieving requested value (1- 255) Note: Example of the configuration file can be
Copyright 2006 ZABBIX SIA Page 56 of 181
ZABBIX Manual v1.4 Parameter Mandatory Default value Description found at misc/conf/zabbix_server.conf No 5 Do not spend more than TrapperTimeout Timeout seconds on processing of traps (1-255) No 60 How ofter try to connect to UnavailableDela unavailable host y No 15 How often try to connect to UnreachableDel unreachable host ay No 45 If a host was unreachable for UnreachablePeri more than od UnreachablePeriod seconds, change host status to Unavailable
4.2. ZABBIX Agent (UNIX, standalone daemon)
ZABBIX UNIX Agent runs on a host being monitored. The agent provides host's performance and availability information for ZABBIX Server. ZABBIX Agent processes items of type ‘ZABBIX Agent’ or ‘ZABBIX Agent (active)’. ZABBIX Agent can be started by executing: shell> cd bin shell> ./zabbix_agentd ZABBIX Agent runs as a daemon process. ZABBIX Agent accepts the following command line parameters: -c --config <file> specify configuration file, default is /etc/zabbix/zabbix_agentd.conf -h --help give this help -v --version display version number -p --print print supported metrics and exit -t --test <metric> test specified metric and exit
Copyright 2006 ZABBIX SIA Page 57 of 181
ZABBIX Manual v1.4 In order to get this help run: shell> zabbix_agentd –h Example of command line parameters: shell> zabbix_agentd –c /usr/local/etc/zabbix_agentd.conf shell> zabbix_agentd –help shell> zabbix_agentd –print shell> zabbix_agentd –t “system.cpu.load[all,avg1]” The configuration file contains configuration parameters for zabbix_agentd. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters: Parameter Mandatory Default value Description No 3 Debug level: DebugLevel 0 – none 1 – critical 2 – errors 3 – warnings 4 – debug No 0 Disable processing of active DisableActive checks. The agent will not connect to ZABBIX server to get list of active items. No 0 Enable remote commands. EnableRemoteC ZABBIX server will be able to ommands send commands for execution by the agent. No System’s Unique host name. The Hostname hostname. hostname is used for active checks only. No - Use this parameter to include Include a file into the configuration file. Number of parameters Include is not limited. For example:
Copyright 2006 ZABBIX SIA Page 58 of 181
ZABBIX Manual v1.4 Parameter Mandatory Default value Description Include=/etc/zabbix/user_par ameters.conf No - IP address to bind agent to. ListenIP Useful if the host has multiple interfaces. No 10050 Port number to listen. ListenPort No - Name of log file. If not set, LogFile syslog is used. No 1 This parameter controls log LogFileSize rotation setting for LogFile. By default, ZABBIX automatically roatates log file when it reaches 1MB. This parameter is in MB. If set to 0, no log rotation will be performed. No /tmp/zabbix_age Name of PID file. PidFile ntd.pid No 120 The agent will refresh list of RefreshActiveC active checks once per 120 hecks (default) seconds. Yes - Comma-delimited list of IP Server addresses of ZABBIX servers. Connections from other IP addresses will be rejected. No 10051 The agent will connect to this ServerPort server port for processing active checks. No 5 Number of agents to start. StartAgents No 3 Do not spend more that Timeout Timeout seconds on getting requested value (1-255). The agent does not kill timeouted User Parameters processes! No - User-defined parameter to UserParameter monitor. There can be several user-defined parameters. Value has form , Example:UserParameter=use rs,who|wc -l Note: Example of the configuration file can be found at
Copyright 2006 ZABBIX SIA Page 59 of 181
ZABBIX Manual v1.4 Parameter Mandatory Default value Description misc/conf/zabbix_agentd.con f.
4.3. ZABBIX Agent (UNIX, Inetd version)
The file contains configuration parameters for zabbix_agent. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters: Parameter Mandatory Default value Description Yes - Comma-delimited list of IP Server addresses of ZABBIX servers. Connections from other IP addresses will be rejected. No 3 Do not spend more that Timeout Timeout seconds on getting requested value (1-255). The agent does not kill timeouted User Parameters processes! No - User-defined parameter to UserParameter monitor. There can be several user-defined parameters. Example:UserParameter=use rs,who|wc -l Example of the configuration file can be found at Note: misc/conf/zabbix_agent.conf
4.4. ZABBIX Agent (Windows)
ZabbixW32 is ZABBIX agent for Win32 systems. It will work on Windows NT 4.0, Windows 2000, Windows XP, and Windows Vista. 4.4.1. Installation
Copyright 2006 ZABBIX SIA Page 60 of 181
ZABBIX Manual v1.4 Installation is very simple and includes 3 steps: Create configuration file. Step 1 Create configuration file c:/zabbix_agentd.conf (it has the same syntax as UNIX agent). Install agent as a Windows service. Step 2 ZabbixW32.exe install If you wish to use configuration file other that c:\zabbix_agentd.conf, you should use the following command for service installation: ZabbixW32.exe --config <your_configuration_file> install Full path to configuration file should be specified. Run agent. Step 2 Now you can use Control Panel to start agent's service or run: ZabbixW32.exe start Windows NT 4.0 note. ZabbixW32 uses PDH (Performance Data Helper) Note: API to gather various system information, so PDH.DLL is needed. This DLL is not supplied with Windows NT 4.0, so you need to download and install it by yourself. Microsoft Knowledge Base article number 284996 describes this in detail and contains a download link. You can find this article at http://support.microsoft.com/default.aspx?scid=kb;en-us;284996 4.4.2. Usage Command line syntax:
Copyright 2006 ZABBIX SIA Page 61 of 181
ZABBIX Manual v1.4 zabbixw32 [options] [command] ZABBIX Windows Agent accepts the following command line parameters: check-config Check configuration file and exit. help Display help information. install Install ZABBIX Win32 Agent as a service. install-events Install ZABBIX Win32 Agent as event source for Event Log. This is done automatically when service is being installed. remove Remove previously installed ZABBIX Win32 Agent service. remove-events Remove ZABBIX Win32 Agent event source. This is done automatically when service is being removed. standalone Run in standalone mode. start Start ZABBIX Agent service. stop Stop ZABBIX Agent service. version Display version information. And possible options are: --config <file> Specify alternate configuration file (default is c:\zabbix_agentd.conf). The file contains configuration parameters for ZabbixW32. Supported parameters: Parameter Mandatory Default value Description No - Sets the alias for parameter. Alias It can be useful to substitute long and complex parameter name with a smaller and simpler one. For example, if you wish to retrieve paging file usage in percents from the server, you may use parameter
Copyright 2006 ZABBIX SIA Page 62 of 181
ZABBIX Manual v1.4 Parameter Mandatory Default value Description "perf_counter[\Paging File(_Total)\% Usage]", or you may define an alias by adding the following line to configuration file: Alias = pg_usage:perf_counter[\Pagi ng File(_Total)\% Usage] After that you can use parameter name "pg_usage" to retrieve the same information. You can specify as many "Alias" records as you wish. Please note that aliases cannot be used for parameters defined in "PerfCounter" configuration file records. No - The parameter has no effect. DebugLevel No - Use this parameter to include Include a file into the configuration file. Number of parameters Include is not limited. For example: Include=c:\user_parameters. conf No 10050 Port number to listen. ListenPort No - Name of log file. If not set, LogFile syslog is used. No - Controls logging of LogUnresolvedS unresolved symbols during ymbols agent startup. Values can be strings ‘yes’ or ‘no’ (without quotes). No 100 Sets maximum acceptable MaxCollectorPro processing time of one data cessingTime sample by collector thread (in milliseconds). If processing time will exceed specified value, warning message will be written to the log file. No - The parameter has no effect. NoTimeWait No - <parameter_name>,"<perf_c PerfCounter ounter_path>",<period> Defines new parameter <parameter_name> which is
Copyright 2006 ZABBIX SIA Page 63 of 181
ZABBIX Manual v1.4 Parameter Mandatory Default value Description an average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds). For example, if you wish to receive average number of processor interrupts per second for last minute, you can define new parameter "interrupts" as following: PerfCounter = interrupts,"\Processor(0)\Inter rupts/sec",60 Please note double quotes around performance counter path. Samples for calculating average value will be taken every second. No - The parameter has no effect. PidFile Yes - Comma-delimited list of IP Server addresses of ZABBIX servers. Connections from other IP addresses will be rejected. No - The parameter has no effect. StartAgents No - User-defined parameter to UserParameter monitor. There can be several user-defined parameters. Value has form <key>,<shell command>. Do not use spaces around pipe ('|') characters! Example:UserParameter=test ,echo 1
4.5. ZABBIX Sender (UNIX)
ZABBIX UNIX Sender is a command line utility which may be used to send performance data to ZABBIX Server for processing.
Copyright 2006 ZABBIX SIA Page 64 of 181
ZABBIX Manual v1.4 The utility is usually used in long running user scripts for periodical sending of availability and performance data. ZABBIX Sender can be started by executing: shell> cd bin shell> ./zabbix_sender –z zabbix –p 10051 –h LinuxDB3 –k db.connections –o 43 ZABBIX Sender accepts the following command line parameters: -z –zabbix-server Hostname or IP address of ZABBIX Server. <zabbix server> -p --port <zabbix Specify port number of server trapper server port> running on the server. Default is 10051. -s –host <host Specify host name or IP address of a host. name or IP> -k –key <key of Specify metric name (key) we want to send. metric> -o –value <value> Specify value of the key. -i –input-file Load values from input file. <input file> -h –help Give this help. -v –version Display version number. In order to get this help run: shell> zabbix_sender -h
4.6. ZABBIX Get (UNIX)
ZABBIX UNIX Get is a process which communicates with ZABBIX Agent and retrieves required information. The utility is usually used for troubleshooting of ZABBIX Agents. ZABBIX Get can be started by executing: shell> cd bin
Copyright 2006 ZABBIX SIA Page 65 of 181
ZABBIX Manual v1.4
shell> ./zabbix_get -s127.0.0.1 -p10050 -k"system.cpu.load[all,avg1]" ZABBIX Get accepts the following command line parameters:
-p --port <port Specify port number of agent running on the number> host. Default is 10050. -s –host <host Specify host name or IP address of a host. name or IP> -k –key <key of Specify metric name (key) we want to metric> retrieve. -h --help Give this help. -v --version Display version number.
In order to get this help run: shell> zabbix_get -h