Bugfixes.

This commit is contained in:
Gunnar Beutner 2012-06-17 21:27:13 +02:00
parent 4c658eb889
commit 9338362bf8
2 changed files with 13 additions and 5 deletions

View File

@ -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<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);

View 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"
}
}
}
object service "localhost-ping2" inherits "ping" {
host_name = "localhost",
macros += {
address = "localhost"
}
}