ZabbixManual1.4/ZabbixProcesses:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Firehare留言 | 贡献
Firehare留言 | 贡献
无编辑摘要
 
(未显示同一用户的15个中间版本)
第1行: 第1行:
{{Copyedit translation|from=[[ZabbixManual1.4/ZabbixProcesses]] }}
{{Translator|FireHare}} {{Languages|ZabbixManual1.4/ZabbixProcesses}}
== ZABBIX Processes ==
== ZABBIX Processes ==
=== ZABBIX Server ===
 
=== ZABBIX Server<br> ===
 
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&gt; cd bin
  shell> ./zabbix_server
  shell&gt; ./zabbix_server


ZABBIX Server runs as a daemon process.
ZABBIX Server runs as a daemon process.
第10行: 第16行:
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"
|-
| 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.
|-
|-
|AlertScriptsPath||No||/home/zabbix/bin||Location of scripts for user-defined media types.
| 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
 
|-
|-
|DBHost||Yes|| - ||Database name. Usually ‘zabbix’.
| ListenIP
| No
| -
| Interface to listen by trapper processes. Trapper will listen to all interfaces if this parameter is not set.
|-
|-
|DBName||Yes|| -  ||Database name. Usually ‘zabbix’.
| ListenPort
| No
| 10051
| Port number to listen by trapper processes.
|-
|-
|DBSocket|| No || - ||DB socket name. Used for non-TCP connection to MySQL database. Example: /tmp/mysql.sock
| LogFile
| No
| -
| Name of log file. If not set, syslog is used.
|-
|-
|DBPassword||No||NULL||Database password. If password is not used, then this parameter must be commented.
| 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.
|-
|-
|DBUser||No||NULL||User name for connecting to  the database.
| NodeID
| No
| 0
| Unique NodeID (0-999). Must be ‘0’ or missing for standalone ZABBIX Server.
|-
|-
|DebugLevel
| PidFile
|No
| No
|3
| /tmp/zabbix_server.pid
|Debug level, one of
| Name of file to store PID
0 – none
|-
1 – critical
| PingerFrequency
2 – errors
| No
3 – warnings
| 30
4 – debug
| 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
|-
|-
|DisableHousekeeping||No||0||If set to 1, housekeeper will be disabled.
| UnreachableDelay
| No
| 15
| How often try to connect to unreachable host
|-
|-
|ExternalScripts||No|| /etc/zabbix/exter||Location of scripts for external checks.
| 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&gt; cd bin
shell&gt; ./zabbix_agentd
 
ZABBIX Agent runs as a daemon process.
 
ZABBIX Agent accepts the following command line parameters:
 
-c --config &lt;file&gt; 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 &lt;metric&gt; test specified metric and exit
 
In order to get this help run:
 
shell&gt; zabbix_agentd –h
 
Example of command line parameters:
 
shell&gt; zabbix_agentd –c /usr/local/etc/zabbix_agentd.conf
shell&gt; zabbix_agentd –help
shell&gt; zabbix_agentd –print
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:
 
