From d52afa080eb96251266a4808cfef2631b1c6fcd0 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 14 Jun 2012 21:09:35 +0200 Subject: [PATCH] Bugfixes. --- components/checker/checkercomponent.cpp | 1 - components/delegation/delegationcomponent.cpp | 2 +- icinga-app/Makefile.am | 1 + icinga-app/icinga2.conf | 16 +++++++++++++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index 036bed4ab..504280c62 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -69,7 +69,6 @@ int CheckerComponent::CheckTimerHandler(const TimerEventArgs& ea) return 0; for (;;) { - Service service = m_Services.top(); if (service.GetNextCheck() > now) diff --git a/components/delegation/delegationcomponent.cpp b/components/delegation/delegationcomponent.cpp index 4bab9472d..f68a896d3 100644 --- a/components/delegation/delegationcomponent.cpp +++ b/components/delegation/delegationcomponent.cpp @@ -86,7 +86,7 @@ int DelegationComponent::AssignServiceResponseHandler(const ConfigObject::Ptr& s Application::Log("Service delegation for service '" + service->GetName() + "' timed out."); } else { service->SetTag("checker", nrea.Sender->GetIdentity()); - Application::Log("Service delegation for service '" + service->GetName() + "'was successful."); + Application::Log("Service delegation for service '" + service->GetName() + "' was successful."); } return 0; diff --git a/icinga-app/Makefile.am b/icinga-app/Makefile.am index 2987de93d..78b5fd112 100644 --- a/icinga-app/Makefile.am +++ b/icinga-app/Makefile.am @@ -24,6 +24,7 @@ icinga_LDADD = \ -dlopen ${top_builddir}/components/checker/checker.la \ -dlopen ${top_builddir}/components/configfile/configfile.la \ -dlopen ${top_builddir}/components/configrpc/configrpc.la \ + -dlopen ${top_builddir}/components/delegation/delegation.la \ -dlopen ${top_builddir}/components/demo/demo.la \ -dlopen ${top_builddir}/components/discovery/discovery.la diff --git a/icinga-app/icinga2.conf b/icinga-app/icinga2.conf index 979764daf..085f76297 100644 --- a/icinga-app/icinga2.conf +++ b/icinga-app/icinga2.conf @@ -13,6 +13,9 @@ local object component "configrpc" { local object component "delegation" { } +local object component "checker" { +} + local object component "discovery" { broker = 1 } @@ -44,9 +47,16 @@ abstract object service "nagios-service" { } abstract object service "ping" inherits "nagios-service" { - check_type = "nagios", - check_command = "$plugindir$/check_ping -H $address$", - check_interval = 30 + check_command = "$plugindir$/check_ping -H $address$ -c $crta$,$cpl$% -w $wrta$,$wpl$%", + check_interval = 30, + + macros += { + crta = 100, + wrta = 50, + + cpl = 25, + wpl = 5 + } } object service "localhost-ping" inherits "ping" {