mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 07:23:02 +00:00
e3c375b9b0
Only display jobs in the LHS if they're present.
46 lines
1.8 KiB
HTML
46 lines
1.8 KiB
HTML
{{ template "head" . }}
|
|
|
|
{{ template "prom_right_table_head" }}
|
|
{{ range printf "sum by (cache_cluster_id)(aws_elasticache_cpuutilization_average{job='aws_elasticache'})" | query | sortByLabel "cache_cluster_id" }}
|
|
<tr>
|
|
<th colspan="2">{{ .Labels.cache_cluster_id }}</th>
|
|
</tr>
|
|
<tr>
|
|
<td>CPU</td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "aws_elasticache_cpuutilization_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "%" "printf.3g") }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Cache Size</td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "aws_elasticache_bytes_used_for_cache_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "B" "humanize1024") }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Cache Items</td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "aws_elasticache_curr_items_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "" "humanize") }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Freeable Memory</td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "aws_elasticache_freeable_memory_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "B" "humanize1024") }}</td>
|
|
</tr>
|
|
{{ end }}
|
|
{{ template "prom_right_table_tail" }}
|
|
|
|
{{ template "prom_content_head" . }}
|
|
<h1>AWS ElastiCache</h1>
|
|
{{ template "prom_content_tail" . }}
|
|
|
|
<h3>CPU</h3>
|
|
<div id="queryGraph"></div>
|
|
<script>
|
|
new PromConsole.Graph({
|
|
node: document.querySelector("#queryGraph"),
|
|
expr: "sum by (cache_cluster_id)(aws_elasticache_cpuutilization_average{job='aws_elasticache'})",
|
|
name: "[[cache_cluster_id]]",
|
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
|
yUnits: "%",
|
|
yTitle: "CPU"
|
|
})
|
|
</script>
|
|
|
|
{{ template "tail" }}
|