2020-10-02 12:18:08 -07:00
|
|
|
package admin
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"net/http"
|
|
|
|
|
2020-10-06 01:07:09 +08:00
|
|
|
"github.com/owncast/owncast/metrics"
|
2020-10-02 12:18:08 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// GetHardwareStats will return hardware utilization over time
|
|
|
|
func GetHardwareStats(w http.ResponseWriter, r *http.Request) {
|
|
|
|
metrics := metrics.Metrics
|
|
|
|
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
json.NewEncoder(w).Encode(metrics)
|
|
|
|
}
|