Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Zabbix: The easy to use monitoring tools

Zabbix: The easy to use monitoring tools

# 簡單易用的 Zabbix 監控服務
 
Zabbix,是個始於 1998 年的開源老將!雖不像新興的監控工具如此炫麗,但卻是個簡單易用,監控範圍涵蓋極廣的監控服務。這次凍仁將分享些入門 Zabbix 所需的相關知識,和自身的使用經驗給「DevOps Taiwan - Monitoring Tools 大亂鬥」的 DevOpser 們。
 
* 活動網址:https://devops.kktix.cc/events/monitoring-tools
 
#Zabbix #Intro #Monitoring #DevOpsTaiwan #DevOps #OpsDev

Chu-Siang Lai

May 27, 2018
Tweet

More Decks by Chu-Siang Lai

Other Decks in Technology

Transcript

  1. _______________________
    < 簡單易易⽤用的 Zabbix 監控服務 >
    -----------------------
    \
    \
    [ chusiang@DevOpsTaiwan ~ ]
    $ cat .profile
    # Author: 凍仁翔 / [email protected]
    # Blog: https://note.drx.tw
    # Modified: 2018-05-26 14:00
    .::!!!!!!!:.
    .!!!!!:. .:!!!!!!!!!!!!
    ~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
    :$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
    $$$$$##WX!: .$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
    ^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
    "*$bd$$$$ '*$$$$$$$$$$$o+#"
    """" """""""

    View full-size slide

  2. 關於我
    • 凍仁翔 (@chusiang_lai)。
    • 「凍仁的筆記」部落落客。
    • DevOps Taiwan 志⼯工。
    • 6 年年 IT 維運經驗。
    2

    View full-size slide

  3. 契機
    ⾝身為 IT ⼈人員,我們想導入監控

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

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

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

    顧客告知。
    !3

    View full-size slide

  4. 契機
    ⾝身為 IT ⼈人員,我們想導入監控

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

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

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

    顧客告知。
    !4

    View full-size slide

  5. 1. Zabbix 是什什麼?
    2. 怎麼簡單地部署 Zabbix?
    3. 怎麼使⽤用 Zabbix?
    4. 凍仁都怎麼⽤用 Zabbix?
    Outline
    Usage
    What
    Deploy
    Case
    5

    View full-size slide

  6. Ⅰ. Zabbix 是什什麼?
    Usage
    What Deploy Case
    !6

    View full-size slide

  7. https:/
    /youtu.be/ATe_G6edk9A
    !7

    View full-size slide

  8. Zabbix 基於 C 和 LAMP 架構。
    Server
    GNU / Linux
    C PHP
    ZABBIX
    Apache MySQL
    !8

    View full-size slide

  9. 硬體配置範例例
    級距 平台 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

    View full-size slide

  10. Windows
    Agent
    Zabbix
    Server
    macOS
    Linux
    Passive Checks (Pull)
    Default
    !10
    ※ Like “Nagios Remote Plugin Executor”.

    View full-size slide

  11. Windows
    Agent
    Zabbix
    Server
    macOS
    Linux
    Active Checks (Push)
    Recommend
    !11
    ※ Like “Nagios Service Check Acceptor”.

    View full-size slide

  12. Add Proxy (Option)
    !12
    Tuning
    Windows
    Agent
    Zabbix
    Server
    macOS
    Linux Proxy
    Server

    View full-size slide

  13. Ⅱ. 怎麼簡單地部署 Zabbix?
    Deploy
    What Usage Case
    !13

    View full-size slide

  14. https://github.com/chusiang/zabbix.dockerize/

    View full-size slide

  15. $ 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

    View full-size slide

  16. https:/
    /bit.ly/2J7icq6
    !16

    View full-size slide

  17. Ⅲ. 怎麼使⽤用 Zabbix?
    Usage
    What Deploy Case
    !17

    View full-size slide

  18. https:/
    /bit.ly/2IKFHWu
    !18

    View full-size slide

  19. 1. Hosts & Host groups:被監控主機與主機群組。
    !19

    View full-size slide

  20. 2. Templates:封裝 Items、Triggers … 等的集合。
    !20

    View full-size slide

  21. 3. Items:Zabbix 真正監控的度量量指標 (metrics)。
    !21

    View full-size slide

  22. !22
    4. Triggers & Events:

    當 Item < 或 > 某條件時,即會觸發事件。

    View full-size slide

  23. !23
    5. Actions:

    當事件被觸發,且符合特定條件時,會⾃自動執⾏行行的動作。

    View full-size slide

  24. Ⅳ. 凍仁都怎麼⽤用 Zabbix?
    Usage
    What Deploy Case
    !24

    View full-size slide

  25. 1. ⾃自動加入監控主機。
    • 啟⽤用 Zabbix 的 Auto Registration action。

    • 藉由 Ansible 部署 zabbix-agent。

    View full-size slide

  26. https://galaxy.ansible.com/chusiang/zabbix-agent/

    View full-size slide

  27. 2. 整合 Chat (HipChat、Slack、Rocket.Chat、Microsoft
    Teams) 發送 Alert。

    View full-size slide

  28. 3. Web Monitoring:監控網站狀狀態、回應速度。

    View full-size slide

  29. 4. 建立儀表板 (Screens),以便便追蹤系統效能和例例外⼯工作。

    View full-size slide

  30. 5. 整合 LDAP。
    6.

    View full-size slide

  31. 6. Discovery (Ping、SSH、HTTP、TCP、Zabbix-agent。
    7.

    View full-size slide

  32. 7. 建置簡易易型⾃自禦性修復機制。

    View full-size slide

  33. Third-party plugins - https://share.zabbix.com/

    View full-size slide

  34. 34
    今天提的 DevOps 是什什麼?

    View full-size slide

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

    View full-size slide

  36. ⽀支援 Debian、Ubuntu、Nginx 和 PostgreSQL 等不同架構。
    Server
    GNU / Linux
    C PHP
    ZABBIX
    Nginx PostgreSQL
    !36

    View full-size slide

  37. Split Database
    !37
    Windows
    Agent
    Zabbix
    Server
    macOS
    Linux Database
    Tuning Ⅱ
    Proxy

    View full-size slide

  38. Support Docker ?
    Try the `dockbix-agent\

    -xxl-limited` image.

    > https://dockr.ly/2KUykIF
    !38

    View full-size slide

  39. Grafana x Zabbix

    View full-size slide

  40. Networking
    10%
    Platform
    40%
    Web
    60%
    DB
    80%
    Apps
    90%
    Monitoring








    !40

    View full-size slide

  41. • 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

    View full-size slide

  42. DevOps Taiwan
    https://t.me/devopstw
    https://fb.me/groups/DevOpsTaiwan/
    https://devopstw.club/
    !42

    View full-size slide

  43. Ansible Taiwan
    https://t.me/ansible_tw
    https://github.com/ansible-tw
    http://ansible.tw
    !43

    View full-size slide

  44. http://萍⽔水相逢.tw
    !44

    View full-size slide

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

    View full-size slide