Respected Monks,

I have written perl scripts to automate some health check on various storage devices. To that end, I find Perl extremely flexible and sheer joy to code in.

However, I am now planning to write a script that will monitor the storage device and if any failure occurs, it will send out an email. I have very basic idea of how SNMP works and I have been through the Net::SNMP documentation, but not sure how it will talk to the SNMP server, or will ports 161, 162 need to be opened from / to the server on which the script is running & the SNMP Server?

Please note, I am not looking for ready made code. I just need pointers.

I just realized that I need to read up on SNMP as well to really understand how it works, but in the interim, any pointers you provide will be a great help. I was here a long time ago and you folks had suggested some truly amazing modules and some great pointers...hoping for the same this time too.


In reply to Perl script for capturing SNMP Alerts. by pritesh_ugrankar

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.