mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Update my test config.
This commit is contained in:
parent
5446e1603f
commit
8d4d063d1f
@ -10,16 +10,15 @@
|
|||||||
include <itl/itl.conf>
|
include <itl/itl.conf>
|
||||||
include <itl/standalone.conf>
|
include <itl/standalone.conf>
|
||||||
|
|
||||||
/**
|
set IcingaMacros = {
|
||||||
* Global configuration settings
|
plugindir = "/usr/lib/nagios/plugins",
|
||||||
*/
|
iconimagedir = "/icinga2/images/icons",
|
||||||
object IcingaApplication "icinga" {
|
icinga2src = "/home/michi/coding/icinga/icinga2",
|
||||||
macros = {
|
|
||||||
plugindir = "/usr/lib/nagios/plugins",
|
|
||||||
iconimagedir = "/icinga2/images/icons"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set Icinga2Prefix = "/home/michi/i2"
|
||||||
|
set PerfdataPrefix = "/data/icinga2"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Syslogger
|
* Enable Syslogger
|
||||||
*/
|
*/
|
||||||
@ -30,7 +29,7 @@ object SyslogLogger "icinga2-syslog" {
|
|||||||
|
|
||||||
object FileLogger "my-debug-file" {
|
object FileLogger "my-debug-file" {
|
||||||
severity = "debug",
|
severity = "debug",
|
||||||
path = "/home/michi/i2/var/log/icinga2/icinga2-debug.log"
|
path = (Icinga2Prefix + "/var/log/icinga2/icinga2-debug.log")
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
@ -39,14 +38,15 @@ object FileLogger "my-debug-file" {
|
|||||||
* hosts and services.
|
* hosts and services.
|
||||||
*/
|
*/
|
||||||
library "compat"
|
library "compat"
|
||||||
object CompatComponent "compat" { }
|
object StatusDataWriter "status" { }
|
||||||
object CompatLog "compat-log" { }
|
object ExternalCommandListener "command" { }
|
||||||
|
object CompatLogger "compat-log" { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* INGRAPH
|
* INGRAPH
|
||||||
*/
|
*/
|
||||||
object PerfdataWriter "pnp" {
|
object PerfdataWriter "pnp" {
|
||||||
perfdata_path = "/data/icinga2/perfdata/service-perfdata",
|
perfdata_path = (PerfdataPrefix + "/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$",
|
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,
|
rotation_interval = 15s,
|
||||||
}
|
}
|
||||||
@ -54,25 +54,26 @@ object PerfdataWriter "pnp" {
|
|||||||
/**
|
/**
|
||||||
* LIVESTATUS
|
* LIVESTATUS
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
library "livestatus"
|
library "livestatus"
|
||||||
|
|
||||||
object LivestatusComponent "livestatus-tcp" {
|
object LivestatusListener "livestatus-tcp" {
|
||||||
socket_type = "tcp",
|
socket_type = "tcp",
|
||||||
host = "10.0.10.18",
|
bind_host = "127.0.0.1",
|
||||||
port = "6558"
|
bind_port = "6558"
|
||||||
}
|
}
|
||||||
|
|
||||||
object LivestatusComponent "livestatus-unix" {
|
object LivestatusListener "livestatus-unix" {
|
||||||
socket_type = "unix",
|
socket_type = "unix",
|
||||||
socket_path = "/home/michi/i2/var/run/icinga2/livestatus"
|
socket_path = (Icinga2Prefix + "/var/run/icinga2/livestatus")
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* IDO
|
* IDO
|
||||||
*/
|
*/
|
||||||
library "ido_mysql"
|
library "db_ido_mysql"
|
||||||
|
|
||||||
object MysqlDbConnection "ido-mysql" {
|
object IdoMysqlConnection "ido-mysql" {
|
||||||
host = "127.0.0.1",
|
host = "127.0.0.1",
|
||||||
port = "3306",
|
port = "3306",
|
||||||
user = "icinga",
|
user = "icinga",
|
||||||
@ -111,11 +112,11 @@ template Service "flapper" inherits "ping4" {
|
|||||||
"foo1" = "bar1",
|
"foo1" = "bar1",
|
||||||
"foo5" = "bar5"
|
"foo5" = "bar5"
|
||||||
},
|
},
|
||||||
servicegroups = [ "sg-thruk" ],
|
groups = [ "sg-thruk" ],
|
||||||
}
|
}
|
||||||
|
|
||||||
object Host "dummy01" {
|
object Host "dummy01" {
|
||||||
hostgroups = [ "hg-thruk" ],
|
groups = [ "hg-thruk" ],
|
||||||
services["flapme"] = {
|
services["flapme"] = {
|
||||||
templates = [ "flapper" ],
|
templates = [ "flapper" ],
|
||||||
check_command = "flapme",
|
check_command = "flapme",
|
||||||
@ -123,6 +124,8 @@ object Host "dummy01" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object Host "localhost" {
|
object Host "localhost" {
|
||||||
|
host_dependencies = [ "dummy01" ],
|
||||||
|
|
||||||
services["flapme"] = {
|
services["flapme"] = {
|
||||||
templates = [ "flapper" ],
|
templates = [ "flapper" ],
|
||||||
notifications["mail-michi"] = {
|
notifications["mail-michi"] = {
|
||||||
@ -148,7 +151,7 @@ object Host "localhost" {
|
|||||||
"icon_image" = "$iconimagedir$/icinga2.png",
|
"icon_image" = "$iconimagedir$/icinga2.png",
|
||||||
"icon_image_alt" = "custom attr macro expand test"
|
"icon_image_alt" = "custom attr macro expand test"
|
||||||
},
|
},
|
||||||
servicegroups = [ "sg-thruk" ],
|
groups = [ "sg-thruk" ],
|
||||||
},
|
},
|
||||||
services["ping4"] = {
|
services["ping4"] = {
|
||||||
templates = [ "ping4", "notification-tmpl" ],
|
templates = [ "ping4", "notification-tmpl" ],
|
||||||
@ -164,9 +167,9 @@ object Host "localhost" {
|
|||||||
},
|
},
|
||||||
services["users"] = {
|
services["users"] = {
|
||||||
templates = [ "users", "notification-tmpl" ],
|
templates = [ "users", "notification-tmpl" ],
|
||||||
servicegroups = [ "sg-thruk" ],
|
groups = [ "sg-thruk" ],
|
||||||
servicedependencies = [
|
service_dependencies = [
|
||||||
{ host = "dummy01", service = "flapme" },
|
{ host = "dummy01", service = "flapme" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -175,7 +178,6 @@ object Host "localhost" {
|
|||||||
address6 = "::1",
|
address6 = "::1",
|
||||||
},
|
},
|
||||||
|
|
||||||
hostdependencies = [ "dummy01" ],
|
|
||||||
custom += {
|
custom += {
|
||||||
"fooh1" = "barh1",
|
"fooh1" = "barh1",
|
||||||
"fooh2" = "barh2",
|
"fooh2" = "barh2",
|
||||||
@ -187,12 +189,9 @@ object Host "localhost" {
|
|||||||
"2d_coords" = "42,1337"
|
"2d_coords" = "42,1337"
|
||||||
},
|
},
|
||||||
|
|
||||||
//hostcheck = "ping4",
|
check = "flapme",
|
||||||
hostcheck = "flapme",
|
|
||||||
|
|
||||||
hostgroups = [ "hg-thruk" ],
|
groups = [ "hg-thruk" ],
|
||||||
|
|
||||||
check_interval = (bumsti * 5)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object HostGroup "hg-thruk" {
|
object HostGroup "hg-thruk" {
|
||||||
@ -214,7 +213,7 @@ object ServiceGroup "sg-thruk" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object CheckCommand "flapme" inherits "plugin-check-command" {
|
object CheckCommand "flapme" inherits "plugin-check-command" {
|
||||||
command = "/home/michi/coding/icinga/icinga2/contrib/flap.sh",
|
command = "$icinga2src$/contrib/flap.sh",
|
||||||
}
|
}
|
||||||
|
|
||||||
object EventCommand "eventme" inherits "plugin-event-command" {
|
object EventCommand "eventme" inherits "plugin-event-command" {
|
||||||
@ -226,7 +225,6 @@ object NotificationCommand "notifyme" inherits "plugin-notification-command" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object NotificationCommand "mail" inherits "plugin-notification-command" {
|
object NotificationCommand "mail" inherits "plugin-notification-command" {
|
||||||
|
|
||||||
command = "echo `date +%s` >> /tmp/i2.notify"
|
command = "echo `date +%s` >> /tmp/i2.notify"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user