zabbix3.4-- monitor TCP eleven kinds of state

1. Client Custom Key
[root @ web01 /etc/zabbix/zabbix_agentd.d]#vim iotps.conf
UserParameter = TCP_STATUS_ESTABLISHED, netstat -an | grep -c "the ESTABLISHED"

2. Verify the server
[root @ m01 / etc -k -s 172.16.1.7 TCP_STATUS_ESTABLISHED /zabbix/zabbix_agentd.d]#zabbix_get
2

3. Define the key in order to pass the Senate in the form
[root @ web01 /etc/zabbix/zabbix_agentd.d]#vim iotps.conf
UserParameter = TCP_STATUS [*], netstat -an | grep -c "$ 1"

4. The authentication server
[@ M01 /etc/zabbix/zabbix_agentd.d]#zabbix_get the root -s 172.16.1.7 TCP_STATUS -k [the ESTABLISHED]
2

5.zabbix the web page to add custom items to monitor

 

6.TCP following eleven kinds of state

CLOSE
CLOSE_WAIT
CLOSING
ESTABLISHED
FIN_WAIT1
FIN_WAIT2
LAST_ACK
LISTEN
SYN_SENT
SYN_RECV
TIME_WAIT

 

Guess you like

Origin www.cnblogs.com/chenwendong/p/11544326.html