1752762 Members
5048 Online
108789 Solutions
New Discussion юеВ

Monitoring script

 
Allanm
Super Advisor

Monitoring script

Hi Folks,

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.

Thanks,
Allan.
3 REPLIES 3
Horia Chirculescu
Honored Contributor

Re: Monitoring script

Hello,

You could use an application called Nagios. Check this link:

http://www.nagios.org/download/

It very easy to check services/hosts availability.

Best regards,
Horia.
Best regards from Romania,
Horia.
James R. Ferguson
Acclaimed Contributor

Re: Monitoring script

Hi Allan:

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.

Regards!

...JRF...
Srimalik
Valued Contributor

Re: Monitoring script

You might want to use perl threads.
Please see perlthrtut man.
abandon all hope, ye who enter here..