• 通过docker构建zabbix监控系统


    下载zabbix的镜像

    $ docker pull berngp/docker-zabbix                             

    Using default tag: latest

    latest: Pulling from berngp/docker-zabbix

    32c4f4fef1c6: Pulling fs layer

    050a83e3f91c: Pull complete

    。。。。。。

    Digest: sha256:f803e0bec1aec13b5c8a163f166fd50059c9d485ea83b3619aa070dd4dd93b3e

    Status: Downloaded newer image for berngp/docker-zabbix:latest

    新建一个zabbix的容器

    shiyanlou@iZ23zslbpciZ: ~/Desktop

     $ docker run -d \                                                   

    >            -p 10051:10051 \

    >            -p 10052:10052 \

    >            -p 80:80       \

    >            -p 2812:2812   \

    >            --name zabbix  \

    >            berngp/docker-zabbix

    7ef7352e69a61d4abc901e74576b9b63c0a595ad4796a5038579d5aac187f314

    查看新建zabbix容器的日志

     $ docker logs -f 7ef7352e69                                        

    Stopping mysqld:  [  OK  ]

    Initializing MySQL database:  Installing MySQL system tables...

    OK

    。。。。。。。。。

    Generated unique Monit id 13ba26796cf043cd2ef531562e0b4f39 and stored to '/root/.monit.id'

    Starting Monit 5.14 daemon with http interface at [*]:2812

    ^C%                                                                             FAIL

    查看ip:

    shiyanlou@iZ23zslbpciZ: ~/Desktop

     $ ifconfig                                                           [9:37:52]

    docker0   Link encap:\u4ee5\u592a\u7f51  \u786c\u4ef6\u5730\u5740 02:42:1d:f8:80:ba 

              inet \u5730\u5740:192.168.0.1  \u5e7f\u64ad:0.0.0.0  \u63a9\u7801:255.255.240.0

              UP BROADCAST RUNNING MULTICAST  MTU:1500  \u8dc3\u70b9\u6570:1

              \u63a5\u6536\u6570\u636e\u5305:18 \u9519\u8bef:0 \u4e22\u5f03:0 \u8fc7\u8f7d:0 \u5e27\u6570:0

              \u53d1\u9001\u6570\u636e\u5305:14 \u9519\u8bef:0 \u4e22\u5f03:0 \u8fc7\u8f7d:0 \u8f7d\u6ce2:0

              \u78b0\u649e:0 \u53d1\u9001\u961f\u5217\u957f\u5ea6:0

              \u63a5\u6536\u5b57\u8282:2110 (2.1 KB)  \u53d1\u9001\u5b57\u8282:970 (970.0 B)

     eth0      Link encap:\u4ee5\u592a\u7f51  \u786c\u4ef6\u5730\u5740 00:16:3e:00:6e:58 

              inet \u5730\u5740:10.117.217.114  \u5e7f\u64ad:10.117.223.255  \u63a9\u7801:255.255.248.0

              UP BROADCAST RUNNING MULTICAST  MTU:1500  \u8dc3\u70b9\u6570:1

              \u63a5\u6536\u6570\u636e\u5305:23212 \u9519\u8bef:0 \u4e22\u5f03:0 \u8fc7\u8f7d:0 \u5e27\u6570:0

              \u53d1\u9001\u6570\u636e\u5305:30602 \u9519\u8bef:0 \u4e22\u5f03:0 \u8fc7\u8f7d:0 \u8f7d\u6ce2:0

              \u78b0\u649e:0 \u53d1\u9001\u961f\u5217\u957f\u5ea6:1000

              \u63a5\u6536\u5b57\u8282:1429699 (1.4 MB)  \u53d1\u9001\u5b57\u8282:42893030 (42.8 MB)

    访问zabbix的主页:

    在IE中输入http://192.168.0.1:80,如果出现zabbix的主页,即表明zabbix安装成

    进入zabbix容器,查看一些基本信息:

    $ docker exec -it 7ef7352e /bin/bash                                 [9:59:54]

    [root@7ef7352e69a6 /]# cat /etc/issue

    CentOS release 6.8 (Final)

    Kernel \r on an \m

  • 相关阅读:
    Mysql 常用小技巧
    【JS学习】require('fs')(fs模块用于对系统文件及目录进行读写操作。)
    【JS学习】js中forEach与for循环
    【JS学习】ES6之async和await
    【JS学习】关于Vue.use()详解
    【Npm学习】npm run dev 和 npm run serve
    【Jenkins学习】修改插件下载源地址
    【JS学习】js中const,var,let区别
    【Go学习】知识分享之Golang——go mod时使用代理模式goproxy和私有模式GOPRIVATE
    【JS学习】export 和 export default 的区别
  • 原文地址:https://www.cnblogs.com/kingleoric/p/6422753.html
Copyright © 2020-2023  润新知