zabbix-agent 安裝

Zabbix3.2 CentOS7 x64

Yum源配置

#centos7
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

#centos6 
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm

zabbix_agent安裝配置

yum install zabbix-agent -y
vim /etc/zabbix/zabbix_agentd.conf 
Server= 服務(wù)端IP #用于被動模式
ServerActive= 服務(wù)端IP#用于主動模式

Hostname=本機Ip #不要用127.0.0.1 
#或者 弄個唯一名字,這里的名字在服務(wù)端添加主機的時候要用!建議使用IP
主動模式失敗,  `Received empty response from Zabbix Agent at [10.1.93.252]. Assuming that ...` 不知為何,


systemctl start zabbix-agent#啟動zabbix agent

主動和被動的區(qū)別畅厢。以agent端為出發(fā),agent主動發(fā)送就是主動搁料,被動接受就是被動。

Ubuntu amd64

#下載軟件包
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix/zabbix-agent_3.2.4-1+trusty_amd64.deb

#然后安裝
dpkg -i zabbix....deb

##再修改配置系羞,同centos

windows agent安裝

下載agent包 http://www.zabbix.com/download

拷貝zabbix_agents_3.2.0.win\bin\win64下所有文件(非文件夾)到C:\Program Files\zabbix下
32位到 C:\Program Files x86\zabbix下

新建文件C:\Program Files\zabbix\zabbix_agent.conf
復(fù)制代碼郭计,主要修改地方同linux。不要寫錯椒振,否則服務(wù)啟動不起來s

第一種:
Server= 服務(wù)端IP #用于被動模式
ServerActive= 服務(wù)端IP#用于主動模式
Hostname=本機Ip #不要用127.0.0.1 

第二種:

# This is a configuration file for Zabbix agent service (Windows)
# To get more information about Zabbix, visit http://www.zabbix.com

############ GENERAL PARAMETERS #################

### Option: LogType
#   Specifies where log messages are written to:
#       system  - Windows event log
#       file    - file specified with LogFile parameter
#       console - standard output
#
# Mandatory: no
# Default:
# LogType=file

### Option: LogFile
#   Log file name for LogType 'file' parameter.
#
# Mandatory: no
# Default:
# LogFile=

LogFile=c:\zabbix_agentd.log

### Option: LogFileSize
#   Maximum size of log file in MB.
#   0 - disable automatic log rotation.
#
# Mandatory: no
# Range: 0-1024
# Default:
# LogFileSize=1

### Option: DebugLevel
#   Specifies debug level:
#   0 - basic information about starting and stopping of Zabbix processes
#   1 - critical information
#   2 - error information
#   3 - warnings
#   4 - for debugging (produces lots of information)
#   5 - extended debugging (produces even more information)
#
# Mandatory: no
# Range: 0-5
# Default:
# DebugLevel=3

### Option: SourceIP
#   Source IP address for outgoing connections.
#
# Mandatory: no
# Default:
# SourceIP=

### Option: EnableRemoteCommands
#   Whether remote commands from Zabbix server are allowed.
#   0 - not allowed
#   1 - allowed
#
# Mandatory: no
# Default:
# EnableRemoteCommands=0

### Option: LogRemoteCommands
#   Enable logging of executed shell commands as warnings.
#   0 - disabled
#   1 - enabled
#
# Mandatory: no
# Default:
# LogRemoteCommands=0

##### Passive checks related

### Option: Server
#   List of comma delimited IP addresses (or hostnames) of Zabbix servers.
#   Incoming connections will be accepted only from the hosts listed here.
#   If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
#
# Mandatory: no
# Default:
# Server=

Server=127.0.0.1

### Option: ListenPort
#   Agent will listen on this port for connections from the server.
#
# Mandatory: no
# Range: 1024-32767
# Default:
# ListenPort=10050

### Option: ListenIP
#       List of comma delimited IP addresses that the agent should listen on.
#       First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
#
# Mandatory: no
# Default:
# ListenIP=0.0.0.0

### Option: StartAgents
#   Number of pre-forked instances of zabbix_agentd that process passive checks.
#   If set to 0, disables passive checks and the agent will not listen on any TCP port.
#
# Mandatory: no
# Range: 0-100
# Default:
# StartAgents=3

##### Active checks related

### Option: ServerActive
#   List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
#   If port is not specified, default port is used.
#   IPv6 addresses must be enclosed in square brackets if port for that host is specified.
#   If port is not specified, square brackets for IPv6 addresses are optional.
#   If this parameter is not specified, active checks are disabled.
#   Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive=

ServerActive=127.0.0.1

### Option: Hostname
#   Unique, case sensitive hostname.
#   Required for active checks and must match hostname as configured on the server.
#   Value is acquired from HostnameItem if undefined.
#
# Mandatory: no
# Default:
# Hostname=

Hostname=Windows host

### Option: HostnameItem
#   Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
#   Does not support UserParameters or aliases.
#
# Mandatory: no
# Default:
# HostnameItem=system.hostname

### Option: HostMetadata
#   Optional parameter that defines host metadata.
#   Host metadata is used at host auto-registration process.
#   An agent will issue an error and not start if the value is over limit of 255 characters.
#   If not defined, value will be acquired from HostMetadataItem.
#
# Mandatory: no
# Range: 0-255 characters
# Default:
# HostMetadata=
HostMetadata=wonders_windows_1

### Option: HostMetadataItem
#   Optional parameter that defines an item used for getting host metadata.
#   Host metadata is used at host auto-registration process.
#   During an auto-registration request an agent will log a warning message if
#   the value returned by specified item is over limit of 255 characters.
#   This option is only used when HostMetadata is not defined.
#
# Mandatory: no
# Default:
# HostMetadataItem=

### Option: RefreshActiveChecks
#   How often list of active checks is refreshed, in seconds.
#
# Mandatory: no
# Range: 60-3600
# Default:
# RefreshActiveChecks=120

### Option: BufferSend
#   Do not keep data longer than N seconds in buffer.
#
# Mandatory: no
# Range: 1-3600
# Default:
# BufferSend=5

### Option: BufferSize
#   Maximum number of values in a memory buffer. The agent will send
#   all collected data to Zabbix server or Proxy if the buffer is full.
#
# Mandatory: no
# Range: 2-65535
# Default:
# BufferSize=100

### Option: MaxLinesPerSecond
#   Maximum number of new lines the agent will send per second to Zabbix Server
#   or Proxy processing 'log', 'logrt' and 'eventlog' active checks.
#   The provided value will be overridden by the parameter 'maxlines',
#   provided in 'log', 'logrt' or 'eventlog' item keys.
#
# Mandatory: no
# Range: 1-1000
# Default:
# MaxLinesPerSecond=20

############ ADVANCED PARAMETERS #################

### Option: Alias
#   Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
#   Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
#   Different Alias keys may reference the same item key.
#   For example, to retrieve paging file usage in percents from the server:
#   Alias=pg_usage:perf_counter[\Paging File(_Total)\% Usage]
#   Now shorthand key pg_usage may be used to retrieve data.
#   Aliases can be used in HostMetadataItem but not in HostnameItem or PerfCounter parameters.
#
# Mandatory: no
# Range:
# Default:

### Option: Timeout
#   Spend no more than Timeout seconds on processing.
#
# Mandatory: no
# Range: 1-30
# Default:
# Timeout=3

### Option: PerfCounter
#   Syntax: <parameter_name>,"<perf_counter_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)\Interrupts/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.
#
# Mandatory: no
# Range:
# Default:

### Option: Include
#   You may include individual files in the configuration file.
#
# Mandatory: no
# Default:
# Include=

# Include=c:\zabbix\zabbix_agentd.userparams.conf
# Include=c:\zabbix\zabbix_agentd.conf.d\
# Include=c:\zabbix\zabbix_agentd.conf.d\*.conf

####### USER-DEFINED MONITORED PARAMETERS #######

### Option: UnsafeUserParameters
#   Allow all characters to be passed in arguments to user-defined parameters.
#   The following characters are not allowed:
#   \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @
#   Additionally, newline characters are not allowed.
#   0 - do not allow
#   1 - allow
#
# Mandatory: no
# Range: 0-1
# Default:
# UnsafeUserParameters=0

### Option: UserParameter
#   User-defined parameter to monitor. There can be several user-defined parameters.
#   Format: UserParameter=<key>,<shell command>
#
# Mandatory: no
# Default:
# UserParameter=

####### TLS-RELATED PARAMETERS #######

### Option: TLSConnect
#   How the agent should connect to server or proxy. Used for active checks.
#   Only one value can be specified:
#       unencrypted - connect without encryption
#       psk         - connect using TLS and a pre-shared key
#       cert        - connect using TLS and a certificate
#
# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
# Default:
# TLSConnect=unencrypted

### Option: TLSAccept
#   What incoming connections to accept.
#   Multiple values can be specified, separated by comma:
#       unencrypted - accept connections without encryption
#       psk         - accept connections secured with TLS and a pre-shared key
#       cert        - accept connections secured with TLS and a certificate
#
# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
# Default:
# TLSAccept=unencrypted

### Option: TLSCAFile
#   Full pathname of a file containing the top-level CA(s) certificates for
#   peer certificate verification.
#
# Mandatory: no
# Default:
# TLSCAFile=

### Option: TLSCRLFile
#   Full pathname of a file containing revoked certificates.
#
# Mandatory: no
# Default:
# TLSCRLFile=

### Option: TLSServerCertIssuer
#      Allowed server certificate issuer.
#
# Mandatory: no
# Default:
# TLSServerCertIssuer=

### Option: TLSServerCertSubject
#      Allowed server certificate subject.
#
# Mandatory: no
# Default:
# TLSServerCertSubject=

### Option: TLSCertFile
#   Full pathname of a file containing the agent certificate or certificate chain.
#
# Mandatory: no
# Default:
# TLSCertFile=

