Package: trapperkeeper
TrapperKeeper=============Description-----------TrapperKeeper is a suite of tools for ingesting and displaying SNMPtraps. This is designed as a replacement for snmptrapd and to supplementexisting stateful monitoring solutions.Normally traps are stateless in nature which makes it difficult tomonitor with a system like nagios which requires polling a source.TrapperKeeper will store traps in an active state for a configuredamount of time before expiring. This makes it possible to poll theservice for active traps and alert off of those traps.One example might be a humidity alert. If you cross over the humiditythreshold and it clears immediately you might not want to be paged at3am. But if it continues to send a trap every 5 minutes while it's overthat threshold the combination of (host, oid, severity) will remain inan active state as long as that trap's expiration duration is longerthan 5 minutes. This allows something like nagios to alarm when a singletrap remains active for greater than some period of time.Another benefit is allowing aggregation of pages. Previously we'd justhad an e-mail to a pager per trap but now we're only paged based on thealert interval regardless of how many traps we receive. This also allowsus to schedule downtime for a device during scheduled maintenance toavoid trap storms.Requirements------------Ubuntu~~~~~~.. code:: bash$ sudo apt-get install libmysqlclient-dev libsnmp-devInstallation------------New versions will be updated to PyPI pretty regularly so it should be aseasy as:.. code:: bash$ pip install trapperkeeperOnce you've created a configuration file with your database informationyou can run the following to create the database schema... code:: bash$ python -m trapperkeeper.cmds.sync_db -c /path/to/trapperkeeper.yamlTools-----trapperkeeper~~~~~~~~~~~~~The trapperkeeper command receives SNMP traps and handles e-mailing andwriting to the database. An example configuration file withdocumentation is available `here. <conf/trapperkeeper.yaml>`__trapdoor~~~~~~~~trapdoor is a webserver that provides a view into the existing traps aswell as an API for viewing the state of traps. An example configurationfile with documentation is available `here. <conf/trapdoor.yaml>`__.. figure:: https://raw.githubusercontent.com/dropbox/trapperkeeper/master/images/trapdoor.png:alt: ScreenshotScreenshotAPI^^^/api/activetraps''''''''''''''''**Optional Parameters:** \* host \* oid \* severity**Returns:**.. code:: javascript[(<host>, <oid>, <severity>)]/api/varbinds/''''''''''''''**Returns:**.. code:: javascript[{"notification_id": <notification_id>,"name": <varbind_name>,"pretty_value": <pretty_value>,"oid": <oid>,"value": <value>,"value_type": <value_type>}]MIB Configuration-----------------``trapperkeeper`` and ``trapdoor`` use the default mibs via netsnmp. Youcan see the default path for your system by running``net-snmp-config --default-mibdirs``. You can use the followingenvironment variables usually documented in the ``snmpcmd`` man pageMIBS - The list of MIBs to load. Defaults toSNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:SNMP-VACM-MIB.MIBDIRS - The list of directories to search for MIBs. Defaults to/usr/share/snmp/mibs.For example I run both the ``trapperkeeper`` and ``trapdoor`` commandswith the following environment to add a directory to the path and loadall mibs.``MIBS=ALL MIBDIRS=+/usr/share/mibs/local/``TODO-----  Allow Custom E-mail templates for TrapperKeeper-  cdnjs prefix for local cdnjs mirrors-  User ACLs for resolution-  Logging resolving userKnown Issues-------------  Doesn't currently support SNMPv3-  Doesn't currently support inform-  Certain devices have been known to send negative TimeTicks. pyasn1fails to handle this.