template Service "ufm_base" {
 vars.ufm_config_file = "/opt/lico/pub/ufm/ufm.ini"
}

apply Service "lico_ufm" {
 import "ufm_base"
 check_command = "lico_ufm_metrics"
 max_check_attempts = 5
 check_interval = 30s
 retry_interval = 30s
 assign where host.vars.is_master
 command_endpoint = host.vars.agent_endpoint

 vars.measurement = "lico_ufm_metrics"
}

apply Service "lico_ufm_monitoring" {
 import "ufm_base"
 check_command = "lico_ufm_monitoring"
 max_check_attempts = 5
 check_interval = 5m
 retry_interval = 5m
 assign where host.vars.is_master
 command_endpoint = host.vars.agent_endpoint

 vars.measurement = "lico_ufm_monitoring"
}