Closed jamiesun closed 10 years ago
These attributes are deprecated (you won't find them in the docs). But you can use service.set_attribute instead of setattr(service) and it will work as intended. On Jun 4, 2014 6:25 AM, "jamiesun" notifications@github.com wrote:
save service issues:
def update_service(self,sid,serv_desc,check_command,sync=True,**kwargs): service = self.get_service(sid) if not service: return Result(1,"service is not exists")
service.use = kwargs.pop("use") service.service_description = serv_desc service.check_command = check_command service.notifications_enabled = kwargs.pop('notifications_enabled',0) service.process_perf_data = kwargs.pop("process_perf_data",1) service.max_check_attempts = kwargs.pop("max_check_attempts",1) service.normal_check_interval = kwargs.pop("normal_check_interval",5) service.retry_check_interval = kwargs.pop("retry_check_interval",1) log.info(service) for _k,_v in kwargs.items(): if hasattr(service,_k) and _v: setattr(service,_k,_v) service.save() ....
normal_check_interval and retry_check_interval can not saved.
log info:
[I 140604 11:04:20 nagutils:301] define service { host_name localhost use generic-service service_description CPU coretemp check_command check_local_temp max_check_attempts 1 notifications_enabled 0 process_perf_data 1 }
— Reply to this email directly or view it on GitHub https://github.com/pynag/pynag/issues/145.
thanks
save service issues:
normal_check_interval and retry_check_interval can not saved.
log info: