Zabbix监控

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Zabbix监控相关的知识,希望对你有一定的参考价值。

zabbix on CentOS 7
zabbix:2.0,2.2,2.4
epel
zabbix20
zabbix22
Linux开源监控系统:
nagios
cacti
zabbix:
ganglia

    zabbix-2.4
        mariadb

实验环境:
主机名称:node1.smoke.com master
操作系统:CentOS 7.5
内核版本:3.10.0-862.el7.x86_64
网卡1:vmnet0 172.16.100.67
网卡2:vmnet8 dhcp
主机名称:node2.smoke.com
操作系统:CentOS 7.5
内核版本:3.10.0-862.el7.x86_64
网卡1:vmnet0 172.16.100.68
网卡2:vmnet8 dhcp
主机名称:node3.smoke.com
操作系统:Windows xp
网卡1:172.16.100.69

系统配置:
node1:zabbix-server

[[email protected] ~]# hostname
node1.smoke.com
[[email protected] ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:67:e5:70 brd ff:ff:ff:ff:ff:ff
    inet 172.16.100.67/24 brd 172.16.100.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::7382:eaed:fa1f:633f/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:67:e5:7a brd ff:ff:ff:ff:ff:ff
    inet 192.168.243.128/24 brd 192.168.243.255 scope global noprefixroute dynamic ens37
       valid_lft 1052sec preferred_lft 1052sec
    inet6 fe80::9612:1176:5405:40dd/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
[[email protected] ~]# ip route show
default via 192.168.243.2 dev ens37 proto dhcp metric 101
172.16.100.0/24 dev ens33 proto kernel scope link src 172.16.100.67 metric 100
192.168.243.0/24 dev ens37 proto kernel scope link src 192.168.243.128 metric 101
[[email protected] ~]# crontab -l
*/5 * * * * /usr/sbin/ntpdate time.nist.gov &> /dev/null
[[email protected] ~]# vim /etc/hosts
172.16.100.7   node1.smoke.com node1
172.16.100.8   node2.smoke.com node2
172.16.100.9   node3.smoke.com node3

node2:linux-agent

[[email protected] ~]# hostname
node2.smoke.com
[[email protected] ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:70:86:6c brd ff:ff:ff:ff:ff:ff
    inet 172.16.100.68/24 brd 172.16.100.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::d665:1c67:c985:a1cf/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:70:86:76 brd ff:ff:ff:ff:ff:ff
    inet 192.168.243.144/24 brd 192.168.243.255 scope global noprefixroute dynamic ens37
       valid_lft 1062sec preferred_lft 1062sec
    inet6 fe80::8e7:556e:fcc9:216f/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
[[email protected] ~]# ip route show
default via 192.168.243.2 dev ens37 proto dhcp metric 101
172.16.100.0/24 dev ens33 proto kernel scope link src 172.16.100.68 metric 102
192.168.243.0/24 dev ens37 proto kernel scope link src 192.168.243.144 metric 101
[[email protected] ~]# crontab -l
*/5 * * * * /usr/sbin/ntpdate time.nist.gov &> /dev/nulll
[[email protected] ~]# vim /etc/hosts
172.16.100.67   node1.smoke.com node1
172.16.100.68   node2.smoke.com node2
172.16.100.69   node3.smoke.com node3

node3:windows-agent

以上是关于Zabbix监控的主要内容,如果未能解决你的问题,请参考以下文章

zabbix使用zabbix_java_gateway 监控java应用进程

zabbix使用zabbix-java-gateway监控jvm/tomcat性能

日志文件报警监控脚本(可用于zabbix监控文件)测试中...

使用 zabbix 自动发现监控 MySQL

为主机添加zabbix监控

使用Zabbix+Grafana监控