Skip to content

Instantly share code, notes, and snippets.

@lazyfrosch
Created January 5, 2015 13:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lazyfrosch/51299c416656fe76209f to your computer and use it in GitHub Desktop.
Save lazyfrosch/51299c416656fe76209f to your computer and use it in GitHub Desktop.
Icinga 2 Command Endpoint example
template Host "generic-agent" {
import "generic-host"
object Endpoint __name {
host = "$host.address$"
}
object Zone __name {
parent = "master"
endpoints = [ __name ]
}
}
object Host "web123" {
import "generic-agent"
address = "1.2.3.4"
}
apply Service "disk" {
import "generic-service"
command = "disks"
vars.disk_path = "/"
command_endpoint = "$host.name$"
assign where host.os == "Linux"
}
#---------------------------------------------------
include <itl>
object Endpoint NodeName ...
object Zone NodeName ...
parent = "master"
object Endpoint "icinga-master1" ...
object Zone "master" ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment