-
Problem report
-
Resolution: Fixed
-
Trivial
-
None
-
3.4.8
-
None
-
FreeBSD
Steps to reproduce:
- Update DebugLevel=5 in zabbix_agentd.conf
- Run Test
- zabbix_get -s testserver -k "net.tcp.listen[5010]"
- zabbix_get -s testserver -k "net.tcp.listen[5025]"
- zabbix_get -s testserver -k "net.tcp.listen[5007]"
Result:
netstat LISTEN
~ # netstat -na |grep LIST tcp4 0 0 10.2.36.169.5025 *.* LISTEN tcp4 0 0 127.0.0.1.5010 *.* LISTEN tcp4 0 0 *.5007 *.* LISTEN
Debug log entry where it checks port 5010 and returns 0
57847:20180523:072228.859 EXECUTE_STR() command:'netstat -an | grep '^tcp.*\.5010[^.].*LISTEN' | wc -l' len:8 cmd_result:' 0' 57847:20180523:072228.859 Sending back [0] 57838:20180523:072255.419 EXECUTE_STR() command:'netstat -an | grep '^tcp.*\.5025[^.].*LISTEN' | wc -l' len:8 cmd_result:' 0' 57838:20180523:072255.419 Sending back [0] 57841:20180523:072300.565 EXECUTE_STR() command:'netstat -an | grep '^tcp.*\.5007[^.].*LISTEN' | wc -l' len:8 cmd_result:' 0' 57841:20180523:072300.565 Sending back [0]
Manual entry running same command
# netstat -an | grep '^tcp.*\.5010[^.].*LISTEN' | wc -l 1 # netstat -an | grep '^tcp.*\.5025[^.].*LISTEN' | wc -l 1 # netstat -an | grep '^tcp.*\.5007[^.].*LISTEN' | wc -l 1
Expected:
Expecting to receive a 1 since the ports are listening.