gnu@perl has asked for the wisdom of the Perl Monks concerning the following question:

First let me start with an apology. I'm sorry for the lack of information here, but I am COMPLETELY NEW to anything SNMP.

I have a simple little program that forks off a number of childred (20) to ping network hosts. It's pretty slick and efficient. It was originally written for a small group here in my office when they need to check the connectivity of our clients routers.

Appearently it is a little to nice, I have now been asked to SNMP enable it. We currently use a monitoring program (Netcool) to watch certain devices. The higher up-s in my company have heard of my ping program and now i have to send SNMP traps to the monitoring software when a destination dosen't respond for 'X' pings.

I like this idea and I am very eager to do it, only one problem, I KNOW NOTHING ABOUT SNMP. I have searched the web and am gaining an understanding, but I am on a tight timeline. I was hoping that someone could tell me how to send an SNMP trap from an application using NET::SNMP or point me to somewhere where I can figure it out. Quite frankly the doc on CPAN didn't clear anything up for me.

Also, I think I have a slight handle on creating the MIB, but some clarification on those or links would be greatly appreciated.

Thanks, Chad.

Replies are listed 'Best First'.
Re: NET::SNMP ??????
by traveler (Parson) on Feb 13, 2003 at 17:00 UTC
    A page with a module, sample code for a trap, and a pointer to a printed text is here. (BTW, the trap type in the example is "Link Down" which is probably the type you'll want to send...) You'll need a private MIB (1.3.6.1.4.1.x) and if you don't have an enterpriseID (I think that is the correct name) you can either fake it or register for one. In any case, the SNMP manager to whom you send your trap will have to know what to do with a trap from you. That means configuration at the SNMP manager.

    HTH, --traveler

      Hey, thanks. This will help quite a bit. I was able to get a small SNMP query to get the uptime of a server working. As far as the MIB goes, I am researching that at this time, it dosen't look like it will be that hard to do.

      The application we are using is dependant upon the MIB I believe. I am having them send me an example of the MIB on the system so I can 'clone' it.