SlideShare una empresa de Scribd logo
1 de 45
Descargar para leer sin conexión
_______________________
< 簡單易易⽤用的 Zabbix 監控服務 >
-----------------------


[ chusiang@DevOpsTaiwan ~ ]
$ cat .profile
# Author: 凍仁翔 / chusiang@drx.tw
# Blog: https://note.drx.tw
# Modified: 2018-05-26 14:00
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
關於我
• 凍仁翔 (@chusiang_lai)。
• 「凍仁的筆記」部落落客。
• DevOps Taiwan 志⼯工。
• 6 年年 IT 維運經驗。
2
契機
⾝身為 IT ⼈人員,我們想導入監控

服務追蹤所有的資訊系統,這樣

當服務有問題時,才可在第⼀一時間

主動處理理,⽽而不是被動的等待

顧客告知。
!3
契機
⾝身為 IT ⼈人員,我們想導入監控

服務追蹤所有的資訊系統,這樣

當服務有問題時,才可在第⼀一時間

主動處理理,⽽而不是被動的等待

顧客告知。
!4
1. Zabbix 是什什麼?
2. 怎麼簡單地部署 Zabbix?
3. 怎麼使⽤用 Zabbix?
4. 凍仁都怎麼⽤用 Zabbix?
Outline
Usage
What
Deploy
Case
5
Ⅰ. Zabbix 是什什麼?
UsageWhat Deploy Case
!6
https://youtu.be/ATe_G6edk9A
!7
Zabbix 基於 C 和 LAMP 架構。
Server
GNU / Linux
C PHP
ZABBIX
Apache MySQL
!8
硬體配置範例例
級距 平台 CPU / RAM Database Node
⼩小型 CentOS VM
MySQL
InnoDB
100
中型 CentOS 雙核 / 2G
MySQL
InnoDB
500
巨⼤大型 RHEL
八核 /
16G
Fast RAID10

MySQL InnoDB

or PostgreSQL
> 10,000
※ 資料來來源:https://www.zabbix.com/documentation/3.4/manual/installation/requirements
!9
Windows
Agent
Zabbix
Server
macOS
Linux
Passive Checks (Pull)
Default
!10
※ Like “Nagios Remote Plugin Executor”.
Windows
Agent
Zabbix
Server
macOS
Linux
Active Checks (Push)
Recommend
!11
※ Like “Nagios Service Check Acceptor”.
Add Proxy (Option)
!12
Tuning
Windows
Agent
Zabbix
Server
macOS
Linux Proxy
Server
Ⅱ. 怎麼簡單地部署 Zabbix?
DeployWhat Usage Case
!13
https://github.com/chusiang/zabbix.dockerize/
$ vim docker-compose.yml
1 zabbix-db:
2 volumes:
3 - ./database:/var/lib/mysql
4 environment:
5 MARIADB_USER: "zabbix"
6 MARIADB_PASS: "R2uA8cVMAaZazZTe"
7 image: monitoringartist/zabbix-db-mariadb
8
9 zabbix-server:
10 links:
11 - zabbix-db:zabbix.db
12 ports:
13 - 8080:80/tcp
14 - 10050:10050/tcp
15 - 10051:10051/tcp
16 - 10052:10052/tcp
17 - 162:162/udp
18 environment:
19 ZS_DBHost: "zabbix.db"
20 ZS_DBPassword: "R2uA8cVMAaZazZTe"
21 ZS_DBUser: "zabbix"
22 image: monitoringartist/dockbix-xxl:3.4.9
Zabbix
MariaDB
https://bit.ly/2J7icq6
!16
Ⅲ. 怎麼使⽤用 Zabbix?
UsageWhat Deploy Case
!17
https://bit.ly/2IKFHWu
!18
1. Hosts & Host groups:被監控主機與主機群組。
!19
2. Templates:封裝 Items、Triggers … 等的集合。
!20
3. Items:Zabbix 真正監控的度量量指標 (metrics)。
!21
!22
4. Triggers & Events:

當 Item < 或 > 某條件時,即會觸發事件。
!23
5. Actions:

當事件被觸發,且符合特定條件時,會⾃自動執⾏行行的動作。
Ⅳ. 凍仁都怎麼⽤用 Zabbix?
UsageWhat Deploy Case
!24
1. ⾃自動加入監控主機。
• 啟⽤用 Zabbix 的 Auto Registration action。

• 藉由 Ansible 部署 zabbix-agent。
https://galaxy.ansible.com/chusiang/zabbix-agent/
2. 整合 Chat (HipChat、Slack、Rocket.Chat、Microsoft
Teams) 發送 Alert。
3. Web Monitoring:監控網站狀狀態、回應速度。
4. 建立儀表板 (Screens),以便便追蹤系統效能和例例外⼯工作。
5. 整合 LDAP。
6.
6. Discovery (Ping、SSH、HTTP、TCP、Zabbix-agent。
7.
7. 建置簡易易型⾃自禦性修復機制。
Third-party plugins - https://share.zabbix.com/
34
今天提的 DevOps 是什什麼?
_______
< Pause >
-------


.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
!35
⽀支援 Debian、Ubuntu、Nginx 和 PostgreSQL 等不同架構。
Server
GNU / Linux
C PHP
ZABBIX
Nginx PostgreSQL
!36
Split Database
!37
Windows
Agent
Zabbix
Server
macOS
Linux Database
Tuning Ⅱ
Proxy
Support Docker ?
Try the `dockbix-agent

-xxl-limited` image.

> https://dockr.ly/2KUykIF
!38
Grafana x Zabbix
Networking10%
Platform40%
Web60%
DB80%
Apps90%
Monitoring
商
業
價
值
基
礎
建
設
!40
• Zabbix Official - https://zabbix.com
• Zabbix Documentation

- https://www.zabbix.com/documentation/3.4/zh/manual/introduction/about
• Docker Compose - https://github.com/docker/compose
• Monitoring Artist | Docker Hub - https://hub.docker.com/u/monitoringartist/
• Grafana - https://grafana.com
• 企業級開源網管軟體 ⽤用Zabbix監控網路路服務 | 網管⼈人

- http://www.netadmin.com.tw/article_content.aspx?sn=1404100003
• 开源监控系统中 Zabbix 和 Nagios 哪个更更好? | 知乎

- https://www.zhihu.com/question/19973178/answer/131911060
參參考⽂文獻
!41
DevOps Taiwan
https://t.me/devopstw
https://fb.me/groups/DevOpsTaiwan/
https://devopstw.club/
!42
Ansible Taiwan
https://t.me/ansible_tw
https://github.com/ansible-tw
http://ansible.tw
!43
http://萍⽔水相逢.tw
!44
_____
< END >
-----


.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""

Más contenido relacionado

Más de Chu-Siang Lai

Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)Chu-Siang Lai
 
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)Chu-Siang Lai
 
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)Chu-Siang Lai
 
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CIContinuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CIChu-Siang Lai
 
Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)Chu-Siang Lai
 
Continuous Delivery with Ansible x GitLab CI
Continuous Delivery with Ansible x GitLab CIContinuous Delivery with Ansible x GitLab CI
Continuous Delivery with Ansible x GitLab CIChu-Siang Lai
 
Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)Chu-Siang Lai
 
Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Chu-Siang Lai
 
Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)Chu-Siang Lai
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & WindowsChu-Siang Lai
 
前端工程師一定要知道的 Docker 虛擬化容器技巧
前端工程師一定要知道的 Docker 虛擬化容器技巧前端工程師一定要知道的 Docker 虛擬化容器技巧
前端工程師一定要知道的 Docker 虛擬化容器技巧Chu-Siang Lai
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧Chu-Siang Lai
 
Git and Github basic with SourceTree
Git and Github basic with SourceTreeGit and Github basic with SourceTree
Git and Github basic with SourceTreeChu-Siang Lai
 
使用 Multi-sites 技術快速建置多 Drupal 網站
使用 Multi-sites 技術快速建置多 Drupal 網站使用 Multi-sites 技術快速建置多 Drupal 網站
使用 Multi-sites 技術快速建置多 Drupal 網站Chu-Siang Lai
 
歡迎來到 Ubuntu 9.10 Release Party (台中)
歡迎來到 Ubuntu 9.10 Release Party (台中)歡迎來到 Ubuntu 9.10 Release Party (台中)
歡迎來到 Ubuntu 9.10 Release Party (台中)Chu-Siang Lai
 
無痛入門 Chromecast
無痛入門 Chromecast無痛入門 Chromecast
無痛入門 ChromecastChu-Siang Lai
 
Ubuntu 藍星侵略計劃
Ubuntu 藍星侵略計劃Ubuntu 藍星侵略計劃
Ubuntu 藍星侵略計劃Chu-Siang Lai
 
Intro of Network, WiFi on Ubuntu
Intro of Network, WiFi on UbuntuIntro of Network, WiFi on Ubuntu
Intro of Network, WiFi on UbuntuChu-Siang Lai
 

Más de Chu-Siang Lai (20)

Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
 
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)
 
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
 
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CIContinuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CI
 
Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)
 
Continuous Delivery with Ansible x GitLab CI
Continuous Delivery with Ansible x GitLab CIContinuous Delivery with Ansible x GitLab CI
Continuous Delivery with Ansible x GitLab CI
 
Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)
 
Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)
 
Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
 
前端工程師一定要知道的 Docker 虛擬化容器技巧
前端工程師一定要知道的 Docker 虛擬化容器技巧前端工程師一定要知道的 Docker 虛擬化容器技巧
前端工程師一定要知道的 Docker 虛擬化容器技巧
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧
 
Git and Github basic with SourceTree
Git and Github basic with SourceTreeGit and Github basic with SourceTree
Git and Github basic with SourceTree
 
helloTux 2012
helloTux 2012helloTux 2012
helloTux 2012
 
Unity & Googlizer
Unity & GooglizerUnity & Googlizer
Unity & Googlizer
 
使用 Multi-sites 技術快速建置多 Drupal 網站
使用 Multi-sites 技術快速建置多 Drupal 網站使用 Multi-sites 技術快速建置多 Drupal 網站
使用 Multi-sites 技術快速建置多 Drupal 網站
 
歡迎來到 Ubuntu 9.10 Release Party (台中)
歡迎來到 Ubuntu 9.10 Release Party (台中)歡迎來到 Ubuntu 9.10 Release Party (台中)
歡迎來到 Ubuntu 9.10 Release Party (台中)
 
無痛入門 Chromecast
無痛入門 Chromecast無痛入門 Chromecast
無痛入門 Chromecast
 
Ubuntu 藍星侵略計劃
Ubuntu 藍星侵略計劃Ubuntu 藍星侵略計劃
Ubuntu 藍星侵略計劃
 
Intro of Network, WiFi on Ubuntu
Intro of Network, WiFi on UbuntuIntro of Network, WiFi on Ubuntu
Intro of Network, WiFi on Ubuntu
 

Zabbix: The easy to use monitoring tools