个人工具

“ZabbixManual1.4/ZabbixProcesses”的版本间的差异

来自Ubuntu中文

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

2007年11月24日 (六) 20:28的版本

ZABBIX 进程

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.
Include No - Use this parameter to include a file into the configuration file. Number of parameters Include is not limited.

For example: Include=/etc/zabbix/db_conn.conf

ListenIP No - Interface to listen by trapper processes. Trapper will listen to all interfaces if this parameter is not set.
ListenPort No 10051 Port number to listen by trapper processes.
LogFile No - Name of log file. If not set, syslog is used.
LogFileSize No 1 This parameter controls log 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.
NodeID No 0 Unique NodeID (0-999). Must be ‘0’ or missing for standalone ZABBIX Server.
PidFile No /tmp/zabbix_server.pid Name of file to store PID
PingerFrequency No 30 ZABBIX server ping serversonce per PingerFrequency seconds (1-3600).
SenderFrequency No 30 The parameter defines how often the daemon must try to send alerts (in seconds)
StartDiscoverers No 1 Number of discoverers to start (0-255).
StartHTTPPollers No 5 Number of HTTP pollers to start (0-255).
StartPollers No 5 Number of pollers to start (0-255).
StartPollersUnreachable No 1 Number of pollers forunreachable hosts to start (0-255).
StartTrappers No 5 Number of trappers to start (0-255)
Timeout No 5 Do not spend more than Timeout seconds on retrieving requested value (1-255) Note: Example of the configuration file can be found at misc/conf/zabbix_server.conf
TrapperTimeout No 5 Do not spend more than Timeout seconds on processing of traps (1-255)
UnavailableDelay No 60 How ofter try to connect to unavailable host
UnreachableDelay No 15 How often try to connect to unreachable host
UnreachablePeriod No 45 If a host was unreachable for more than UnreachablePeriod seconds,change host status to Unavailable

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

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
DebugLevel No 3 Debug level:

0 – none 1 – critical 2 – errors 3 – warnings 4 – debug

DisableActive No 0 Disable processing of active checks. The agent will not connect to ZABBIX server to get list of active items.
EnableRemoteCommands No 0 Enable remote commands. ZABBIX server will be able to send commands for execution by the agent.
Hostname No System’s Unique host name. The hostname. hostname is used for active checks only.
Include No - Use this parameter to include a file into the configuration file. Number of parameters Include is not limited.For example: Include=/etc/zabbix/user_parameters.conf
ListenIP No - IP address to bind agent to. Useful if the host has multiple interfaces.
ListenPort No 10050 Port number to listen.
LogFile No - Name of log file. If not set, syslog is used.
LogFileSize No 1 This parameter controls log 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.
PidFile /tmp/zabbix_agentd.pid Name of PID file.
RefreshActiveChecks No 120 The agent will refresh list of active checks once per 120 (default) seconds.
Server Yes - Comma-delimited list of IP addresses of ZABBIX servers. Connections from other IP addresses will be rejected.
ServerPort No 10051 The agent will connect to this server port for processing active checks.
StartAgents No 5 Number of agents to start.
Timeout No 3 Do not spend more that Timeout seconds on getting requested value (1-255). The agent does not kill timeouted User Parameters processes!
UserParameter No - wc -l Note: Example of the configuration file can be found at misc/conf/zabbix_agentd.conf.

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

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.

Installation

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

Usage

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
"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
 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

ZABBIX Sender (UNIX)

ZABBIX UNIX Sender is a command line utility which may be used to send performance data to ZABBIX Server for processing.

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 <zabbix server> Hostname or IP address of ZABBIX Server.
-p --port <zabbix server port> Specify port number of server trapper running on the server. Default is 10051.
-s --host <host name or IP> Specify host name or IP address of a host.
-k --key <key of metric> Specify metric name (key) we want to send.
-o --value <value> Specify value of the key.
-i --input-file <input file> Load values from input file.
-h –help Give this help.
-v –version Display version number.

In order to get this help run:

shell> zabbix_sender -h

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
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 number> Specify port number of agent running on the host, Default is 10050
 -s --host <host name or IP> Specify host name or IP address of a host. 
 -k --key <key of metric> Specify metric name (key) we want to retrieve.
 -h --help Give this help.
 -v --version Display version number.

In order to get this help run:

shell> zabbix_get -h