Hobbit-Trap

Here's how I installed the various packages for Hobbit-Trap on Linux:


Perl modules from CPAN

 /usr/bin/perl -MCPAN -e shell
 cpan> install Text::Autoformat
 cpan> install Text::ParseWords
 cpan> install Getopt::Long
 cpan> install Config::IniFiles
 cpan> install Time::HiRes
 cpan> install Sys::Syslog
 cpan> install DBI
 cpan> install DBD::mysql      
   You may have to run 'force install DBD::mysql' 
   if you don't have a local MySQL server or the
   test accounts used don't work.


Net-SNMP - http://net-snmp.sourceforge.net/
 configure --enable-shared --with-perl-modules
 make
 make test
 make install


SNMPTT   - http://snmptt.sourceforge.net/
 cp snmptt /usr/local/sbin
 cp snmpttconvert /usr/local/sbin
 cp snmpttconvertmib /usr/local/sbin
 cp snmptthandler /usr/local/sbin
 chmod +x /usr/local/sbin/snmptt*
 cp snmptt.ini /etc/snmp

If you have and want to use MySQL, create the database for SNMPTT with this SQL script:
    mysql -u root -p

    CREATE DATABASE snmptt;
    USE snmptt;

    DROP TABLE snmptt;;
    CREATE TABLE snmptt (
    id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    eventname VARCHAR(50),
    eventid VARCHAR(50),
    trapoid VARCHAR(100),
    enterprise VARCHAR(100),
    community VARCHAR(20),
    hostname VARCHAR(100),
    agentip  VARCHAR(16),
    category VARCHAR(20),
    severity VARCHAR(20),
    uptime  VARCHAR(20),
    traptime VARCHAR(30),
    formatline VARCHAR(255));

    USE snmptt;

    DROP TABLE snmptt_unknown;;
    CREATE TABLE snmptt_unknown (
    id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    trapoid VARCHAR(100),
    enterprise VARCHAR(100),
    community VARCHAR(20),
    hostname VARCHAR(100),
    agentip  VARCHAR(16),
    uptime  VARCHAR(20),
    traptime VARCHAR(30),
    formatline VARCHAR(255));

    GRANT ALL PRIVILEGES ON *.* TO 'snmptt'@'localhost' IDENTIFIED BY 'mytrap' WITH GRANT OPTION;



SEC      - http://simple-evcorr.sourceforge.net/
 cp sec.pl /usr/local/bin
 cp sec.pl.man /usr/local/man/man1
