created docker-prometheus compose file and edited the Prometheus yml file
This commit is contained in:
45
prom/consoles/aws_elasticache.html
Normal file
45
prom/consoles/aws_elasticache.html
Normal file
@ -0,0 +1,45 @@
|
||||
{{ 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>
|
||||
|
||||
<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 "prom_content_tail" . }}
|
||||
|
||||
{{ template "tail" }}
|
Reference in New Issue
Block a user