Recently, some basic monitoring metrics, such as disk usage and network card, were found missing in the review. Different machine configurations make it difficult to configure a unified template. However, zabbix in the new version has a function of Low-level discovery, which can automatically generate the required monitoring based on the host configuration, you only need to input macro variables. For example, monitoring the outbound traffic of each Nic. net. if. out [{# IFNAME}]: monitors the speed OS of the NIC. get [NetworkCardSpeed, {# IFNAME}] In some cases, the NIC will change from 100 M to M, so the related trigger is added:
{os.get[NetworkCardSpeed,{#IFNAME}].last(0)}<1000
There are two details: 1) the item of the new version of network card speed is OS. get [NetworkCardSpeed, xxxx]. When the speed of the network card is unknown, the result is 0.
zabbix_get -s 127.0.0.1 -k'os.get[NetworkCardSpeed,eth2]'0To exclude this situation, change the trigger to the following rule:
{os.get[NetworkCardSpeed,{#IFNAME}].last(0)}<1000 &{os.get[NetworkCardSpeed,{#IFNAME}].last(0)}#0You can use the following SQL statement to view the machine with a speed of MB:
selectdistinct(a.host),c.ip,b.name,b.lastvalue from hosts a,items b,interface c where a.hostid=c.hostid and a.hostid=b.hostid andb.key_ like'os.get[NetworkCardSpeed%'and b.lastvalue='1000';2) about bonding, because the shuffle phase of datanode requires a large number of network operations, it is easy to encounter network card bottlenecks. Therefore, datanode generally performs the bonding of the network card. The commonly used mode is 6, according to the principle, the traffic of outgoing and incoming should be roughly the same, but in actual conditions, the traffic of outgoing is generally average, while the traffic of incoming is greatly different, the following is the result of a sar:
14: 24 minutes 28 seconds IFACE rxpck/stxpck/srxbyt/stxbyt/srxcmp/stxcmp/srxmcst/s14: 24 minutes 29 seconds eth0 6.93 28139.60 473.27 41837599.01 0.00 0.00 6.9314: 24 minutes 29 seconds eth1 29448.51 31732.67 1929669.31 47286517.82 0.00 0.00 6.9314 hour 24 minute 29 seconds bond0 29455.45 59872.28 1930142.57 89124116.83 0.00 0.00 13.86In addition, if a network card changes from m to M, there will not be a short board effect (previously thought there will be a short board effect), but traffic distribution will be done according to the speed situation, the speed traffic is large, low speed traffic is small. In addition, pay attention to the meaning of the miimon parameter in the bonding configuration. It is a direct connection link between the server and the switch. If the upper-layer link of the switch has a problem, it will not work. The ha of the switch link needs to consider Ethernet channels and other technologies ..