Plugin "check_ilo2_health" richtig in Icinga2 integrieren, wie?

fluffy-bunny

New Member
Hallo zusammen!

Ich bin zur Zeit dabei, das Plugin "check_ilo2_health" zum Testen in meine Icinga2-Testumgebung einzubauen und habe mir ein Host-Object, ein Apply-Rule und ein Service- und Host-Template gebastelt, welche wie folgt ausschauen:

Host-Object:

Code:
object Host "ilo-192.168.120.15" {
        import "host-template-generice-host"

        display_name      = "ILO"
        address       = "192.168.120.15"

        vars.ilo = {
                ip = "192.168.120.15"
                username = "fluffybunny"
                password = "fluffy-pw"
        }

        vars.ilo.ip = "192.168.120.15"
        vars.ilo.username = "fluffybunny"
        vars.ilo.password = "fluffy-pw"


}
Apply-Rule:

Code:
apply Service "ilo" {
        check_command = "check_ilo2_health"
        display_name = "iLo"

        vars.ilo_address = host.vars.ilo.ip
        vars.ilo_user = host.vars.ilo.username
        vars.ilo_pwd = host.vars.ilo.password

        assign where match("ilo*", host.name)
        assign where host.name == "ilo-192.168.120.15"

}
Service-Template:

Code:
template Service "generic-service" {
  max_check_attempts = 5
  check_interval = 10s
  retry_interval = 10s
}
Host-Template:

Code:
template Host "host-template-generice-host" {
  max_check_attempts = 3
  check_interval = 10s
  retry_interval = 10s

  check_command = "hostalive"
}
Leider will mein Service nicht so wirklich unter dem Host-Object "ilo-192.168.120.15" auftauchen :(.... Kann mir jemand sagen, was ich falsch gemacht habe?

Vielen Dank euch :)
 

DjTom-i

Member
Code:
apply Service "ilo" {
        import "generic-service"
        
        check_command = "check_ilo2_health"
        display_name = "iLo"

        vars.ilo_address = host.vars.ilo.ip
        vars.ilo_user = host.vars.ilo.username
        vars.ilo_pwd = host.vars.ilo.password

        assign where match("ilo*", host.name)
        assign where host.name == "ilo-192.168.120.15"

}
Sweit ich sehe fehlt der import beim apply service..
 

fluffy-bunny

New Member
Aber läuft das nicht über das ' assign where host.name == "ilo-192.168.120.15" ' ?
Das müsste doch eigentlich dadrüber dem Host-Template "ilo-192.168.120.15" zugewiesen werden, oder?
 
Top