mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 02:35:07 +01:00 
			
		
		
		
	Little fixes to the prometheus sink (#115)
* Add uint64 to float64 cast option * Add prometheus sink to the list of available sinks * Add aggregated counters by gpu for nvlink errors --------- Co-authored-by: Michael Schwarz <schwarz@uni-paderborn.de>
This commit is contained in:
		@@ -49,6 +49,8 @@ func intToFloat64(input interface{}) (float64, error) {
 | 
			
		||||
		return float64(value), nil
 | 
			
		||||
	case int64:
 | 
			
		||||
		return float64(value), nil
 | 
			
		||||
	case uint64:
 | 
			
		||||
		return float64(value), nil
 | 
			
		||||
	}
 | 
			
		||||
	return 0, errors.New("cannot cast value to float64")
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ var AvailableSinks = map[string]func(name string, config json.RawMessage) (Sink,
 | 
			
		||||
	"influxdb":    NewInfluxSink,
 | 
			
		||||
	"influxasync": NewInfluxAsyncSink,
 | 
			
		||||
	"http":        NewHttpSink,
 | 
			
		||||
	"prometheus":  NewPrometheusSink,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Metric collector manager data structure
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user