
= SNMP traps =

The snmptrap feature is used for event based reporting, like no-signal
detection.

Currently implemented:

*  "no_signal" / streamNoSignal trap (cleared with eventSeverity=0)

A future/planned trap type is "ttl_change", which traps on changes
in the Time-To-Live (TTL).

== Config options ==

Add the following lines to your config "/etc/iptv-analyzer/collector.conf":

 snmptraphost  = your-trap-host
 snmpcommunity = public

== Base OID ==

Use enterprise OID from ComX Networks A/S (IANA assigned) as base OID:

 .1.3.6.1.4.1.26124

Using sub OID 43 for the IPTV-Analyzer:

 .1.3.6.1.4.1.26124.43

== The MIB definition ==

The MIB is located in:
 snmp/mibs/

Two MIB files IPTV-ANALYZER-MIB.txt and CXNET-CORE-MIB.txt

== Installing MIBs ==

=== Manual installing the MIBs  ===

Manual installing the MIBs, for usage with snmp tools:

 cd snmp/mibs
 cp CXNET-CORE-MIB.txt    /usr/share/snmp/mibs/
 cp IPTV-ANALYZER-MIB.txt /usr/share/snmp/mibs/

Testing they can be decoded:

 snmptranslate -m CXNET-CORE-MIB 1.3.6.1.4.enterprises.cxnet
 snmptranslate -m IPTV-ANALYZER-MIB -Of 1.3.6.1.4.1.26124.43.1.1
 snmptranslate -m IPTV-ANALYZER-MIB -Of 1.3.6.1.4.1.26124.43.2.2.2

=== ZenOSS and MIBs ===

Importing the MIBs into ZenOSS.

First copy file to where ZenOSS keps its MIB files.  (Notice I renamed
the files to make them look more like the ZenOSS naming scheme.)

  export ZENOSS_MIBS=/usr/local/zenoss/share/mibs/site/
  cd snmp/mibs
  cp CXNET-CORE-MIB.txt    ${ZENOSS_MIBS}/cxnet-core.mib
  cp IPTV-ANALYZER-MIB.txt ${ZENOSS_MIBS}/iptv-analyzer.mib

Import these into ZenOSS:

  su - zenoss
  export ZENOSS_MIBS=/usr/local/zenoss/share/mibs/site/
  cd ${ZENOSS_MIBS}
  zenmib run -v 10 cxnet-core.mib iptv-analyzer.mib

Notice, that both files need to be specified together, or else it
cannot find the Enterprice OID mapping, and stuff does not work.

See if the MIB got imported and decoded via your webbrowser:

 http://zenoss.yourdomain.dk:8080/zport/dmd/Mibs/mibs/IPTV-ANALYZER-MIB/

== Sending an SNMP test trap ==

In "collector/bin" there is a script for generating test traps:

  cd collector/bin
  ./generate-test-snmptrap.pl --help


= NOTES =

== Debian software packages ==

=== Important ===

 libnet-snmp-perl  -- Net::SNMP

=== Unimportant ===

 snmp - SNMP (Simple Network Management Protocol) applications
 snmp-mibs-downloader


== Hints on Writing a MIB file ==

Helper links used when writing the MIB file describing the traps.

SNMP v2 traps uses "NOTIFICATION-TYPE" for traps.
[http://www.freesoft.org/CIE/RFC/1902/59.htm]

[http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap.html]

Example see: /usr/share/mibs/ietf/OSPF-TRAP-MIB
