include <itl/itl.conf>
include <itl/standalone.conf>
-local object IcingaApplication "icinga" {
+object IcingaApplication "icinga" {
macros = {
plugindir = "/usr/lib/nagios/plugins"
}
}
library "compat"
-local object CompatComponent "compat" { }
-local object CompatLog "compat-log" { }
+object CompatComponent "compat" { }
+object CompatLog "compat-log" { }
/*
library "livestatus"
-local object LivestatusComponent "livestatus" {}
+object LivestatusComponent "livestatus" {}
*/
object CheckCommand "check_dummy" inherits "plugin-check-command" {
/**
* Global configuration settings
*/
-local object IcingaApplication "icinga" {
+object IcingaApplication "icinga" {
macros = {
plugindir = "/usr/lib/nagios/plugins",
iconimagedir = "/icinga2/images/icons"
* Enable Syslogger
*/
/*
-local object SyslogLogger "icinga2-syslog" {
+object SyslogLogger "icinga2-syslog" {
severity = "information"
}
-local object FileLogger "my-debug-file" {
+object FileLogger "my-debug-file" {
severity = "debug",
path = "/home/michi/i2/var/log/icinga2/icinga2-debug.log"
}
* hosts and services.
*/
library "compat"
-local object CompatComponent "compat" { }
-local object CompatLog "compat-log" { }
+object CompatComponent "compat" { }
+object CompatLog "compat-log" { }
/**
* INGRAPH
*/
-local object PerfdataWriter "pnp" {
+object PerfdataWriter "pnp" {
perfdata_path = "/data/icinga2/perfdata/service-perfdata",
format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$",
rotation_interval = 15s,
*/
library "livestatus"
-local object LivestatusComponent "livestatus-tcp" {
+object LivestatusComponent "livestatus-tcp" {
socket_type = "tcp",
host = "10.0.10.18",
port = "6558"
}
-local object LivestatusComponent "livestatus-unix" {
+object LivestatusComponent "livestatus-unix" {
socket_type = "unix",
socket_path = "/home/michi/i2/var/run/icinga2/livestatus"
}
*/
library "ido_mysql"
-local object MysqlDbConnection "ido-mysql" {
+object MysqlDbConnection "ido-mysql" {
host = "127.0.0.1",
port = "3306",
user = "icinga",
include <itl/itl.conf>
include <itl/standalone.conf>
-local object IcingaApplication "my-icinga" {
+object IcingaApplication "my-icinga" {
macros["plugindir"] = "/usr/lib/nagios/plugins"
}
----
----
library "compat"
-local object CompatComponent "compat" { }
-local object CompatLog "my-log" { }
+object CompatComponent "compat" { }
+object CompatLog "my-log" { }
----
After restarting Icinga 2 you should be able to find the status.dat and objects.cache files in
Let's create a new PNP PerfdataWriter object:
----
-local object PerfdataWriter "pnp" {
+object PerfdataWriter "pnp" {
perfdata_path = "/var/lib/icinga2/service-perfdata",
format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$",
rotation_interval = 15s,
TCP Socket
----
library "livestatus"
-local object LivestatusComponent "livestatus-tcp" {
+object LivestatusComponent "livestatus-tcp" {
socket_type = "tcp",
host = "10.0.10.18",
port = "6558"
Unix Socket
----
library "livestatus"
-local object LivestatusComponent "livestatus-unix" {
+object LivestatusComponent "livestatus-unix" {
socket_type = "unix",
socket_path = "/var/run/icinga2/livestatus"
}
----
library "ido_mysql"
-local object IdoMysqlDbConnection "my-ido-mysql" {
+object IdoMysqlDbConnection "my-ido-mysql" {
host = "127.0.0.1",
port = "3306",
user = "icinga",
/**
* Global configuration settings
*/
-local object IcingaApplication "icinga" {
+object IcingaApplication "icinga" {
macros = {
plugindir = "/usr/local/icinga/libexec"
}
* hosts and services. CompatLog writeis the Icinga 1.x icinga.log and archives.
*/
library "compat"
-local object CompatComponent "compat" { }
-local object CompatLog "compat-log" { }
+object CompatComponent "compat" { }
+object CompatLog "compat-log" { }
/**
* And finally we define some host that should be checked.
/**
* Global configuration settings
*/
-local object IcingaApplication "icinga" {
+object IcingaApplication "icinga" {
pid_path = "icinga2.pid",
state_path = "icinga2.state",
* hosts and services.
*/
library "compat"
-local object Component "compat" {
+object Component "compat" {
status_path = "status.dat",
objects_path = "objects.cache",
}