}
/**
- * The service template for ping checks. In an Icinga 1.x environment
+ * The service templates for checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
-abstract object Service "ping" inherits "icinga-service" {
- check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
-
- macros += {
- wrta = 50,
- wpl = 5,
- crta = 100,
- cpl = 10
- }
-}
-
-/**
- * And finally we define some host that should be checked.
- */
-object Host "localhost" {
- services = { "ping" },
-
- macros = {
- address = "127.0.0.1"
- },
-
- check_interval = 1m
-}
-
-
-
-/**
- * Below, an advanced example of checking a host and its services
- */
/**
* ping
/**
- * one advanced icinga2 localhost
+ * And finally we define some host that should be checked.
*/
+
object Host "localhost-i2" {
services = {
"ping", "ping6",
* The service template for ping checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
-abstract object Service "ping" inherits "icinga-service" {
+abstract object Service "ping4" inherits "icinga-service" {
/* using check_winping from https://www.itefix.no/i2/check_winping */
check_command = "$plugindir$\check_ping.exe -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
/**
* And finally we define some host that should be checked.
*/
-object Host "localhost" {
- services = { "ping" },
+object Host "localhost-i2" {
+ services = { "ping4" },
macros = {
address = "127.0.0.1"