Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_listen_tcp_udp.sh
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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
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
Reviews (2)
byninuzzo, May 22, 2013
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.
bygds, April 13, 2011
Thanks but it works only for the localhost