{| width="100%" cellspacing="0" cellpadding="1" border="1"
|-
|-
|FpingLocation||No||/usr/sbin/fping||Location of ICMP pinger. It must have setuid flag set.
| Parameter
| Mandatory
| Default value
| Description
|-
|-
|HousekkepingFrequency
| DebugLevel
|No
| No
|1
| 3
|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.
| Debug level:
0 – none 1 – critical 2 – errors 3 – warnings 4 – debug
 
|-
|-
|Include
| DisableActive
|No
| No
| -
| 0
|Use this parameter to include a file into the configuration file. Number of parameters Include is not limited.
| Disable processing of active checks. The agent will not connect to ZABBIX server to get list of active items.
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.
| EnableRemoteCommands
| No
| 0
| Enable remote commands. ZABBIX server will be able to send commands for execution by the agent.
|-
|-
|ListenPort||No||10051||Port number to listen by  trapper processes.
| Hostname
| No
| System’s Unique host name.
| The hostname. hostname is used for active checks only.
|-
|-
| LogFile||No|| - ||Name of log file. If not set, syslog is used.
| 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
|-
|-
|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.
| ListenIP
| No
| -
| IP address to bind agent to. Useful if the host has multiple interfaces.
|-
|-
|NodeID||No||0||Unique NodeID (0-999). Must be ‘0’ or missing for standalone ZABBIX Server.
| ListenPort
| No
| 10050
| Port number to listen.
|-
|-
|PidFile||No||/tmp/zabbix_server.pid||Name of file to store PID
| LogFile
| No
| -
| Name of log file. If not set, syslog is used.
|-
|-
|PingerFrequency||No||30||ZABBIX server ping serversonce per PingerFrequency seconds (1-3600).
| 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.
|-
|-
|SenderFrequency||No||30||The parameter defines how often the daemon must try to send alerts (in seconds)
| PidFile
| /tmp/zabbix_agentd.pid
| Name of PID file.
|-
|-
|StartDiscoverers||No||1||Number of discoverers to start (0-255).
| RefreshActiveChecks
| No
| 120
| The agent will refresh list of active checks once per 120 (default) seconds.
|-
|-
|StartHTTPPollers||No||5||Number of HTTP pollers to start (0-255).
| Server
| Yes
| -
| Comma-delimited list of IP addresses of ZABBIX servers. Connections from other IP addresses will be rejected.
|-
|-
|StartPollers||No||5||Number of pollers to start (0-255).
| ServerPort
| No
| 10051
| The agent will connect to this server port for processing active checks.
|-
|-
|StartPollersUnreachable||No||1||Number of pollers forunreachable hosts to start (0-255).
| StartAgents
| No
| 5
| Number of agents to start.
|-
|-
|StartTrappers||No||5||Number of trappers to start (0-255)
| 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!
|-
|-
|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
| 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:
 
{| width="100%" cellspacing="1" cellpadding="1" border="1"
|-
|-
|TrapperTimeout||No||5||Do not spend more than Timeout seconds on processing of traps (1-255)
| Parameter
| Mandatory
| Default value
| Description
|-
|-
|UnavailableDelay||No||60||How ofter try to connect to unavailable host
| Server
| Yes
| -
| Comma-delimited list of IP addresses of ZABBIX servers. Connections from other IP addresses will be rejected.
|-
|-
|UnreachableDelay||No||15||How often try to connect to unreachable host
| 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!
|-
|-
|UnreachablePeriod||No||45||If a host was unreachable for more than UnreachablePeriod seconds,change host status to Unavailable
| UserParameter
| No
| -
| User-defined parameter to monitor. There can be several user-defined parameters.
Example:UserParameter=use rs,who&#124;wc -l
 
|}
|}
4.2.          ZABBIX Agent (UNIX, standalone daemon)
 
              ZABBIX UNIX Agent runs on a host being monitored. The agent provides host's
Note: Example of the configuration file can be found at misc/conf/zabbix_agent.conf
              performance and availability information for ZABBIX Server.
 
              ZABBIX Agent processes items of type ‘ZABBIX Agent’ or ‘ZABBIX Agent
=== ZABBIX Agent (Windows) ===
              (active)’.
 
              ZABBIX Agent can be started by executing:
ZabbixW32 is ZABBIX agent for Win32 systems. It will work on Windows NT 4.0, Windows 2000, Windows XP, and Windows Vista.
              shell> cd bin
 
              shell> ./zabbix_agentd
==== Installation ====
              ZABBIX Agent runs as a daemon process.
 
              ZABBIX Agent accepts the following command line parameters:
Installation is very simple and includes 3 steps:
                -c --config <file> specify configuration file, default is
 
                                    /etc/zabbix/zabbix_agentd.conf
'''Step 1 Create configuration file.'''
                -h --help          give this help
 
                -v --version        display version number
