1) Use God's syslog output and rsyslog's omsnmp module. Done with a little bit of config of rsyslog
c) Create something like this in the config file (note: not tested, just out of my head)
# Define the custom Syslogger event contact handler
require 'snmp'
module God
module Contacts
class SNMPTrap < Contact
class << self
attr_accessor :level, :message
end
def valid?
valid = true
valid &= complain("Attribute 'level' must be specified", self) unless arg(:level)
valid
end
attr_accessor :level, :message
def notify(message, time, priority, category, host)
SNMPTrapObjectThingy.doSomething(arg(:level), arg(:message) || message)
rescue Object => e
applog(nil, :info, "SNMPTrap failed")
applog(nil, :debug, e.backtrace.join("\n"))
end
end
end
end