project-config/grafana/create-nodepool.sh
Ian Wienand d34d7ad763 Consolidate nodepool graphs
All of these dashboards are the same, and have mostly copied all the
same issues with them.  This makes updating anything a massive pain.

This implements a single dashboard template with a small script to
create individual dashboards for each provider and its regions.

I have included a range of fixes.  The y-axis format has changed in
later versions of grafana.  The API time tracking is no longer scaled,
but we just tell grafana it is in ms and it displays it correctly.
The test nodes history graph is moved to the top, as it is probably
the most interesting graph (note this splits itself out per region, if
mulitple regions are selected).  Values for "null as zero" are
consistently set.  Various formatting fixes for the labels are
included.

Change-Id: I5fbffaec3c82aa1fce0947f771de67edd15f7dfc
2018-06-22 12:21:10 +10:00

30 lines
886 B
Bash
Executable File

#!/bin/bash
#
# Creates graphs for nodepool regions from a given provider
#
# Note we are somewhat particular about keeping these separate to
# avoid the idea that we are providing some sort of cross-provider
# benchmark.
#
function create {
local provider="$1"
local stat_list="$2"
local output_file="$3"
sed -e "s/%PROVIDER%/${provider}/; " \
-e "s/%STAT_LIST%/${stat_list}/" \
-e "s/%OUTPUT_FILE%/${output_file}/" \
nodepool.template > ${output_file}
}
create Rackspace 'rax-*' nodepool-rax.yaml
create Inap 'inap-*' nodepool-inap.yaml
create Limestone 'limestone-*' nodepool-limestone.yaml
create Linaro 'linaro-*' nodepool-linaro.yaml
create OVH 'ovh-*' nodepool-ovh.yaml
create Packethost 'packethost-*' nodepool-packethost.yaml
create Vexxhost 'vexxhost-*' nodepool-vexxhost.yaml
create Citycloud 'citycloud-*' nodepool-citycloud.yaml