Create configuration file c:/zabbix_agentd.conf (it has the same syntax as UNIX agent).
                -p --print          print supported metrics and exit
 
                -t --test <metric>  test specified metric and exit
'''Step 2 Install agent as a Windows service.'''
Copyright 2006 ZABBIX SIA                                                              Page 57 of 181
 
                                                                                  ZABBIX Manual v1.4
  ZabbixW32.exe --install
              In order to get this help run:
 
              shell> zabbix_agentd –h
If you wish to use configuration file other that c:\zabbix_agentd.conf, you should use the following command for service installation:
              Example of command line parameters:
 
                shell> zabbix_agentd –c /usr/local/etc/zabbix_agentd.conf
ZabbixW32.exe --config &lt;your_configuration_file&gt; install
                shell> zabbix_agentd –help
 
                shell> zabbix_agentd –print
Full path to configuration file should be specified.
                shell> zabbix_agentd –t “system.cpu.load[all,avg1]”
 
              The configuration file contains configuration parameters for zabbix_agentd. The
'''Step 3 Run agent.'''
              file must exist and it should have read permissions for user ‘zabbix’. Supported
 
              parameters:
Now you can use Control Panel to start agent's service or run:
                Parameter            Mandatory    Default value    Description
 
                                      No            3                Debug level:
ZabbixW32.exe start
                DebugLevel
 
                                                                      0 – none
Windows NT 4.0 note. ZabbixW32 uses PDH (Performance Data Helper)
                                                                      1 – critical
 
                                                                      2 – errors
Note:
                                                                      3 – warnings
  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
                                                                      4 – debug
  install it by yourself. Microsoft Knowledge Base article number 284996 describes this in detail and contains a download link. You can find this
                                      No            0                Disable processing of active
  article at http://support.microsoft.com/default.aspx?scid=kb;en-us;284996
                DisableActive
 
                                                                      checks. The agent will not
==== Usage ====
                                                                      connect to ZABBIX server to
 
                                                                      get list of active items.
Command line syntax:
                                      No            0                Enable remote commands.
 
                EnableRemoteC
zabbix_agentd.exe [-Vhp] [-idsx] [-c &lt;file&gt;] [-t &lt;metric&gt;]
                                                                      ZABBIX server will be able to
 
                ommands
ZABBIX Windows Agent accepts the following command line parameters:
                                                                      send        commands          for
 
                                                                      execution by the agent.
'''Options:'''
                                      No            System’s          Unique host name. The
 
                Hostname
-c --config &lt;file&gt; Specify alternate configuration file (default is c:\zabbix_agentd.conf).
                                                    hostname.        hostname is used for active
-h --help Display help information.
                                                                      checks only.
-V --version Display version number.
                                      No            -                 Use this parameter to include
-p --print Print list of supported checks (metrics) and exit.
                Include
-t --test &lt;metric&gt; Test single check (metric) and exit.
                                                                      a file into the configuration
 
                                                                      file. Number of parameters
'''Functions:'''
                                                                      Include is not limited.
 
                                                                      For example:
-I --install Install ZABBIX agent as a service.
Copyright 2006 ZABBIX SIA                                                            Page 58 of 181
-d --uninstall Uninstall ZABBIX agent service.
                                                                    ZABBIX Manual v1.4
-s --start Start ZABBIX agent service.
                Parameter      Mandatory Default value  Description
-x --stop Stop ZABBIX agent service.
                                                        Include=/etc/zabbix/user_par
 
                                                        ameters.conf
The file contains configuration parameters for Zabbix_agentd.exe. Supported parameters: <br>
                              No        -              IP address to bind agent to.
 
                ListenIP
