From 9338362bf8cd862de73fe452b382906841d19d1c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 17 Jun 2012 21:27:13 +0200 Subject: [PATCH] Bugfixes. --- components/checker/checkercomponent.h | 6 +++--- icinga-app/icinga-standalone.conf | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/components/checker/checkercomponent.h b/components/checker/checkercomponent.h index ae166c0dc..3da7e721e 100644 --- a/components/checker/checkercomponent.h +++ b/components/checker/checkercomponent.h @@ -23,12 +23,12 @@ namespace icinga { -struct ServiceNextCheckLessComparer +struct ServiceNextCheckGreaterComparer { public: bool operator()(const Service& a, const Service& b) { - return a.GetNextCheck() < b.GetNextCheck(); + return a.GetNextCheck() > b.GetNextCheck(); } }; @@ -41,7 +41,7 @@ public: typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; - typedef priority_queue, ServiceNextCheckLessComparer> ServiceQueue; + typedef priority_queue, ServiceNextCheckGreaterComparer> ServiceQueue; virtual string GetName(void) const; virtual void Start(void); diff --git a/icinga-app/icinga-standalone.conf b/icinga-app/icinga-standalone.conf index dd2799e64..aca4966a8 100644 --- a/icinga-app/icinga-standalone.conf +++ b/icinga-app/icinga-standalone.conf @@ -28,10 +28,18 @@ abstract object service "ping" inherits "nagios-service" { check_interval = 30 } -object service "localhost-ping" inherits "ping" { +object service "localhost-ping1" inherits "ping" { host_name = "localhost", macros += { address = "localhost" } -} \ No newline at end of file +} + +object service "localhost-ping2" inherits "ping" { + host_name = "localhost", + + macros += { + address = "localhost" + } +}