[icinga-checkins] icinga.org: icinga-reports/mluebben/default: Fix wrong report_id in table raw_availibility_breakdowns_time

git at icinga.org git at icinga.org
Wed Apr 27 09:53:40 CEST 2011


Module: icinga-reports
Branch: mluebben/default
Commit: 4a8368daf3e308ec6f0c03ce8a3cdca48712c7c6
URL:    https://git.icinga.org/?p=icinga-reports.git;a=commit;h=4a8368daf3e308ec6f0c03ce8a3cdca48712c7c6

Author: Michael Luebben <michael_luebben at web.de>
Date:   Wed Apr 27 09:47:26 2011 +0200

Fix wrong report_id in table raw_availibility_breakdowns_time

---

 AvailReportParser/importServiceAvailReport.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/AvailReportParser/importServiceAvailReport.pl b/AvailReportParser/importServiceAvailReport.pl
index f6eb07d..b60ab4c 100755
--- a/AvailReportParser/importServiceAvailReport.pl
+++ b/AvailReportParser/importServiceAvailReport.pl
@@ -91,6 +91,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 =head1 HISTORY
 
 =cut
+#insert into reports (`date`) value(now())
 use strict;
 use LWP 5.64;
 use Getopt::Long;
@@ -206,7 +207,7 @@ my $oKTotalTimeDays = $ReportAvail->getParsedBreakdownValue("ok","total","time",
 my $oKTotalTimeHours = $ReportAvail->getParsedBreakdownValue("ok","total","time","hours");
 my $oKTotalTimeMinutes = $ReportAvail->getParsedBreakdownValue("ok","total","time","minutes");
 my $oKTotalTimeSeconds = $ReportAvail->getParsedBreakdownValue("ok","total","time","seconds");
-$DBHandler->insertAvailBreakdown("1", "ok", "total", "time", $oKTotalTimeDays, $oKTotalTimeHours, $oKTotalTimeMinutes, $oKTotalTimeSeconds);
+$DBHandler->insertAvailBreakdown($reportID, "ok", "total", "time", $oKTotalTimeDays, $oKTotalTimeHours, $oKTotalTimeMinutes, $oKTotalTimeSeconds);
 
 # Total Time
 my $oKTotalTotaltime = $ReportAvail->getParsedBreakdownValue("ok","total","totaltime");





More information about the icinga-checkins mailing list