<br>
                                                        Useful if the host has multiple
 
                                                        interfaces.
{| width="100%" cellspacing="1" cellpadding="1" border="1"
                              No        10050          Port number to listen.
|-
                ListenPort
| Parameter
                              No        -              Name of log file. If not set,
| Mandatory
                LogFile
| Default value
                                                        syslog is used.
| Description
                              No        1              This parameter controls log
|-
                LogFileSize
| Alias
                                                        rotation setting for LogFile.
| No
                                                        By        default,        ZABBIX
| -<br>
                                                        automatically roatates log file
| Sets the alias for parameter. 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.
                                                        when it reaches 1MB.
|-
                                                        This parameter is in MB.
| DebugLevel
                                                        If set to 0, no log rotation will
| No<br>
                                                        be performed.
| 3<br>
                              No        /tmp/zabbix_age Name of PID file.
|
                PidFile
Debug level, one of
                                        ntd.pid
 
                              No        120            The agent will refresh list of
0 – none
                RefreshActiveC
 
                                                        active checks once per 120
1 – critical
                hecks
 
                                                        (default) seconds.
2 – errors
                              Yes      -              Comma-delimited list of IP
 
                Server
3 – warnings
                                                        addresses        of      ZABBIX
 
                                                        servers. Connections from
4 – debug
                                                        other IP addresses will be
 
                                                        rejected.
|-
                              No        10051          The agent will connect to this
| Include
                ServerPort
| No
                                                        server port for processing
| -
                                                        active checks.
| Use this parameter to include a file into the configuration file. Number of parameters Include is not limited. For example: Include=c:\user_parameters. conf
                              No        5              Number of agents to start.
|-
                StartAgents
| ListenPort
                              No        3              Do not spend more that
| No
                Timeout
| 10050
                                                        Timeout seconds on getting
| Port number to listen.
                                                        requested value (1-255). The
|-
                                                        agent does not kill timeouted
| LogFile
                                                        User Parameters processes!
| No
                              No        -              User-defined parameter to
| -
                UserParameter
| Name of log file. If not set, syslog is used.
                                                        monitor. There can be
|-
                                                        several            user-defined
| LogUnresolvedSymbols
                                                        parameters. Value has form ,
| No
                                                        Example:UserParameter=use
| -
                                                        rs,who|wc -l Note: Example
| Controls logging of unresolved symbols during agent startup. Values can be strings ‘yes’ or ‘no’ (without quotes).
                                                        of the configuration file can
|-
                                                        be            found            at
| MaxCollectorProcessingTime
Copyright 2006 ZABBIX SIA                                                Page 59 of 181
| No
                                                                                ZABBIX Manual v1.4
| 100
                Parameter            Mandatory    Default value      Description
| Sets maximum acceptable processing time of one data sample by collector thread (in milliseconds). If processing time will exceed specified value, warning message will be written to the log file.
                                                                      misc/conf/zabbix_agentd.con
|-
                                                                      f.
| NoTimeWait
4.3.          ZABBIX Agent (UNIX, Inetd version)
| No
              The file contains configuration parameters for zabbix_agent. The file must exist
| -
              and it should have read permissions for user ‘zabbix’. Supported parameters:
| The parameter has no effect.
                Parameter            Mandatory    Default value      Description
|-
                                      Yes          -                  Comma-delimited list of IP
| PerfCounter
                Server
| No
                                                                      addresses      of      ZABBIX
| -
                                                                      servers. Connections from
|
                                                                      other IP addresses will be
&lt;parameter_name&gt;,"&lt;perf_c ounter_path&gt;",&lt;period&gt; Defines new parameter &lt;parameter_name&gt; which is an average value for system performance counter &lt;perf_counter_path&gt; for the specified time period &lt;period&gt; (in seconds).
                                                                      rejected.
 
                                      No           3                  Do not spend more that
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:
                Timeout
 
                                                                      Timeout seconds on getting
PerfCounter = interrupts,"\Processor(0)\Inter rupts/sec",60
                                                                      requested value (1-255). The
 
                                                                      agent does not kill timeouted
Please note double quotes around performance counter path. Samples for calculating average value will be taken every second.
                                                                      User Parameters processes!
 
                                      No          -                  User-defined parameter to
You may run typeperf –qx to get list of all performance counters available in Windows.
                UserParameter
 
                                                                      monitor. There can be
|-
                                                                      several          user-defined
| PidFile
                                                                      parameters.
| No
                                                                      Example:UserParameter=use
| -
                                                                      rs,who|wc -l
| The parameter has no effect.
                      Example    of    the  configuration  file    can    be    found      at
|-
              Note:
| Server
                      misc/conf/zabbix_agent.conf
| Yes
4.4.          ZABBIX Agent (Windows)
| -
              ZabbixW32 is ZABBIX agent for Win32 systems. It will work on Windows NT 4.0,
| Comma-delimited list of IP addresses of ZABBIX servers. Connections from other IP addresses will be rejected.
              Windows 2000, Windows XP, and Windows Vista.
|-
          4.4.1.          Installation
| StartAgents
Copyright 2006 ZABBIX SIA                                                          Page 60 of 181
| No
                                                                                  ZABBIX Manual v1.4
| -
              Installation is very simple and includes 3 steps:
| The parameter has no effect.
                            Create configuration file.
|-
                Step 1
| UserParameter
              Create configuration file c:/zabbix_agentd.conf (it has the same syntax as UNIX
| No
              agent).
| -
                            Install agent as a Windows service.
| ') characters! Example:UserParameter=test ,echo 1
                Step 2
|}
              ZabbixW32.exe install
 
              If you wish to use configuration file other that c:\zabbix_agentd.conf, you should
