> Ah, did you use any CPAN modules, or did you wrote all from scratch?
> Just out of curiosity.

For the purpose of sending we just used plain old Net::SNMP:

http://search.cpan.org/~dtown/Net-SNMP-v6.0.0/lib/Net/SNMP.pm

We obviously had our own MIB, and added a section to handle traps for
this purpose. The trap object contained items like:

* service name
* severity
* description
* ... etc ...

Same sort of stuff that nsca sends.

The sender was pretty straight forward - as sending a trap is not
rocket science.

For the collector we wrote our own listener. But I think a better way
to do it today would be to use this guy:

http://search.cpan.org/~hardaker/NetSNMP-TrapReceiver-5.0301/TrapReceiver.pm

Which hooks into snmptrapd - and treats your code like a callback.
Then its just as simple as stuffing it into the unix socket using the
format Nagios expects.

An alternative could be to roll our own NSCA receiver:

http://search.cpan.org/~bingos/POE-Component-Server-NSCA-0.08/lib/POE/Component/Server/NSCA.pm

That may be better to tune then the normal NSCA. I seem to recall the
main problems with NSCA was around how many concurrent connections it
could receive at one time. Switching to UDP or at least using a
receiver that is more concurrent can improve things. I could be wrong
- sorry - my memory of the issues are a bit vague :-).

ken.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to