### Option: TLSKeyFile
#   Full pathname of a file containing the agent private key.
#
# Mandatory: no
# Default:
# TLSKeyFile=

### Option: TLSPSKIdentity
#   Unique, case sensitive string used to identify the pre-shared key.
#
# Mandatory: no
# Default:
# TLSPSKIdentity=

### Option: TLSPSKFile
#   Full pathname of a file containing the pre-shared key.
#
# Mandatory: no
# Default:
# TLSPSKFile=
注冊zabbix服務(wù)

管理員身份運行cmd

切換到zabbix目錄下

zabbix_agentd.exe -c .C:\Program Files\zabbix\zabbix_agentd.win.conf -i

 -c  表示配置文件路徑 -i  表示安裝 
刪除的話: -d  表示卸載
zabbix_agentd.exe  -s #啟動
或者去服務(wù)里面手動啟動

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末昭伸,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子澎迎,更是在濱河造成了極大的恐慌庐杨,老刑警劉巖,帶你破解...
    沈念sama閱讀 211,290評論 6 491
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件夹供,死亡現(xiàn)場離奇詭異灵份,居然都是意外死亡,警方通過查閱死者的電腦和手機哮洽,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,107評論 2 385
  • 文/潘曉璐 我一進店門填渠,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人鸟辅,你說我怎么就攤上這事氛什。” “怎么了匪凉?”我有些...
    開封第一講書人閱讀 156,872評論 0 347
  • 文/不壞的土叔 我叫張陵枪眉,是天一觀的道長。 經(jīng)常有香客問我再层,道長贸铜,這世上最難降的妖魔是什么堡纬? 我笑而不...
    開封第一講書人閱讀 56,415評論 1 283
  • 正文 為了忘掉前任,我火速辦了婚禮萨脑,結(jié)果婚禮上隐轩,老公的妹妹穿的比我還像新娘。我一直安慰自己渤早,他們只是感情好职车,可當(dāng)我...
    茶點故事閱讀 65,453評論 6 385
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著鹊杖,像睡著了一般悴灵。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上骂蓖,一...
    開封第一講書人閱讀 49,784評論 1 290
  • 那天积瞒,我揣著相機與錄音,去河邊找鬼登下。 笑死茫孔,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的被芳。 我是一名探鬼主播缰贝,決...
    沈念sama閱讀 38,927評論 3 406
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼畔濒!你這毒婦竟也來了剩晴?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 37,691評論 0 266
  • 序言:老撾萬榮一對情侶失蹤侵状,失蹤者是張志新(化名)和其女友劉穎赞弥,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體趣兄,經(jīng)...
    沈念sama閱讀 44,137評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡绽左,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,472評論 2 326
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了艇潭。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片妇菱。...
    茶點故事閱讀 38,622評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖暴区,靈堂內(nèi)的尸體忽然破棺而出闯团,到底是詐尸還是另有隱情,我是刑警寧澤仙粱,帶...
    沈念sama閱讀 34,289評論 4 329
  • 正文 年R本政府宣布房交,位于F島的核電站,受9級特大地震影響伐割,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 39,887評論 3 312
  • 文/蒙蒙 一毅访、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧尚胞,春花似錦、人聲如沸帜慢。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,741評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽粱玲。三九已至躬柬,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間抽减,已是汗流浹背允青。 一陣腳步聲響...
    開封第一講書人閱讀 31,977評論 1 265
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留卵沉,地道東北人颠锉。 一個月前我還...
    沈念sama閱讀 46,316評論 2 360
  • 正文 我出身青樓,卻偏偏與公主長得像史汗,于是被迫代替她去往敵國和親琼掠。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 43,490評論 2 348

推薦閱讀更多精彩內(nèi)容

  • 1.寫在前面 本文主要介紹的是zabbix的編譯安裝過程淹办,包含它的基礎(chǔ)環(huán)境LNMP眉枕,雖然zabbix官方一般推薦的...
    天之藍色閱讀 2,529評論 0 16
  • 一恶复、 環(huán)境準(zhǔn)備 hosts解析文件 服務(wù)端 客戶端 配置yum源 時間同步 二怜森、服務(wù)端安裝 1.數(shù)據(jù)庫配置安裝配置...
    像飛翔一樣去飛翔閱讀 652評論 0 0
  • Zabbix簡介 Zabbix官方網(wǎng)站Zabbix中文文檔 本文系統(tǒng)環(huán)境是CentOS7x86_64, Zabbi...
    Zhang21閱讀 7,968評論 0 37
  • 我21歲 準(zhǔn)確的說是22歲 22歲看起來很年輕漂亮張狂熱血這可跟我一點關(guān)系也沒有 我自私虛榮敏感自卑悲觀懶惰膽小懦...
    跟生閱讀 166評論 0 0
  • 作者名片:老貓枕咸魚 全文目錄:《未懸年》簡介及目錄 在別院一住就是五天,許言徹底放松谤牡,每天就是泡泡溫泉副硅、散散步,...
    老貓枕咸魚閱讀 654評論 3 9