Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
icinga-nagtrap
> nagtrap-1.5.0_plugin.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nagtrap-1.5.0_plugin.patch of Package icinga-nagtrap (Revision 6)
Currently displaying revision
6
,
show latest
--- plugin/check_jobs.pl.in.orig 2013-11-02 12:34:30.935086664 +0100 +++ plugin/check_jobs.pl.in 2013-11-02 13:06:24.328934170 +0100 @@ -20,13 +20,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # -# ==================== Database connect information ==================== -my $dbHost = "localhost"; -my $dbName = "nagtrap"; -my $dbUser = "root"; -my $dbPass = ""; -my $dbTable = "snmptt_jobs"; - # ==================== Debugging ==================== my $enableDebug = "0"; my $debugLogFile = "@logdir@/check_jobs.log"; @@ -51,7 +44,14 @@ use utils qw($TIMEOUT %ERRORS &print_revision &support); use Time::HiRes qw(time); use DBI(); - +# ==================== Database connect information ==================== +our $dbHost; +our $dbName; +our $dbUser; +our $dbPass; +our $dbTable; +our $dbTableUnknown; +require "/etc/nagtrap/plugin_db.conf"; # ==================== Functions ==================== # Print Usage sub print_usage (){ --- plugin/check_snmptraps.pl.in.orig 2013-11-02 12:34:21.551088535 +0100 +++ plugin/check_snmptraps.pl.in 2013-11-02 13:06:10.584945654 +0100 @@ -20,14 +20,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # -# ==================== 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"; - # ==================== Debugging ==================== my $enableDebug = "0"; my $debugLogFile = "@logdir@/check_snmptraps.log"; @@ -67,7 +59,14 @@ use utils qw($TIMEOUT %ERRORS &print_revision &support); use Time::HiRes qw(time); use DBI(); - +# ==================== Database connect information ==================== +our $dbHost; +our $dbName; +our $dbUser; +our $dbPass; +our $dbTable; +our $dbTableUnknown; +require "/etc/nagtrap/plugin_db.conf"; # ==================== Functions ==================== # Print Usage sub print_usage (){ --- 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 --- plugin/plugin_db.conf.orig 2013-11-02 13:06:43.208934628 +0100 +++ plugin/plugin_db.conf 2013-11-02 13:05:54.924935016 +0100 @@ -0,0 +1,6 @@ +$dbHost = "localhost"; +$dbName = "snmptt"; +$dbUser = "<YOUR DB USER>"; +$dbPass = "<YOUR DB PASSWORD>"; +$dbTable = "snmptt"; +$dbTableUnknown = "snmptt_unknown";