Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_port.pl

Rating
8 votes
Favoured:
0
Current Version
1.3
Last Release Date
2011-04-06
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
License
GPL
Hits
141324
Files:
FileDescription
check_port.plcheck_port.pl
Nagios CSP

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!
A small perl script that checks to see if a TCP port is open on a remote host and produces timing statistics for nagios.
Tries to create a session to a remote TCP port to test if the port is available, it also can produce timing statistics for Nagios to collect.

check_port.pl -p -h (-c -w -v)
-p # port number to examine
-h # hostname or ip address to contact
-c # the number of seconds to wait before a going critical
-w # the number of seconds to wait before a flagging a warning
-v # creates nagios performance information

e.g check_port.pl -p 80 -h www.google.com -c 1.5 -w 1.0 -v
Reviews (2)
bymdsupersonic, June 7, 2016
How can I add this component to my Nagios XI?
bysu007, May 16, 2012
Works really well with minimal dependencies. I edited this to reverse the normal alert, in order to alert if RDP is accessible on windows hosts. It took maybe 5 quick changes, because it is clearly written.