zabbix監控客戶端安裝
<div>
<h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:0px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;">
新增zabbix使用者
</h3>
<pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">zabbix客戶端程式會以該使用者的身份啟動
shell> groupadd zabbix
shell> useradd -r -g zabbix zabbix</code></pre>
<h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;">
zabbix 編譯安裝
</h3>
<pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">解壓zabbix安裝包
shell> tar zxvf zabbix-2.4.5.tar.gz
shell> cd zabbix-2.4.5/
編譯安裝zabbix
shell> ./configure --prefix=/usr/local/zabbix_agent --enable-agent
shell> make && make install
shell> ln -s /usr/local/zabbix/sbin/* /usr/local/sbin/
shell> ln -s /usr/local/zabbix/bin/* /usr/local/bin/</code></pre>
<h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;">
zabbix 配置
</h3>
<pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">新增zabbix server埠
shell> grep zabbix /etc/services
zabbix-agent 10050/tcp # Zabbix Agent
zabbix-agent 10050/udp # Zabbix Agent
zabbix-trapper 10051/tcp # Zabbix Trapper
zabbix-trapper 10051/udp # Zabbix Trapper
shell> vi /usr/local/zabbix_agent/etc/zabbix_agentd.conf
==============================================================
Server=192.168.56.210
ServerActive=192.168.56.211:10051
DebugLevel=2
Include=/usr/local/etc/zabbix_agentd.conf.d/
UnsafeUserParameters=1 #允許自定義指令碼
==============================================================</code></pre>
<h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;">
啟動zabbix客戶端
</h3>
<pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">新增zabbix到開機啟動指令碼並修改
shell> cp misc/init.d/fedora/zabbix_agentd /etc/init.d/
shell> /etc/init.d/zabbix_agentd start
Starting zabbix_agentd: [確定]
zabbix伺服器端執行
shell> zabbix_get -s192.168.56.211 -p10050 -k"system.uptime"
8748</code></pre>
<h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;">
新增自定義監控
</h3>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
1、在配置檔案裡面新增如下監控項:
</p>
<pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">UserParameter=mysql.status[*],mysql -u$1 -p$2 -e 'show global status' | grep Com_select | awk '{printf $$2}'
注意$$表示原shell含義</code></pre>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
2、重新啟動 zabbix_agentd服務
</p>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
3、zabbix伺服器端check服務
</p>
<pre style="orphans:2;text-align:-webkit-auto;margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid #CCCCCC;font-size:13px;font-family:Consolas, 'Liberation Mono', Courier, monospace;line-height:19px;overflow:auto;border-radius:3px;color:#333333;background-color:#F8F8F8;"><code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas, 'Liberation Mono', Courier, monospace;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:transparent;">/usr/local/zabbix/bin/zabbix_get -s 192.168.56.211 -k mysql.status['zabbix','123@qwe']
116611</code></pre>
<h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;">
伺服器web配置Item
</h3>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
Hosts --> items --> Create item<br />
Name : mysql.status<br />
Type :Zabbix agent<br />
Key : mysql.status['zabbix','123@qwe']<br />
其他根據需要做修改,儲存
</p>
<h3 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border:0px;-webkit-font-smoothing:antialiased;font-size:18px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;">
配置graph
</h3>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
Hosts --> graph --> Create graph<br />
Name : mysql.status<br />
Items: 選擇剛配置的Item
</p>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
其他根據需要做修改,儲存
</p>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:15px;margin-bottom:15px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
此時zabbix就可以生成出介面了
</p>
<h2 style="line-height:normal;orphans:2;text-align:-webkit-auto;white-space:normal;margin:20px 0px 10px;padding:0px;border-width:0px 0px 1px;border-bottom-style:solid;border-bottom-color:#CCCCCC;-webkit-font-smoothing:antialiased;font-size:24px;font-family:Helvetica, arial, freesans, clean, sans-serif;">
整理自網路
</h2>
<p style="orphans:2;text-align:-webkit-auto;white-space:normal;margin-top:10px;margin-bottom:0px;border:0px;color:#333333;font-family:Helvetica, arial, freesans, clean, sans-serif;font-size:14px;line-height:22.3999996185303px;">
<strong style="margin:0px;padding:0px;border:0px;"><em style="margin:0px;padding:0px;border:0px;">Svoid</em></strong><br />
<strong style="margin:0px;padding:0px;border:0px;"><em style="margin:0px;padding:0px;border:0px;">2015-07-02</em></strong>
</p>
</div>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29734436/viewspace-2137841/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- zabbix 客戶端安裝客戶端
- Nagios 監控windows客戶端安裝教程iOSWindows客戶端
- 【監控】Zabbix安裝
- centos6.2lnmp環境下安裝zabbix(中文環境)並且監控客戶端CentOSLNMP客戶端
- Zabbix監控安裝部署
- Zabbix Agent active批量調整客戶端為主動模式監控客戶端模式
- linux zabbix-6.0.1-Agent客戶端的安裝配置Linux客戶端
- Nagios for Aix監控客戶端iOSAI客戶端
- Linux 伺服器zabbix原始碼客戶端(agent)安裝Linux伺服器原始碼客戶端
- Oracle 客戶端安裝Oracle客戶端
- MySQL 客戶端安裝MySql客戶端
- oracle客戶端安裝Oracle客戶端
- ZABBIX安裝以及監控磁碟、mysql、oracle配置MySqlOracle
- zabbix監控系統的安裝與配置
- Zabbix-2.4.3監控系統安裝配置
- Splunk新增LINUX客戶端新增監控Linux客戶端
- 監控database上的客戶端ip地址Database客戶端
- aix安裝oracle客戶端AIOracle客戶端
- Ceph的客戶端安裝客戶端
- Git-客戶端安裝Git客戶端
- centos安裝oracle客戶端CentOSOracle客戶端
- CentOS安裝git客戶端CentOSGit客戶端
- zabbix容器化安裝及監控docker應用Docker
- 【zabbix】zabbix遠端安裝部署
- 分散式監控系統Zabbix--完整安裝記錄 -新增apache監控分散式Apache
- 分散式監控系統Zabbix-完整安裝記錄 -新增埠監控分散式
- Windows下安裝redis客戶端WindowsRedis客戶端
- db2 客戶端安裝DB2客戶端
- linux安裝mysql客戶端LinuxMySql客戶端
- 安裝 Oracle 即時客戶端Oracle客戶端
- 配置安裝版Oracle客戶端Oracle客戶端
- 免安裝Oracle客戶端使用Oracle客戶端
- zabbix監控
- Linux系統安裝zabbix 4.4監控軟體Linux
- 使用 Docker 安裝 Zabbix,並配置自定義監控項Docker
- graylog 客戶端的安裝配置客戶端
- centos下安裝openvpn———客戶端CentOS客戶端
- kickstart之批量安裝puppet客戶端客戶端