=== ZABBIX Sender (UNIX) ===
              use the following command for service installation:
 
              ZabbixW32.exe --config <your_configuration_file> install
ZABBIX UNIX Sender is a command line utility which may be used to send performance data to ZABBIX Server for processing.
              Full path to configuration file should be specified.
 
                            Run agent.
The utility is usually used in long running user scripts for periodical sending of availability and performance data.
                Step 2
 
              Now you can use Control Panel to start agent's service or run:
ZABBIX Sender can be started by executing:
              ZabbixW32.exe start
 
                      Windows NT 4.0 note. ZabbixW32 uses PDH (Performance Data Helper)
shell&gt; cd bin
              Note:
   shell&gt; ./zabbix_sender –z zabbix –p 10051 –h LinuxDB3 –k db.connections –o 43
                      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
ZABBIX Sender accepts the following command line parameters:
                      install it by yourself. Microsoft Knowledge Base article number 284996
 
                      describes this in detail and contains a download link. You can find this
-z --zabbix-server &lt;zabbix server&gt; Hostname or IP address of ZABBIX Server.
                      article at http://support.microsoft.com/default.aspx?scid=kb;en-us;284996
-p --port &lt;zabbix server port&gt; Specify port number of server trapper running on the server. Default is 10051.
          4.4.2.           Usage
-s --host &lt;host name or IP&gt; Specify host name or IP address of a host.
              Command line syntax:
-k --key &lt;key of metric&gt; Specify metric name (key) we want to send.
Copyright 2006 ZABBIX SIA                                                            Page 61 of 181
-o --value &lt;value&gt; Specify value of the key.
                                                                                  ZABBIX Manual v1.4
-i --input-file &lt;input file&gt; Load values from input file.
              zabbixw32 [options] [command]
-h –help Give this help.
              ZABBIX Windows Agent accepts the following command line parameters:
-v –version Display version number.
                check-config        Check configuration file and exit.
 
                help                Display help information.
In order to get this help run:
                install            Install ZABBIX Win32 Agent as a service.
 
                install-events      Install ZABBIX Win32 Agent as event source
shell&gt; zabbix_sender -h
                                    for Event Log. This is done automatically
 
                                    when service is being installed.
=== ZABBIX Get (UNIX) ===
                remove              Remove previously installed ZABBIX Win32
 
                                    Agent service.
