Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
This Nagios Plugin checks if there is any program listening on specified TCP/UDP port.
Current Version
Last Release Date
June 24, 2009
Owner
Nagios Exchange
Download URL
https://exchange.nagios.org/wp-content/uploads/project-files/2009/06/check_listen_tcp_udp.sh
check_listen_tcp_udp.sh version 0.1
This plugin is used to check if there is a listening socket on specified port with specified protocol (can be "tcp", "udp", "any").
Currently, the plugin uses following bash and Unix commands: - netstat - sed (with extended regular expression -- -r option) - grep (with extended regular expression -- -E option)
I think that the plugin may be easily improved and optimized, but it works fine for me.
example of use: To ensure that a DNS server is listening on localhost, with a TCP socket: $ check_listen_tcp_udp.sh -p 53 -P tcp -l 127.0.0.1
It does not require to send a message and an expected response like check_udp, but PLEASE change the #!/bin/sh shebang line into #!/bin/bash Almost everybody has bash and the script is using some bash-specific features, so does not run in sh in Linux.
Thanks but it works only for the localhost
You must be logged in to submit a review.
To:
From: