mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Updated example configs and fixed yet another crash.
This commit is contained in:
parent
0667491942
commit
9ed4e78491
@ -293,22 +293,23 @@ int Application::Run(int argc, char **argv)
|
||||
|
||||
DynamicObject::BeginTx();
|
||||
|
||||
try {
|
||||
if (IsDebugging()) {
|
||||
result = Main(m_Arguments);
|
||||
} else {
|
||||
try {
|
||||
result = Main(m_Arguments);
|
||||
} catch (const exception& ex) {
|
||||
Logger::Write(LogCritical, "base", "---");
|
||||
Logger::Write(LogCritical, "base", "Exception: " + Utility::GetTypeName(typeid(ex)));
|
||||
Logger::Write(LogCritical, "base", "Message: " + String(ex.what()));
|
||||
|
||||
DynamicObject::FinishTx();
|
||||
DynamicObject::DeactivateObjects();
|
||||
} catch (const exception& ex) {
|
||||
Logger::Write(LogCritical, "base", "---");
|
||||
Logger::Write(LogCritical, "base", "Exception: " + Utility::GetTypeName(typeid(ex)));
|
||||
Logger::Write(LogCritical, "base", "Message: " + String(ex.what()));
|
||||
|
||||
if (IsDebugging())
|
||||
throw;
|
||||
|
||||
return EXIT_FAILURE;
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
DynamicObject::FinishTx();
|
||||
DynamicObject::DeactivateObjects();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
5044
icinga-app/icinga-delegation.conf
Normal file
5044
icinga-app/icinga-delegation.conf
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,10 +6,6 @@ local object IcingaApplication "icinga" {
|
||||
service = 7778
|
||||
}
|
||||
|
||||
local object Component "cibsync" {
|
||||
|
||||
}
|
||||
|
||||
local object Component "demo" {
|
||||
}
|
||||
|
||||
|
@ -1,18 +1,9 @@
|
||||
local object Application "icinga" {
|
||||
local object IcingaApplication "icinga" {
|
||||
ca = "ca.crt",
|
||||
cert = "icinga-c2.pem",
|
||||
|
||||
node = "192.168.2.235",
|
||||
service = 7777
|
||||
}
|
||||
|
||||
local object Component "configrpc" {
|
||||
}
|
||||
|
||||
local object Component "delegation" {
|
||||
}
|
||||
|
||||
local object Component "checker" {
|
||||
local object Component "demo" {
|
||||
}
|
||||
|
||||
local object Component "discovery" {
|
||||
@ -21,43 +12,6 @@ local object Component "discovery" {
|
||||
|
||||
local object Endpoint "icinga-c3" {
|
||||
node = "192.168.5.46",
|
||||
service = 9999,
|
||||
}
|
||||
|
||||
# --------------------------------------------
|
||||
|
||||
object Host "localhost" {
|
||||
|
||||
}
|
||||
|
||||
abstract object Service "nagios-service" {
|
||||
methods = {
|
||||
check = "native::NagiosCheck"
|
||||
},
|
||||
|
||||
macros = {
|
||||
plugindir = "/usr/local/icinga/libexec"
|
||||
}
|
||||
}
|
||||
|
||||
abstract object Service "ping" inherits "nagios-service" {
|
||||
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" {
|
||||
host_name = "localhost",
|
||||
|
||||
macros += {
|
||||
address = "localhost"
|
||||
}
|
||||
service = 7778,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user