Error: Validation failed for object "command_endpoint = host.vars.client_endpoint"

  • What am I doing wrong?



    Error message:


    Code
    1. Oct 12 10:10:52 monitoring safe-reload[20953]: critical/config: Error: Validation failed for object 'host!apt' of type 'Service'; Attribute 'command_endpoint': Object 'host
    2. Oct 12 10:10:52 monitoring safe-reload[20953]: Location: in /etc/icinga2/conf.d/services.conf: 116:3-116:46
    3. Oct 12 10:10:52 monitoring safe-reload[20953]: /etc/icinga2/conf.d/services.conf(114):
    4. Oct 12 10:10:52 monitoring safe-reload[20953]: /etc/icinga2/conf.d/services.conf(115): assign where host.vars.os == "Linux"
    5. Oct 12 10:10:52 monitoring safe-reload[20953]: /etc/icinga2/conf.d/services.conf(116): command_endpoint = host.vars.client_endpoint
    6. Oct 12 10:10:52 monitoring safe-reload[20953]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    services.conf

    Code
    1. apply Service "apt" {
    2. import "generic-service"
    3. check_command = "apt"
    4. assign where host.vars.os == "Linux"
    5. command_endpoint = host.vars.client_endpoint
    6. }


    zones.conf


    Code
    1. object Zone "master" {
    2. endpoints = [ "monitoring" ] //array with endpoint names
    3. }
    4. object Endpoint "monitoring" {
    5. host = "monitoring"
    6. }


    host.conf typical host: