]> granicus.if.org Git - icinga2/commitdiff
Bugfixes.
authorGunnar Beutner <gunnar@beutner.name>
Sun, 17 Jun 2012 19:27:13 +0000 (21:27 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Sun, 17 Jun 2012 19:27:13 +0000 (21:27 +0200)
components/checker/checkercomponent.h
icinga-app/icinga-standalone.conf

index ae166c0dc787837b1a81fdd901f697905314e472..3da7e721e760a56f61708d17cbc406d666a2ee38 100644 (file)
 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<CheckerComponent> Ptr;
        typedef weak_ptr<CheckerComponent> WeakPtr;
 
-       typedef priority_queue<Service, vector<Service>, ServiceNextCheckLessComparer> ServiceQueue;
+       typedef priority_queue<Service, vector<Service>, ServiceNextCheckGreaterComparer> ServiceQueue;
 
        virtual string GetName(void) const;
        virtual void Start(void);
index dd2799e64bc0d45e88b8a6bcbbee3dffb675b67c..aca4966a8073ad5e94a34e2ed784533bc4dd01cd 100644 (file)
@@ -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"
+       }
+}