- notification_interval=24*60*3.5,
- escalation_options="r,c",
- contact_groups="%s-techs,%s-pis,%s-sliceusers" % (lb,lb,lb))
-
- sd1 = ServiceDependency(host_name=hn,
- service_description="aSSH",
- dependent_host_name=hn,
- dependent_service_description="bSSH806",
- execution_failure_criteria="w,u,c,p",)
-
- sd2 = ServiceDependency(host_name=hn,
- service_description="aSSH",
- dependent_host_name=hn,
- dependent_service_description="cHTTP",
- execution_failure_criteria="w,u,c,p",)
-
- sd3 = ServiceDependency(host_name=hn,
- service_description="aSSH",
- dependent_host_name=hn,
- dependent_service_description="dCOTOP",
- execution_failure_criteria="w,u,c,p",)
-
- for service in [s1,s2,s3,s4,se1,se2,se3,sd1,sd2,sd3]:
+ notification_interval=40, # 24*60*.5,
+ escalation_options="r,d",
+ contact_groups="%s-pis" % lb)
+
+ # NOTE: send notices to Slice users after two weeks. (4 prior notices)
+ he3 = HostEscalation( host_name="site-cluster-for-%s" % lb,
+ first_notification=7,
+ last_notification=0,
+ notification_interval=40, # 24*60*.5,
+ escalation_options="r,d",
+ contact_groups="%s-sliceusers" % lb)
+
+ for he in [he1, he2, he3]:
+ print he.toString()
+
+ s1 = Service(use="planetlab-service",
+ host_name=hn_list,
+ service_description="aSSH",
+ display_name="aSSH",
+ servicegroups="NET,SSH",
+ check_command="check_ssh!-t 120")
+ s2 = Service(use="planetlab-service",
+ host_name=hn_list,
+ service_description="bMODE",
+ display_name="bMODE",
+ servicegroups="NET,MODE",
+ notifications_enabled="1",
+ check_command="check_mode")
+ s3 = Service(use="planetlab-service",
+ host_name=hn_list,
+ service_description="cPCU",
+ display_name="cPCU",
+ servicegroups="NET,PCU",
+ notifications_enabled="0",
+ check_command="check_pcu")
+ #s4 = Service(use="planetlab-service",
+ # host_name=hn_list,
+ # service_description="dCOTOP",
+ # display_name="dCOTOP",
+ # servicegroups="NET,COTOP",
+ # notifications_enabled="0",
+ # check_command="check_http!-p 3120 -t 120")
+
+ # NOTE: if the http service is broken, then try to repair the node.
+ # TODO: how to check that this only triggers if aSSH is ok?
+ se1 = ServiceEscalation(host_name=hn_list,
+ service_description="bMODE",
+ first_notification=1,
+ last_notification=0,
+ escalation_options="w,c,r",
+ notification_interval=20,
+ contacts="automate-service-repair-contact")
+
+ #sd1 = ServiceDependency(host_name=hn_list,
+ # service_description="aSSH",
+ # dependent_service_description="bSSH806,cHTTP,dCOTOP",
+ # execution_failure_criteria="w,u,c,p",)
+
+ for service in [s1,s2,s3,se1]: