Send email alert when tempmon server marks a client as offline
courtesy of Cole Chaney <cole@mamajeansmarket.com>
This commit is contained in:
		
							parent
							
								
									8a1551e0f5
								
							
						
					
					
						commit
						5df3379995
					
				
					 3 changed files with 18 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -83,6 +83,8 @@ class TempmonServerDaemon(Daemon):
 | 
			
		|||
        if not online and client.online:
 | 
			
		||||
            log.info("marking client as OFFLINE: {}".format(client))
 | 
			
		||||
            client.online = False
 | 
			
		||||
            send_email(self.config, 'tempmon_client_offline', {"client":client, "now":localtime(self.config,self.now,from_utc=True)})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def check_readings_for_probe(self, session, probe, cutoff):
 | 
			
		||||
        readings = session.query(tempmon.Reading)\
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue