Rather than a hard-wired system you write yourself, you might want to get familiar with Net-SNMP. Using NetSNMP you can monitor a the local host OS, remote OSes, routers, switches, firewalls, and much more. You can then wrap around that in Perl with, for example, Net::SNMP.

As for a place to monitor the monitoring, there's always Mon, nagios, or Big Brother. There's also Argus, which is written in Perl itself and has a plugin module system.

I used to monitor DNS, SMTP, POP3, IMAP, RADIUS, HTTP, MySQL, and more servers for their server protocols, memory usage, disk usage, processor load, temperature, and network throughput with this combination. I also used Argus to monitor dozens of routers, switches, firewalls, and ISDN/dialup access concentrators that had their own SNMP implementations that came with them.

Argus can be configured to email you when very particular circumstances happen (like after a router interface shows down once on its 5-minute test, it'll test every 30 seconds until it's back up and email you if it's not up within 7 minutes of showing down). It handles a dependency tree so that it doesn't test devices it can't reach because of a failure in the middle.

Doing the work in Perl is a good thing, because Perl is well-suited to this kind of project. Since there's already a good solution written in Perl, perhaps you should take a look at it before reinventing this particular wheel.


In reply to Re: get system info using perl by mr_mischief
in thread get system info using perl by saurabh.hirani

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.