Skip to content

Commit

Permalink
updated dashboards
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlhansen committed Jul 17, 2024
1 parent 71f2da5 commit fc8b312
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ idrac_power_control_interval_in_minutes{id="0",name="System Power Control"} 1
This is not exactly an ordinary metric, but it is often convenient to be informed about new entries in the event log. The value of this metric is the unix timestamp for when the entry was created.

```text
idrac_log_entry{id="1",message="The process of installing an operating system or hypervisor is successfully completed",severity="OK"} 1631175352
idrac_events_log_entry{id="1",message="The process of installing an operating system or hypervisor is successfully completed",severity="OK"} 1631175352
```

### Storage
Expand Down
27 changes: 7 additions & 20 deletions grafana/idrac.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"uid": "${datasource}"
},
"enable": true,
"expr": "idrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"expr": "idrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"iconColor": "purple",
"name": "SEL",
"tagKeys": "instance,component,severity",
"tagKeys": "instance,severity",
"textFormat": "{{ message }}",
"titleFormat": "{{id}}:{{ component }}",
"titleFormat": "{{ id }}",
"useValueForTime": "on"
}
]
Expand Down Expand Up @@ -2644,18 +2644,6 @@
}
]
},
{
"matcher": {
"id": "byName",
"options": "component"
},
"properties": [
{
"id": "custom.width",
"value": 217
}
]
},
{
"matcher": {
"id": "byName",
Expand Down Expand Up @@ -2699,10 +2687,10 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "idrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"expr": "idrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"format": "table",
"instant": true,
"legendFormat": "{{id}} {{component}}: {{message}}",
"legendFormat": "{{ id }}: {{ message }}",
"range": false,
"refId": "A"
}
Expand Down Expand Up @@ -2737,7 +2725,7 @@
"id": "filterFieldsByName",
"options": {
"include": {
"pattern": "message|id|component|severity|Value"
"pattern": "message|id|severity|Value"
}
}
},
Expand All @@ -2747,10 +2735,9 @@
"excludeByName": {},
"indexByName": {
"Value": 0,
"component": 4,
"id": 2,
"instance": 1,
"message": 5,
"message": 4,
"severity": 3
},
"renameByName": {
Expand Down
27 changes: 7 additions & 20 deletions grafana/idrac_overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"uid": "${datasource}"
},
"enable": true,
"expr": "idrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"expr": "idrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"iconColor": "purple",
"name": "SEL",
"tagKeys": "instance,component,severity",
"tagKeys": "instance,severity",
"textFormat": "{{ message }}",
"titleFormat": "{{id}}:{{ component }}",
"titleFormat": "{{ id }}",
"useValueForTime": "on"
}
]
Expand Down Expand Up @@ -1828,18 +1828,6 @@
}
]
},
{
"matcher": {
"id": "byName",
"options": "component"
},
"properties": [
{
"id": "custom.width",
"value": 217
}
]
},
{
"matcher": {
"id": "byName",
Expand Down Expand Up @@ -1881,10 +1869,10 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "idrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_sel_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"expr": "idrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 < ${__to} and \nidrac_events_log_entry{job=~\"$job\", instance=~\"$instance\"} * 1000 > ${__from}",
"format": "table",
"instant": true,
"legendFormat": "{{id}} {{component}}: {{message}}",
"legendFormat": "{{ id }}: {{ message }}",
"range": false,
"refId": "A"
}
Expand Down Expand Up @@ -1919,7 +1907,7 @@
"id": "filterFieldsByName",
"options": {
"include": {
"pattern": "instance|message|id|component|severity|Value"
"pattern": "instance|message|id|severity|Value"
}
}
},
Expand All @@ -1929,10 +1917,9 @@
"excludeByName": {},
"indexByName": {
"Value": 0,
"component": 4,
"id": 2,
"instance": 1,
"message": 5,
"message": 4,
"severity": 3
},
"renameByName": {
Expand Down
2 changes: 1 addition & 1 deletion internal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func NewCollector() *Collector {
[]string{"id", "name"}, nil,
),
EventLogEntry: prometheus.NewDesc(
prometheus.BuildFQName(prefix, "log", "entry"),
prometheus.BuildFQName(prefix, "events", "log_entry"),
"Entry from the system event log",
[]string{"id", "message", "severity"}, nil,
),
Expand Down
1 change: 1 addition & 0 deletions internal/collector/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ type EventLogResponse struct {
Description string `json:"Description"`
Members []struct {
Id string `json:"Id"`
EventId string `json:"EventId"`
Name string `json:"Name"`
Created string `json:"Created"`
Description string `json:"Description"`
Expand Down

0 comments on commit fc8b312

Please sign in to comment.