January 2019
Intermediate to advanced
798 pages
20h 33m
English
We're now gathering data on all open connections. But looking at the netstat output, we can see connections in different states, such as TIME_WAIT and ESTABLISHED:
tcp 0 0 127.0.0.1:10050 127.0.0.1:60774 TIME_WAIT tcp 0 0 192.168.56.10:22 192.168.56.1:51187 ESTABLISHED
If we want to monitor connections in different states, would we have to create a new user parameter for each? Fortunately, no. Zabbix supports so-called flexible user parameters, which allow us to pass parameters to the command executed.
Again, edit zabbix_agentd.conf and modify the user parameter line we added before to read as follows:
UserParameter=net.tcp.conn[*],netstat -nt | grep ^tcp | grep -c "$1"
Read now
Unlock full access