mirror of
https://github.com/prometheus/prometheus
synced 2024-12-28 01:32:19 +00:00
Merge pull request #272 from prometheus/feature/status/uptime
Include uptime in the status console.
This commit is contained in:
commit
20d49ea169
1
main.go
1
main.go
@ -224,6 +224,7 @@ func main() {
|
||||
Config: conf.String(),
|
||||
TargetPools: targetManager.Pools(),
|
||||
Flags: flags,
|
||||
Birth: time.Now(),
|
||||
},
|
||||
CurationState: curationState,
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ import (
|
||||
"github.com/prometheus/prometheus/storage/metric"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type PrometheusStatus struct {
|
||||
@ -27,6 +28,8 @@ type PrometheusStatus struct {
|
||||
Flags map[string]string
|
||||
Rules string
|
||||
TargetPools map[string]*retrieval.TargetPool
|
||||
|
||||
Birth time.Time
|
||||
}
|
||||
|
||||
type StatusHandler struct {
|
||||
|
@ -1,7 +1,18 @@
|
||||
{{define "head"}}<!-- nix -->{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<h2>Build Info</h2>
|
||||
<h2>Runtime Information</h2>
|
||||
<div class="grouping_box">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Uptime</th>
|
||||
<td>{{.Birth}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h2>Build Information</h2>
|
||||
<div class="grouping_box">
|
||||
<table>
|
||||
<tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user