Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl script mionitor/control linux services

Status
Not open for further replies.

jrwinterburn

IS-IT--Management
Jul 26, 2004
72
GB
Hi all,

I have created an ASP.NET intranet that monitors and controls all the Windows services etc in my network. I need to add to this so I can control and monitor services on my Linux and Solaris boxes.

I realise that doing this in ASP.NET is probably impossible or very difficult, but no doubt I can do this in Perl. But where do I start? All I really want is a page that refreshes every 60 seconds, running "service asterisk status" (and others), and be able to click a button to stop/start/restart services. Also, sending an email when a service is dead would be good. This page would preferably run on a remote server (connecting remotely to the Linux/Sun servers)

Any pointers on how I achieve this would be appreciated - I have tried googling but to no avail - even an online tutorial on doing this would be useful! I could use Webmin, but it's overkill for what I want (and I want to do this myself!)

Thanks

Jon
 
Net::SSH is probably a good place to start

This will allow you to run commands on a remote Solaris or Linux box, and get your hands on the output...

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Perfect! Thanks Steve, just what I was looking for. Never thought to search on cpan (doh!). Thanks again.
 
There is a huge amount of good stuff on CPAN. Whenever you have a problem to solve, there is a good chance that someone else has already "been there and done that". So you don't have to re-invent the wheel...

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top