mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
feat(monitor): support temperature metrics
This commit is contained in:
@@ -35,7 +35,7 @@ func GetRegistryMetricInput() (metricInitInputs []monitor.MetricCreateInput) {
|
||||
if metricInitInputMap == nil {
|
||||
metricInitInputMap = make(map[string]monitor.MetricCreateInput)
|
||||
}
|
||||
for name, _ := range metricInitInputMap {
|
||||
for name := range metricInitInputMap {
|
||||
metricInitInputs = append(metricInitInputs, metricInitInputMap[name])
|
||||
}
|
||||
return
|
||||
@@ -272,6 +272,18 @@ func init() {
|
||||
newMetricFieldCreateInput("free", "Free storage", monitor.METRIC_UNIT_MB, 2),
|
||||
})
|
||||
|
||||
// lm-sensors temperature
|
||||
RegistryMetricCreateInput("agent_sensors", "Collect lm-sensors metrics",
|
||||
monitor.METRIC_RES_TYPE_AGENT, monitor.METRIC_DATABASE_TELE, 6, []monitor.MetricFieldCreateInput{
|
||||
newMetricFieldCreateInput("temp_input", "lm-sensors temperature input", "", 1),
|
||||
})
|
||||
|
||||
// smartctl device temperature
|
||||
RegistryMetricCreateInput("agent_smart_device", "Collect smartctl metrics",
|
||||
monitor.METRIC_RES_TYPE_AGENT, monitor.METRIC_DATABASE_TELE, 7, []monitor.MetricFieldCreateInput{
|
||||
newMetricFieldCreateInput("temp_c", "Disk device temperature ", "", 1),
|
||||
})
|
||||
|
||||
//jenkins
|
||||
RegistryMetricCreateInput("jenkins_node", "jenkins node",
|
||||
monitor.METRIC_RES_TYPE_JENKINS, monitor.METRIC_DATABASE_TELE, 1, []monitor.MetricFieldCreateInput{
|
||||
|
||||
Reference in New Issue
Block a user