Solved

UDP port monitoring

Posted on 2004-10-08
4
840 Views
Last Modified: 2008-03-10
I would like to build a simple program that will monitor different UDP ports on a number of servers I have employed.  I want the program to be run as a cronjob, and notify me of any downs that it detects.

The problem I'm having is getting a guarenteed UDP response when I need to detect if the port is responding or not.

 Do I need to setup a UDP client for each server that I expect to be on that port?   Or is there a guarenteed way to receive a UDP response indicating that there is a server responding on said port?  The types of UDP applications that I can expect to monitor are:

DNS server
Half Life/Counter Strike server
Team Speak server
echo server
daytime server

Thank you for your help.
0
Comment
Question by:vancetech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
kandura earned 125 total points
ID: 12264625
Have you considered using nmap?

    nmap -sU -p 53 localhost

works nicely on my dns server.
It can take a list of ports after the -p, and a list of hosts.
0
 

Author Comment

by:vancetech
ID: 12264689
I was hoping to use just default Perl modules to avoid any portability or re-installation work that would need to be done.  By default I don't have nmap installed on my linux system.

Thank you for that suggestion.
0
 

Author Comment

by:vancetech
ID: 12264708
nmap does has an interesting description of UDP port monitoring that may be useful:

UDP scans: This method is used to determine which UDP (User Datagram Protocol, RFC 768) ports  are  open
              on  a  host.   The  technique  is  to send 0 byte udp packets to each port on the target machine.  If we
              receive an ICMP port unreachable message, then the port is closed.  Otherwise we assume it is open.
0
 
LVL 18

Expert Comment

by:kandura
ID: 12264720
heh :)

You saved me from having to dive into IO::Socket::INET and udp, phew!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question