07-22-2010 07:48 PM
I am in need of a perl script which simultaneously connects to multiple hosts and ports and checks there availability based on the success or failure of making a connection on a port.
Though I have a bare bone script which does check for the health of the port on A host but I need something which checks for 50+ ports on 50+ hosts in parallel.
I want to have a script which checks for this in parallel and returns success or failure immediately for a single host/port.
Want to have a config file which keeps the information about ports and hosts separately.
The goal is to integrate this into Xymon(aka Hobbit) so that each port/host combination can be shown separately.
Going forward I want to scale this script so it can also do a POST/GET on URLs to check for the health of the applications. If this is something which you already have and can share that would be great along with the port-checker.
The other way I am thinking is to use the current script I have which checks for a single port/host to reference multiple config files each one having a combination of host/port so that if a new host/port needs to be added then I dont have to change the script.
Any new design ideas are welcome and how it can be utilized into Xymon so that the each host/port combination's status can be shown real time.
07-23-2010 02:29 AM
You could use an application called Nagios. Check this link:
It very easy to check services/hosts availability.
07-23-2010 05:31 PM
And you are offering to pay how much?
You might look to leveraging Net::Telnet as a connection vehicle for various ports. Of course, Perl fork()s might be helpful in performing your parallel operations.