succd: Export temperature values to prometheus
Also add metrics for all the temperature and humidity measurements.
This commit is contained in:
		
							parent
							
								
									4ac1b5eb32
								
							
						
					
					
						commit
						edb9051708
					
				
					 1 changed files with 20 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -233,6 +233,26 @@ func (s *webServer) viewMetrics(w http.ResponseWriter, r *http.Request) {
 | 
			
		|||
	fmt.Fprintf(w, "# HELP sem_vacuum_high_reached Whether a high vacuum has been reached (boolean)\n")
 | 
			
		||||
	fmt.Fprintf(w, "# TYPE sem_vacuum_high_reached gauge\n")
 | 
			
		||||
	fmt.Fprintf(w, "sem_vacuum_high_reached %f\n", boolToFloat(high))
 | 
			
		||||
 | 
			
		||||
	fmt.Fprintf(w, "# HELP sem_environment_temperature_celsius Environmental temperature of the SEM, in degrees celsius\n")
 | 
			
		||||
	fmt.Fprintf(w, "# TYPE sem_environment_temperature_celsius gauge\n")
 | 
			
		||||
	fmt.Fprintf(w, "sem_environment_temperature_celsius %f\n", state.tempSEM)
 | 
			
		||||
 | 
			
		||||
	fmt.Fprintf(w, "# HELP sem_environment_humidity_percent Environmental relative humidity of the SEM, in percent\n")
 | 
			
		||||
	fmt.Fprintf(w, "# TYPE sem_environment_humidity_percent gauge\n")
 | 
			
		||||
	fmt.Fprintf(w, "sem_environment_humidity_percent %f\n", state.humiditySEM)
 | 
			
		||||
 | 
			
		||||
	fmt.Fprintf(w, "# HELP sem_dp_bottom_temperature_celsius Temperature of the DP bottom, in degrees celsius\n")
 | 
			
		||||
	fmt.Fprintf(w, "# TYPE sem_dp_bottom_temperature_celsius gauge\n")
 | 
			
		||||
	fmt.Fprintf(w, "sem_dp_bottom_temperature_celsius %f\n", state.tempDPBottom)
 | 
			
		||||
 | 
			
		||||
	fmt.Fprintf(w, "# HELP sem_dp_top_temperature_celsius Temperature of the DP top, in degrees celsius\n")
 | 
			
		||||
	fmt.Fprintf(w, "# TYPE sem_dp_top_temperature_celsius gauge\n")
 | 
			
		||||
	fmt.Fprintf(w, "sem_dp_top_temperature_celsius %f\n", state.tempDPTop)
 | 
			
		||||
 | 
			
		||||
	fmt.Fprintf(w, "# HELP sem_dp_inlet_temperature_celsius Temperature of the DP inlet flange, in degrees celsius\n")
 | 
			
		||||
	fmt.Fprintf(w, "# TYPE sem_dp_inlet_temperature_celsius gauge\n")
 | 
			
		||||
	fmt.Fprintf(w, "sem_dp_inlet_temperature_celsius %f\n", state.tempDPInlet)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *webServer) viewRoughingPumpEnable(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue