标签:zab agentd 测试 tst server zabbix监控 ram grep end
#!/bin/bash
conn=`netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a,S[a]}‘ | grep "ESTABLISHED" | awk ‘{print $2}‘`
if [ $conn -le 1000 ]
then
echo 1
else
echo 0
fi
#vi ../etc/zabbix_agentd.conf
UserParameter=conn_nginx,bash /soft/zabbix_agent/scripts/conn_now
zabbix-server测试
zabbix_get -s 172.30.224.28 -p 9222 -k "conn_nginx"
标签:zab agentd 测试 tst server zabbix监控 ram grep end
原文地址:https://www.cnblogs.com/charon2/p/10349880.html