ZABBIX UNIX Get is a process which communicates with ZABBIX Agent and retrieves required information.
                remove-events      Remove ZABBIX Win32 Agent event source.
 
                                    This is done automatically when service is
The utility is usually used for troubleshooting of ZABBIX Agents.
                                    being removed.
 
                standalone          Run in standalone mode.
ZABBIX Get can be started by executing:
                start              Start ZABBIX Agent service.
 
                stop                Stop ZABBIX Agent service.
shell&gt; cd bin
                version            Display version information.
shell&gt; ./zabbix_get -s127.0.0.1 -p10050 -k"system.cpu.load[all,avg1]"
              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:
ZABBIX Get accepts the following command line parameters:
  -p --port     <port Specify port number of agent running on the
 
  number>              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 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.  
  name or IP>
   -k --key &lt;key of metric&gt; Specify metric name (key) we want to retrieve.
   -k –key <key of Specify metric name (key) we want to
   -h --help Give this help.
  metric>              retrieve.
   -v --version Display version number.
   -h --help             Give this help.
 
   -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

2008年4月3日 (四) 14:41的最新版本


{{#ifexist: :ZabbixManual1.4/ZabbixProcesses/zh | | {{#ifexist: ZabbixManual1.4/ZabbixProcesses/zh | | {{#ifeq: {{#titleparts:ZabbixManual1.4/ZabbixProcesses|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ZabbixManual1.4/ZabbixProcesses|1|-1|}} | zh | | }}


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.
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
Server Yes - Comma-delimited list of IP addresses of ZABBIX servers. Connections from other IP addresses will be rejected.
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 - User-defined parameter to monitor. There can be several user-defined parameters.

Example:UserParameter=use rs,who|wc -l

Note: Example of the configuration file can be found at 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:

Step 1 Create configuration file.

Create configuration file c:/zabbix_agentd.conf (it has the same syntax as UNIX agent).

Step 2 Install agent as a Windows service.

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.

Step 3 Run agent.

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

Command line syntax:

zabbix_agentd.exe [-Vhp] [-idsx] [-c <file>] [-t <metric>]

ZABBIX Windows Agent accepts the following command line parameters:

Options:

-c --config <file> Specify alternate configuration file (default is c:\zabbix_agentd.conf).
-h --help Display help information.
-V --version Display version number.
-p --print Print list of supported checks (metrics) and exit.
-t --test <metric> Test single check (metric) and exit.

Functions:

-I --install Install ZABBIX agent as a service.
-d --uninstall Uninstall ZABBIX agent service.
-s --start Start ZABBIX agent service.
-x --stop Stop ZABBIX agent service.

The file contains configuration parameters for Zabbix_agentd.exe. Supported parameters:


Parameter Mandatory Default value Description
Alias No -
Sets the alias for parameter. 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.
DebugLevel No
3

Debug level, one of

0 – none

1 – critical

2 – errors

3 – warnings

4 – debug

Include No - Use this parameter to include a file into the configuration file. Number of parameters Include is not limited. For example: Include=c:\user_parameters. conf
ListenPort No 10050 Port number to listen.
LogFile No - Name of log file. If not set, syslog is used.
LogUnresolvedSymbols No - Controls logging of unresolved symbols during agent startup. Values can be strings ‘yes’ or ‘no’ (without quotes).
MaxCollectorProcessingTime No 100 Sets maximum acceptable processing time of one data sample by collector thread (in milliseconds). If processing time will exceed specified value, warning message will be written to the log file.
NoTimeWait No - The parameter has no effect.
PerfCounter No -

<parameter_name>,"<perf_c ounter_path>",<period> Defines new parameter <parameter_name> which is 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.

You may run typeperf –qx to get list of all performance counters available in Windows.

PidFile No - The parameter has no effect.
Server Yes - Comma-delimited list of IP addresses of ZABBIX servers. Connections from other IP addresses will be rejected.
StartAgents No - The parameter has no effect.
UserParameter No - ') 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