2015-01-23 17:40:48 +00:00
|
|
|
{{ template "head" . }}
|
2014-11-20 18:41:25 +00:00
|
|
|
|
2015-01-23 17:40:48 +00:00
|
|
|
{{ template "prom_right_table_head" }}
|
2014-11-20 18:41:25 +00:00
|
|
|
<th colspan="2">Disks</th>
|
|
|
|
</tr>
|
2015-01-23 17:40:48 +00:00
|
|
|
{{ range printf "node_disk_io_time_ms{job='node',instance='%s'}" .Params.instance | query | sortByLabel "device" }}
|
2014-11-20 18:41:25 +00:00
|
|
|
<th colspan="2">{{ .Labels.device }}</th>
|
|
|
|
<tr>
|
|
|
|
<td>Utilization</td>
|
2015-02-19 10:06:23 +00:00
|
|
|
<td>{{ template "prom_query_drilldown" (args (printf "rate(node_disk_io_time_ms{job='node',instance='%s',device='%s'}[5m]) / 1000 * 100" .Labels.instance .Labels.device) "%" "printf.1f") }}</td>
|
2014-11-20 18:41:25 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Throughput</td>
|
|
|
|
<td>{{ template "prom_query_drilldown" (args (printf "rate(node_disk_sectors_read{job='node',instance='%s',device='%s'}[5m]) * 512 + rate(node_disk_sectors_written{job='node',instance='%s',device='%s'}[5m]) * 512" .Labels.instance .Labels.device .Labels.instance .Labels.device) "B/s" "humanize") }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Avg Read Time</td>
|
|
|
|
<td>{{ template "prom_query_drilldown" (args (printf "rate(node_disk_read_time_ms{job='node',instance='%s',device='%s'}[5m]) / 1000 / rate(node_disk_reads_completed{job='node',instance='%s',device='%s'}[5m])" .Labels.instance .Labels.device .Labels.instance .Labels.device) "s" "humanize") }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Avg Write Time</td>
|
|
|
|
<td>{{ template "prom_query_drilldown" (args (printf "rate(node_disk_write_time_ms{job='node',instance='%s',device='%s'}[5m]) / 1000 / rate(node_disk_writes_completed{job='node',instance='%s',device='%s'}[5m])" .Labels.instance .Labels.device .Labels.instance .Labels.device) "s" "humanize") }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
<th colspan="2">Filesystem Fullness</th>
|
|
|
|
</tr>
|
2015-01-23 17:40:48 +00:00
|
|
|
{{ define "roughlyNearZero" }}
|
2015-02-19 10:06:23 +00:00
|
|
|
{{ if gt .1 . }}~0{{ else }}{{ printf "%.1f" . }}{{ end }}
|
2014-11-20 18:41:25 +00:00
|
|
|
{{ end }}
|
2015-07-22 16:20:14 +00:00
|
|
|
{{ range printf "node_filesystem_size{job='node',instance='%s'}" .Params.instance | query | sortByLabel "mountpoint" }}
|
2014-11-20 18:41:25 +00:00
|
|
|
<tr>
|
2015-07-22 16:20:14 +00:00
|
|
|
<td>{{ .Labels.mountpoint }}</td>
|
|
|
|
<td>{{ template "prom_query_drilldown" (args (printf "100 - node_filesystem_free{job='node',instance='%s',mountpoint='%s'} / node_filesystem_size{job='node'} * 100" .Labels.instance .Labels.mountpoint) "%" "roughlyNearZero") }}</td>
|
2014-11-20 18:41:25 +00:00
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
<tr>
|
|
|
|
</tr>
|
2015-01-23 17:40:48 +00:00
|
|
|
{{ template "prom_right_table_tail" }}
|
2014-11-20 18:41:25 +00:00
|
|
|
|
2015-01-23 17:40:48 +00:00
|
|
|
{{ template "prom_content_head" . }}
|
2014-11-20 18:41:25 +00:00
|
|
|
<h1>Node Disk - {{ reReplaceAll "(.*?://)([^:/]+?)(:\\d+)?/.*" "$2" .Params.instance }}</h1>
|
|
|
|
|
|
|
|
<h3>Disk I/O Utilization</h3>
|
|
|
|
<div id="diskioGraph"></div>
|
|
|
|
<script>
|
|
|
|
new PromConsole.Graph({
|
|
|
|
node: document.querySelector("#diskioGraph"),
|
|
|
|
expr: [
|
2015-01-23 17:40:48 +00:00
|
|
|
"rate(node_disk_io_time_ms{job='node',instance='{{ .Params.instance }}',device!~'^(md\\d+$|dm-)'}[5m]) / 1000 * 100",
|
2014-11-20 18:41:25 +00:00
|
|
|
],
|
|
|
|
min: 0,
|
|
|
|
name: '[[ device ]]',
|
|
|
|
yUnits: "%",
|
|
|
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
|
|
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
|
|
|
yTitle: 'Disk I/O Utilization'
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
<h3>Filesystem Usage</h3>
|
|
|
|
<div id="fsGraph"></div>
|
|
|
|
<script>
|
|
|
|
new PromConsole.Graph({
|
|
|
|
node: document.querySelector("#fsGraph"),
|
|
|
|
expr: "100 - node_filesystem_free{job='node',instance='{{ .Params.instance }}'} / node_filesystem_size{job='node'} * 100",
|
|
|
|
min: 0,
|
|
|
|
max: 100,
|
|
|
|
name: '[[ filesystem ]]',
|
|
|
|
yUnits: "%",
|
|
|
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
|
|
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
|
|
|
yTitle: 'Filesystem Fullness'
|
|
|
|
})
|
|
|
|
</script>
|
2015-01-23 17:40:48 +00:00
|
|
|
{{ template "prom_content_tail" . }}
|
2014-11-20 18:41:25 +00:00
|
|
|
|
2015-01-23 17:40:48 +00:00
|
|
|
{{ template "tail" }}
|