mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
parent
4cc51f990f
commit
5fb52a4e48
@ -849,18 +849,18 @@ you can add a `vars` dictionary as shown for the `CheckCommand` object.
|
|||||||
command = [ SysconfDir + "/icinga2/scripts/mail-notification.sh" ]
|
command = [ SysconfDir + "/icinga2/scripts/mail-notification.sh" ]
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
"NOTIFICATIONTYPE" = "$notification.type$"
|
NOTIFICATIONTYPE = "$notification.type$"
|
||||||
"SERVICEDESC" = "$service.name$"
|
SERVICEDESC = "$service.name$"
|
||||||
"HOSTALIAS" = "$host.display_name$",
|
HOSTALIAS = "$host.display_name$"
|
||||||
"HOSTADDRESS" = "$address$",
|
HOSTADDRESS = "$address$"
|
||||||
"SERVICESTATE" = "$service.state$",
|
SERVICESTATE = "$service.state$"
|
||||||
"LONGDATETIME" = "$icinga.long_date_time$",
|
LONGDATETIME = "$icinga.long_date_time$"
|
||||||
"SERVICEOUTPUT" = "$service.output$",
|
SERVICEOUTPUT = "$service.output$"
|
||||||
"NOTIFICATIONAUTHORNAME" = "$notification.author$",
|
NOTIFICATIONAUTHORNAME = "$notification.author$"
|
||||||
"NOTIFICATIONCOMMENT" = "$notification.comment$",
|
NOTIFICATIONCOMMENT = "$notification.comment$"
|
||||||
"HOSTDISPLAYNAME" = "$host.display_name$",
|
HOSTDISPLAYNAME = "$host.display_name$"
|
||||||
"SERVICEDISPLAYNAME" = "$service.display_name$",
|
SERVICEDISPLAYNAME = "$service.display_name$"
|
||||||
"USEREMAIL" = "$user.email$"
|
USEREMAIL = "$user.email$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1032,7 +1032,7 @@ and `nrpe-disk` applied to the `nrpe-server`. The health check is defined as
|
|||||||
|
|
||||||
object Host "nrpe-server" {
|
object Host "nrpe-server" {
|
||||||
import "generic-host"
|
import "generic-host"
|
||||||
address = "192.168.1.5",
|
address = "192.168.1.5"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Dependency "disable-nrpe-checks" to Service {
|
apply Dependency "disable-nrpe-checks" to Service {
|
||||||
|
@ -251,7 +251,7 @@ Sets a dictionary element to the specified value.
|
|||||||
Example:
|
Example:
|
||||||
|
|
||||||
{
|
{
|
||||||
a = 5,
|
a = 5
|
||||||
a = 7
|
a = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -875,18 +875,18 @@ Example:
|
|||||||
]
|
]
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
"NOTIFICATIONTYPE" = "$notification.type$"
|
NOTIFICATIONTYPE = "$notification.type$"
|
||||||
"SERVICEDESC" = "$service.name$"
|
SERVICEDESC = "$service.name$"
|
||||||
"HOSTALIAS" = "$host.display_name$",
|
HOSTALIAS = "$host.display_name$"
|
||||||
"HOSTADDRESS" = "$address$",
|
HOSTADDRESS = "$address$"
|
||||||
"SERVICESTATE" = "$service.state$",
|
SERVICESTATE = "$service.state$"
|
||||||
"LONGDATETIME" = "$icinga.long_date_time$",
|
LONGDATETIME = "$icinga.long_date_time$"
|
||||||
"SERVICEOUTPUT" = "$service.output$",
|
SERVICEOUTPUT = "$service.output$"
|
||||||
"NOTIFICATIONAUTHORNAME" = "$notification.author$",
|
NOTIFICATIONAUTHORNAME = "$notification.author$"
|
||||||
"NOTIFICATIONCOMMENT" = "$notification.comment$",
|
NOTIFICATIONCOMMENT = "$notification.comment$"
|
||||||
"HOSTDISPLAYNAME" = "$host.display_name$",
|
HOSTDISPLAYNAME = "$host.display_name$"
|
||||||
"SERVICEDISPLAYNAME" = "$service.display_name$",
|
SERVICEDISPLAYNAME = "$service.display_name$"
|
||||||
"USEREMAIL" = "$user.email$"
|
USEREMAIL = "$user.email$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,16 +6,16 @@ object NotificationCommand "mail-host-notification" {
|
|||||||
command = [ SysconfDir + "/icinga2/scripts/mail-host-notification.sh" ]
|
command = [ SysconfDir + "/icinga2/scripts/mail-host-notification.sh" ]
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
"NOTIFICATIONTYPE" = "$notification.type$"
|
NOTIFICATIONTYPE = "$notification.type$"
|
||||||
"HOSTALIAS" = "$host.display_name$",
|
HOSTALIAS = "$host.display_name$"
|
||||||
"HOSTADDRESS" = "$address$",
|
HOSTADDRESS = "$address$"
|
||||||
"HOSTSTATE" = "$host.state$",
|
HOSTSTATE = "$host.state$"
|
||||||
"LONGDATETIME" = "$icinga.long_date_time$",
|
LONGDATETIME = "$icinga.long_date_time$"
|
||||||
"HOSTOUTPUT" = "$host.output$",
|
HOSTOUTPUT = "$host.output$"
|
||||||
"NOTIFICATIONAUTHORNAME" = "$notification.author$",
|
NOTIFICATIONAUTHORNAME = "$notification.author$"
|
||||||
"NOTIFICATIONCOMMENT" = "$notification.comment$",
|
NOTIFICATIONCOMMENT = "$notification.comment$"
|
||||||
"HOSTDISPLAYNAME" = "$host.display_name$",
|
HOSTDISPLAYNAME = "$host.display_name$"
|
||||||
"USEREMAIL" = "$user.email$"
|
USEREMAIL = "$user.email$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,18 +25,18 @@ object NotificationCommand "mail-service-notification" {
|
|||||||
command = [ SysconfDir + "/icinga2/scripts/mail-service-notification.sh" ]
|
command = [ SysconfDir + "/icinga2/scripts/mail-service-notification.sh" ]
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
"NOTIFICATIONTYPE" = "$notification.type$"
|
NOTIFICATIONTYPE = "$notification.type$"
|
||||||
"SERVICEDESC" = "$service.name$"
|
SERVICEDESC = "$service.name$"
|
||||||
"HOSTALIAS" = "$host.display_name$",
|
HOSTALIAS = "$host.display_name$"
|
||||||
"HOSTADDRESS" = "$address$",
|
HOSTADDRESS = "$address$"
|
||||||
"SERVICESTATE" = "$service.state$",
|
SERVICESTATE = "$service.state$"
|
||||||
"LONGDATETIME" = "$icinga.long_date_time$",
|
LONGDATETIME = "$icinga.long_date_time$"
|
||||||
"SERVICEOUTPUT" = "$service.output$",
|
SERVICEOUTPUT = "$service.output$"
|
||||||
"NOTIFICATIONAUTHORNAME" = "$notification.author$",
|
NOTIFICATIONAUTHORNAME = "$notification.author$"
|
||||||
"NOTIFICATIONCOMMENT" = "$notification.comment$",
|
NOTIFICATIONCOMMENT = "$notification.comment$"
|
||||||
"HOSTDISPLAYNAME" = "$host.display_name$",
|
HOSTDISPLAYNAME = "$host.display_name$"
|
||||||
"SERVICEDISPLAYNAME" = "$service.display_name$",
|
SERVICEDISPLAYNAME = "$service.display_name$"
|
||||||
"USEREMAIL" = "$user.email$"
|
USEREMAIL = "$user.email$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
object FileLogger "debug-file" {
|
object FileLogger "debug-file" {
|
||||||
severity = "debug",
|
severity = "debug"
|
||||||
path = LocalStateDir + "/log/icinga2/debug.log"
|
path = LocalStateDir + "/log/icinga2/debug.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
library "perfdata"
|
library "perfdata"
|
||||||
|
|
||||||
object GraphiteWriter "graphite" {
|
object GraphiteWriter "graphite" {
|
||||||
//host = "127.0.0.1",
|
//host = "127.0.0.1"
|
||||||
//port = 2003
|
//port = 2003
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
library "db_ido_mysql"
|
library "db_ido_mysql"
|
||||||
|
|
||||||
object IdoMysqlConnection "ido-mysql" {
|
object IdoMysqlConnection "ido-mysql" {
|
||||||
//user = "icinga",
|
//user = "icinga"
|
||||||
//password = "icinga",
|
//password = "icinga"
|
||||||
//host = "localhost",
|
//host = "localhost"
|
||||||
//database = "icinga"
|
//database = "icinga"
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
library "db_ido_pgsql"
|
library "db_ido_pgsql"
|
||||||
|
|
||||||
object IdoPgsqlConnection "ido-pgsql" {
|
object IdoPgsqlConnection "ido-pgsql" {
|
||||||
//user = "icinga",
|
//user = "icinga"
|
||||||
//password = "icinga",
|
//password = "icinga"
|
||||||
//host = "localhost",
|
//host = "localhost"
|
||||||
//database = "icinga"
|
//database = "icinga"
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
object FileLogger "main-log" {
|
object FileLogger "main-log" {
|
||||||
severity = "information",
|
severity = "information"
|
||||||
path = LocalStateDir + "/log/icinga2/icinga2.log"
|
path = LocalStateDir + "/log/icinga2/icinga2.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ object CheckCommand "dummy" {
|
|||||||
PluginDir + "/check_dummy",
|
PluginDir + "/check_dummy",
|
||||||
"$dummy_state$",
|
"$dummy_state$",
|
||||||
"$dummy_text$"
|
"$dummy_text$"
|
||||||
],
|
]
|
||||||
|
|
||||||
vars.dummy_state = 0
|
vars.dummy_state = 0
|
||||||
vars.dummy_text = "Check was successful."
|
vars.dummy_text = "Check was successful."
|
||||||
@ -492,9 +492,9 @@ object CheckCommand "dns" {
|
|||||||
command = PluginDir + "/check_dns"
|
command = PluginDir + "/check_dns"
|
||||||
|
|
||||||
arguments = {
|
arguments = {
|
||||||
"-H" = "$dns_lookup$",
|
"-H" = "$dns_lookup$"
|
||||||
"-s" = "$dns_server$",
|
"-s" = "$dns_server$"
|
||||||
"-a" = "$dns_expected_answer$",
|
"-a" = "$dns_expected_answer$"
|
||||||
"-A" = {
|
"-A" = {
|
||||||
set_if = "$dns_authoritative$"
|
set_if = "$dns_authoritative$"
|
||||||
}
|
}
|
||||||
@ -510,8 +510,8 @@ object CheckCommand "dig" {
|
|||||||
command = PluginDir + "/check_dig"
|
command = PluginDir + "/check_dig"
|
||||||
|
|
||||||
arguments = {
|
arguments = {
|
||||||
"-H" = "$dig_server$",
|
"-H" = "$dig_server$"
|
||||||
"-l" = "$dig_lookup$",
|
"-l" = "$dig_lookup$"
|
||||||
}
|
}
|
||||||
|
|
||||||
vars.dig_server = "$address$"
|
vars.dig_server = "$address$"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user