monitoring/NPalert/NPalert.spec | 3 ++
monitoring/NPalert/NotificationDB.pm | 15 ++++---------
monitoring/NPalert/httpd/cgi-bin/redirmgr.cgi | 1
monitoring/NPalert/scripts/generate-config | 7 ++++--
monitoring/NPalert/scripts/notif | 1
monitoring/NPalert/scripts/notif-escalator | 1
monitoring/NPalert/scripts/notif-launcher | 1
monitoring/NPalert/scripts/notifier | 1
monitoring/PerlModules/NP/Gritch/Gritch.pm | 1
monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec | 1
monitoring/nocpulse-common/nocpulse-common.spec | 2 +
11 files changed, 16 insertions(+), 18 deletions(-)
New commits:
commit e062e0bcee69781b420c32dfae89323911880ed3
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Feb 24 16:54:45 2011 +0100
493028 - ack_enqueuer.pl must be linked from /etc/smrsh
to properly work in sendmail environment
diff --git a/monitoring/NPalert/NPalert.spec b/monitoring/NPalert/NPalert.spec
index f1f8d75..4cc4cf8 100644
--- a/monitoring/NPalert/NPalert.spec
+++ b/monitoring/NPalert/NPalert.spec
@@ -43,6 +43,7 @@ mkdir -p --mode=755
$RPM_BUILD_ROOT%{_sysconfdir}/notification/generated
mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification/static
mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification/stage/config
mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification
+mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/smrsh
mkdir -p --mode=775 $RPM_BUILD_ROOT%install_prefix/queue/ack_queue
mkdir -p --mode=775 $RPM_BUILD_ROOT%install_prefix/queue/ack_queue/.new
mkdir -p --mode=775 $RPM_BUILD_ROOT%install_prefix/queue/alert_queue
@@ -54,6 +55,7 @@ mkdir -p --mode=755 $RPM_BUILD_ROOT%log_dir/ticketlog
# Create symlinks
ln -s ../../static
$RPM_BUILD_ROOT%{_sysconfdir}/notification/stage/config/static
+ln -s /usr/bin/ack_enqueuer.pl $RPM_BUILD_ROOT%{_sysconfdir}/smrsh/ack_enqueuer.pl
# Install the perl modules
mkdir -p $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Notif
@@ -127,6 +129,7 @@ fi
%attr (755,%notif_user,%notif_user) %dir %log_dir/archive
%attr (755,%notif_user,%notif_user) %dir %log_dir/ticketlog
%attr(644,%notif_user,%notif_user) %{_sysconfdir}/notification/static/*
+%{_sysconfdir}/smrsh/ack_enqueuer.pl
%{_sysconfdir}/notification/stage/config/static
%{_mandir}/man3/monitor-queue*
%{_mandir}/man3/queue_remote_check.pl*
commit 713b4fb4999e2577935b04aff1a6b1c3daae8b7c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Feb 24 16:22:08 2011 +0100
LWP::UserAgent is required by tesl.pl (tests run in buildtime)
diff --git a/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec
b/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec
index 9c38a56..7422dc3 100644
--- a/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec
+++ b/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec
@@ -9,6 +9,7 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl}
-V:version`"; echo $version
BuildRequires: perl(NOCpulse::Config)
BuildRequires: perl(NOCpulse::Debug) perl(ExtUtils::MakeMaker)
BuildRequires: perl(Mail::Send)
+BuildRequires: perl-libwww-perl
Group: Development/Libraries
License: GPLv2
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
commit 0c823501e1cb05fe3af887cfac908fd72cc1b92d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Feb 18 14:04:02 2011 +0100
493028 - directory for notifications should be created
diff --git a/monitoring/nocpulse-common/nocpulse-common.spec
b/monitoring/nocpulse-common/nocpulse-common.spec
index 8dd8faf..61590c0 100644
--- a/monitoring/nocpulse-common/nocpulse-common.spec
+++ b/monitoring/nocpulse-common/nocpulse-common.spec
@@ -53,6 +53,7 @@ install -m644 nocpulse.logrotate \
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
install -m644 NOCpulse.ini $RPM_BUILD_ROOT/%{_sysconfdir}/%{package_name}/NOCpulse.ini
+install -m755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/%{package_name}/NOCpulse/tmp
install -m644 forward $RPM_BUILD_ROOT/%{_var}/lib/%{package_name}/.forward
mkdir -p $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Config/test
mkdir -p $RPM_BUILD_ROOT%{_bindir}
@@ -129,6 +130,7 @@ fi
%defattr(-, root,root,-)
%dir %{_sysconfdir}/nocpulse
%config(missingok,noreplace) %{_sysconfdir}/%{package_name}/NOCpulse.ini
+%{_sysconfdir}/%{package_name}/NOCpulse
%config(missingok,noreplace) %attr(-, %{package_name},%{package_name})
%{_var}/lib/%{package_name}/.forward
%{_bindir}/npConfigValue
%dir %{perl_vendorlib}/NOCpulse
commit 4cc3615ea27abbeaed70ba9137c6db180613ba7f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Feb 24 15:46:14 2011 +0100
493028 - select all but expired redirects
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index 0c2e790..44343e5 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -305,7 +305,7 @@ sub select_active_redirects {
RECURRING_FREQUENCY,
RECURRING_DURATION
FROM $table
- WHERE SYSDATE BETWEEN START_DATE AND EXPIRATION
+ WHERE SYSDATE < EXPIRATION
EOSQL
my $redirptr = $self->execute($sql, $table, FETCH_ARRAYREF);
@@ -331,7 +331,7 @@ EOSQL
FROM
$table, $table2
WHERE
- SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
+ SYSDATE < $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -355,7 +355,7 @@ EOSQL
FROM
$table, $table2
WHERE
- SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
+ SYSDATE < $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -378,7 +378,7 @@ EOSQL
FROM
$table, $table2
WHERE
- SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
+ SYSDATE < $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -412,7 +412,7 @@ sub select_active_redirect_criteria {
$table.MATCH_VALUE,
$table.INVERTED
FROM $table, $table2
- WHERE SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
+ WHERE SYSDATE < $table2.EXPIRATION
AND $table2.RECID = $table.REDIRECT_ID
ORDER BY $table.REDIRECT_ID, $table.MATCH_PARAM
EOSQL
commit ded741a392d3a66215087833b104207e7d892add
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Feb 24 14:08:20 2011 +0100
493028 - empty TZ is interpreted as GMT not local timezone; it must be unset
diff --git a/monitoring/NPalert/scripts/generate-config
b/monitoring/NPalert/scripts/generate-config
index 735c1b6..4debe5b 100755
--- a/monitoring/NPalert/scripts/generate-config
+++ b/monitoring/NPalert/scripts/generate-config
@@ -648,7 +648,11 @@ sub zonify_daily {
} ## end foreach my $zone (sort(@zones...
- $ENV{'TZ'} = $oldtz;
+ if ($oldtz) {
+ $ENV{'TZ'} = $oldtz;
+ } else {
+ delete $ENV{'TZ'};
+ }
# Note: log OK again
} ## end sub zonify_daily
commit 1f78ede001e3a7d6964cb220f5facad3d123bed9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Feb 23 16:51:44 2011 +0100
493028 - dates in db are in localtime not GMT
diff --git a/monitoring/NPalert/httpd/cgi-bin/redirmgr.cgi
b/monitoring/NPalert/httpd/cgi-bin/redirmgr.cgi
index 8f4f251..f11a195 100755
--- a/monitoring/NPalert/httpd/cgi-bin/redirmgr.cgi
+++ b/monitoring/NPalert/httpd/cgi-bin/redirmgr.cgi
@@ -207,7 +207,6 @@ my $MAX_CRITERIA = 15;
# M A I N
#----------------------------------------------
-$ENV{TZ}='GMT';
#----- Create a new CGI object
$query = new CGI;
diff --git a/monitoring/NPalert/scripts/generate-config
b/monitoring/NPalert/scripts/generate-config
index 1e6ac3f..735c1b6 100755
--- a/monitoring/NPalert/scripts/generate-config
+++ b/monitoring/NPalert/scripts/generate-config
@@ -19,7 +19,6 @@ use Data::Dumper;
my $bailout;
$SIG{'INT'} = $SIG{'TERM'} = sub { $bailout = 1; };
-$ENV{TZ} = 'GMT';
$| = 1;
# Constants for time conversion
diff --git a/monitoring/NPalert/scripts/notif b/monitoring/NPalert/scripts/notif
index 87c824e..540ddc6 100644
--- a/monitoring/NPalert/scripts/notif
+++ b/monitoring/NPalert/scripts/notif
@@ -8,7 +8,6 @@ use NOCpulse::Notif::EscalatorInterface;
use NOCpulse::Notif::Send;
use NOCpulse::Notif::SendInfo;
-$ENV{TZ}='GMT';
umask(002);
my $np_cfg = new NOCpulse::Config;
diff --git a/monitoring/NPalert/scripts/notif-escalator
b/monitoring/NPalert/scripts/notif-escalator
index 0078928..20282c6 100755
--- a/monitoring/NPalert/scripts/notif-escalator
+++ b/monitoring/NPalert/scripts/notif-escalator
@@ -22,7 +22,6 @@ use NOCpulse::Notif::RotateFirstEscalateStrategy;
use Data::Dumper;
-$ENV{TZ}='GMT';
umask(002);
my $program='notif-escalator';
diff --git a/monitoring/NPalert/scripts/notif-launcher
b/monitoring/NPalert/scripts/notif-launcher
index bc04626..ec77dd3 100755
--- a/monitoring/NPalert/scripts/notif-launcher
+++ b/monitoring/NPalert/scripts/notif-launcher
@@ -15,7 +15,6 @@ use NOCpulse::Notif::AlertFile;
use NOCpulse::Notif::AlertDB; #for current alerts
use NOCpulse::Notif::EscalatorInterface;
-$ENV{TZ}='GMT';
use constant DEF_UNIX_DATE_FMT => '%m-%d-%Y %H:%M:%S';
umask(002);
diff --git a/monitoring/NPalert/scripts/notifier b/monitoring/NPalert/scripts/notifier
index cc0dbc5..515d390 100755
--- a/monitoring/NPalert/scripts/notifier
+++ b/monitoring/NPalert/scripts/notifier
@@ -11,7 +11,6 @@ use NOCpulse::Notif::AlertDB;
use NOCpulse::Notif::EscalatorInterface;
use NOCpulse::Notif::RotateFirstEscalateStrategy;
-$ENV{TZ} = 'GMT';
umask(002);
my $program = 'notifier';
commit 80f658595a320fd2bdcad867bba5a9801015919f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Feb 18 13:40:49 2011 +0100
493028 - get_sendmail() has been removed in ae8275b5435a56e322387c060ca5d91c5dc79ab1
diff --git a/monitoring/PerlModules/NP/Gritch/Gritch.pm
b/monitoring/PerlModules/NP/Gritch/Gritch.pm
index b230f74..6970836 100644
--- a/monitoring/PerlModules/NP/Gritch/Gritch.pm
+++ b/monitoring/PerlModules/NP/Gritch/Gritch.pm
@@ -405,7 +405,6 @@ sub sendmail {
}
} else {
# Use sendmail
- my $sendmail = get_sendmail();
if (Mail::Mailer::is_exe('sendmail')) {
my $msg = Mail::Send->new(Subject => $subject, To => $recip, From
=> $self->recipient);
my $fh = $msg->open('sendmail');
commit 614d78e76f70047117a7cb5a54e6f2dc1dcb590b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jan 21 14:21:40 2011 +0100
493028 - fixed active redirects query condition
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index 0f9c4b3..0c2e790 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -305,8 +305,7 @@ sub select_active_redirects {
RECURRING_FREQUENCY,
RECURRING_DURATION
FROM $table
- WHERE EXPIRATION >= SYSDATE
- AND START_DATE <= SYSDATE + 1
+ WHERE SYSDATE BETWEEN START_DATE AND EXPIRATION
EOSQL
my $redirptr = $self->execute($sql, $table, FETCH_ARRAYREF);
@@ -332,8 +331,7 @@ EOSQL
FROM
$table, $table2
WHERE
- $table2.EXPIRATION >= SYSDATE
- AND $table2.START_DATE <= SYSDATE + 1
+ SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -357,8 +355,7 @@ EOSQL
FROM
$table, $table2
WHERE
- $table2.EXPIRATION >= SYSDATE
- AND $table2.START_DATE <= SYSDATE + 1
+ SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -381,8 +378,7 @@ EOSQL
FROM
$table, $table2
WHERE
- $table2.EXPIRATION >= SYSDATE
- AND $table2.START_DATE <= SYSDATE + 1
+ SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -416,8 +412,7 @@ sub select_active_redirect_criteria {
$table.MATCH_VALUE,
$table.INVERTED
FROM $table, $table2
- WHERE $table2.EXPIRATION >= SYSDATE
- AND $table2.START_DATE <= SYSDATE + 1
+ WHERE SYSDATE BETWEEN $table2.START_DATE AND $table2.EXPIRATION
AND $table2.RECID = $table.REDIRECT_ID
ORDER BY $table.REDIRECT_ID, $table.MATCH_PARAM
EOSQL