There is no ready-made perl script that will fit your problem; you will have to come up with a good design for your project yourself. Some of the questions you might face are
- Exactly which parameters need to be monitored?
- Which parameters will be monitored directly on the server, and which will be monitored remotely?</Ii>
- How will the different processes that monitor the individual servers communicate with your master processes? (e.g. sockets)
- How will the monitoring be administrated? (e.g. web interface)
Then, once you have broken down your project into small tasks, it will be easier to solve the individual problems. You will find that CPAN has many modules available that will help you solve your subproblems, and that your code will mostly be glue code to combine the services these modules provide.
Apart from the modules recommended, also take a look at the WIN32 suite of modules -- they give you a feel of what is at your disposal to monitor a Windows system. You will find that you can even browse the registry or call OLE/COM objects -- probably more than you need.
And for those problems you feel you can't handle, you can ask more precise questions here, at PerlMonks (the more precise, the better we will be able to help you), e.g.:
- How to find out free disk space on Windows?
- How to communicate via sockets between two processes in a network (hint: see the perlfunc manpage as well as the Perl FAQ)?
- How to find out whether a server is running a web server? (hint: try to connect to it and getting a page, e.g. using LWP)
- How to find out whether a server is exporting the correct shares? (hint: there's a module on CPAN to list shares on a SMB machine)
etc. Hope this gives you an idea of how to start.
If you don't know much about Perl at all, I suggest you grab a copy of e.g. Learning Perl first and invest at least three days writing small scripts to hone your skill. You could try your hand at solving some of your small subproblems at this stage (e.g. getting a web page from a web server). It will save you a lot of time later, when you design and implement your master monitoring software.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.