|
@@ -0,0 +1,53 @@
+--- db/nagtrap-1.5.sql.orig 2013-11-02 12:27:07.784398490 +0100
++++ db/nagtrap-1.5.sql 2013-11-02 12:30:19.791832983 +0100
+@@ -41,7 +41,7 @@
+ `formatline` varchar(255) DEFAULT NULL,
+ `trapread` int(11) DEFAULT '0',
+ PRIMARY KEY (`id`)
+-) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1820395 ;
++) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+ --
+ -- Dumping data for table `snmptt`
+@@ -71,7 +71,7 @@
+ `formatline` varchar(255) DEFAULT NULL,
+ `trapread` int(11) DEFAULT '0',
+ PRIMARY KEY (`id`)
+-) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=131 ;
++) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+ --
+ -- Dumping data for table `snmptt_archive`
+@@ -92,7 +92,7 @@
+ `jobtime` int(50) NOT NULL,
+ `message` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+-) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
++) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+ --
+ -- Dumping data for table `snmptt_jobs`
+@@ -114,7 +114,7 @@
+ `total_translated` bigint(20) DEFAULT NULL,
+ `total_ignored` bigint(20) DEFAULT NULL,
+ `total_unknown` bigint(20) DEFAULT NULL
+-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
++) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+ --
+ -- Dumping data for table `snmptt_statistics`
+@@ -128,7 +128,7 @@
+ --
+
+ CREATE TABLE IF NOT EXISTS `snmptt_unknown` (
+- `id` mediumint(9) NOT NULL,
++ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `trapoid` varchar(100) DEFAULT NULL,
+ `enterprise` varchar(100) DEFAULT NULL,
+ `community` varchar(20) DEFAULT NULL,
+@@ -138,4 +138,4 @@
+ `traptime` varchar(30) DEFAULT NULL,
+ `formatline` varchar(255) DEFAULT NULL,
+ `trapread` int(11) DEFAULT '0'
+-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
++) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
@@ -0,0 +1,50 @@
+--- plugin/plugin_db.conf.orig 1970-01-01 01:00:00.000000000 +0100
++++ plugin/plugin_db.conf 2013-11-02 12:36:52.674511386 +0100
+@@ -0,0 +1,6 @@
++my $dbHost = "localhost";
++my $dbName = "snmptt";
++my $dbUser = "<YOUR DB USER>";
++my $dbPass = "<YOUR DB PASSWORD>";
++my $dbTable = "snmptt";
++my $dbTableUnknown = "snmptt_unknown";
+--- plugin/check_jobs.pl.in.orig 2013-11-02 12:34:30.935086664 +0100
++++ plugin/check_jobs.pl.in 2013-11-02 12:35:44.486705000 +0100
+@@ -21,11 +21,7 @@
+ #
+ #
+ # ==================== Database connect information ====================
+-my $dbHost = "localhost";
+-my $dbName = "nagtrap";
+-my $dbUser = "root";
+-my $dbPass = "";
+-my $dbTable = "snmptt_jobs";
++require "@sysconfdir@/plugin_db.conf";
+
+ # ==================== Debugging ====================
+ my $enableDebug = "0";
+--- plugin/check_snmptraps.pl.in.orig 2013-11-02 12:34:21.551088535 +0100
++++ plugin/check_snmptraps.pl.in 2013-11-02 12:36:37.966708859 +0100
+@@ -21,12 +21,7 @@
+ #
+ #
+ # ==================== Database connect information ====================
+-my $dbHost = "localhost";
+-my $dbName = "snmptt";
+-my $dbUser = "<YOUR DB USER>";
+-my $dbPass = "<YOUR DB PASSWORD>";
+-my $dbTable = "snmptt";
+-my $dbTableUnknown = "snmptt_unknown";
++require "@sysconfdir@/plugin_db.conf";
+
+ # ==================== Debugging ====================
+ my $enableDebug = "0";
+--- plugin/Makefile.in.orig 2013-11-02 12:37:12.738512929 +0100
++++ plugin/Makefile.in 2013-11-02 12:38:01.450322856 +0100
+@@ -38,6 +38,7 @@
+ install:
+ for file in *.pl; \
+ do $(INSTALL) -m 755 $(INSTALL_OPTS) $$file $(DESTDIR)$(MONITORING_LIBEXECDIR); done
++ $(INSTALL) -m 644 $(INSTALL_OPTS) plugin_db.conf $(DESTDIR)$(SYSCONFDIR)
+
+ clean:
+ rm -f Makefile
|