Update Prometheus console template example for 2.0 (#3100)

pull/3119/head
Brian Brazil 7 years ago committed by GitHub
parent 3a4ee617e0
commit 78205b76e9

@ -22,31 +22,11 @@
</tr> </tr>
<tr> <tr>
<td>Ingested Samples</td> <td>Ingested Samples</td>
<td>{{ template "prom_query_drilldown" (args (printf "irate(prometheus_local_storage_ingested_samples_total{job='prometheus',instance='%s'}[5m])" .Params.instance) "/s" "humanizeNoSmallPrefix") }}</td> <td>{{ template "prom_query_drilldown" (args (printf "irate(tsdb_samples_appended_total{job='prometheus',instance='%s'}[5m])" .Params.instance) "/s" "humanizeNoSmallPrefix") }}</td>
</tr> </tr>
<tr> <tr>
<td>Time Series</td> <td>Blocks Loaded</td>
<td>{{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_series{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }}</td> <td>{{ template "prom_query_drilldown" (args (printf "tsdb_blocks_loaded{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }}</td>
</tr>
<tr>
<td>Indexing Queue</td>
<td>{{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_indexing_queue_length{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }}</td>
</tr>
<tr>
<td>Chunks</td>
<td>{{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_chunks{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }}</td>
</tr>
<tr>
<td>Chunk Descriptors</td>
<td>{{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_chunkdescs{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }}</td>
</tr>
<tr>
<td>Chunks To Persist</td>
<td>{{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_chunks_to_persist{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }}</td>
</tr>
<tr>
<td>Checkpoint Duration</td>
<td>{{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_checkpoint_last_duration_seconds{job='prometheus',instance='%s'}" .Params.instance) "" "humanizeDuration") }}</td>
</tr> </tr>
<tr> <tr>
@ -84,7 +64,7 @@
<script> <script>
new PromConsole.Graph({ new PromConsole.Graph({
node: document.querySelector("#samplesGraph"), node: document.querySelector("#samplesGraph"),
expr: "irate(prometheus_local_storage_ingested_samples_total{job='prometheus',instance='{{ .Params.instance }}'}[5m])", expr: "irate(tsdb_samples_appended_total{job='prometheus',instance='{{ .Params.instance }}'}[5m])",
name: 'Ingested Samples', name: 'Ingested Samples',
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix, yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix, yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
@ -93,19 +73,6 @@
}) })
</script> </script>
<h3>Time Series</h3>
<div id="seriesGraph"></div>
<script>
new PromConsole.Graph({
node: document.querySelector("#seriesGraph"),
expr: "prometheus_local_storage_memory_series{job='prometheus',instance='{{ .Params.instance }}'}",
name: 'Time Series',
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yTitle: "Time Series",
})
</script>
<h3>HTTP Server</h3> <h3>HTTP Server</h3>
<div id="serverGraph"></div> <div id="serverGraph"></div>
<script> <script>

@ -15,15 +15,13 @@
<th>Prometheus</th> <th>Prometheus</th>
<th>Up</th> <th>Up</th>
<th>Ingested Samples</th> <th>Ingested Samples</th>
<th>Time Series</th>
<th>Memory</th> <th>Memory</th>
</tr> </tr>
{{ range query "up{job='prometheus'}" | sortByLabel "instance" }} {{ range query "up{job='prometheus'}" | sortByLabel "instance" }}
<tr> <tr>
<td><a href="prometheus-overview.html?instance={{ .Labels.instance }}">{{ .Labels.instance }}</a></td> <td><a href="prometheus-overview.html?instance={{ .Labels.instance }}">{{ .Labels.instance }}</a></td>
<td {{ if eq (. | value) 1.0 }}>Yes{{ else }} class="alert-danger">No{{ end }}</td> <td {{ if eq (. | value) 1.0 }}>Yes{{ else }} class="alert-danger">No{{ end }}</td>
<td class="text-right">{{ template "prom_query_drilldown" (args (printf "irate(prometheus_local_storage_ingested_samples_total{job='prometheus',instance='%s'}[5m])" .Labels.instance) "/s" "humanizeNoSmallPrefix") }}</td> <td class="text-right">{{ template "prom_query_drilldown" (args (printf "irate(tsdb_samples_appended_total{job='prometheus',instance='%s'}[5m])" .Labels.instance) "/s" "humanizeNoSmallPrefix") }}</td>
<td class="text-right">{{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_series{job='prometheus',instance='%s'}" .Labels.instance) "" "humanize") }}</td>
<td class="text-right">{{ template "prom_query_drilldown" (args (printf "process_resident_memory_bytes{job='prometheus',instance='%s'}" .Labels.instance) "B" "humanize1024")}}</td> <td class="text-right">{{ template "prom_query_drilldown" (args (printf "process_resident_memory_bytes{job='prometheus',instance='%s'}" .Labels.instance) "B" "humanize1024")}}</td>
</tr> </tr>
{{ else }} {{ else }}

Loading…
Cancel
Save