This repository was archived by the owner on Aug 30, 2021. It is now read-only.
This repository was archived by the owner on Aug 30, 2021. It is now read-only.
Multi-value variable with Repeat for each value produces charts with all metrics #71
Open
Description
We're using Grafana to display metrics from KairosDB database.
We are using Grafana in Docker. Our Dockerfile is as follows:
ARG GRAFANA_VERSION="latest"
FROM grafana/grafana:${GRAFANA_VERSION}
ARG KAIROS_DATASOURCE_BRANCH="master"
# To use with git clone --single-branch -b ${KAIROS_DATSOURCE_BRANCH}
# --branch can also take tags and detaches the HEAD at that commit in the resulting repository.
# See https://git-scm.com/docs/git-clone
USER root
RUN apt-get update && apt-get -y install gnupg2 apt-transport-https lsb-release bzip2 && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install --no-install-recommends -y git nodejs && \
cd $GF_PATHS_PLUGINS && \
git clone --single-branch -b ${KAIROS_DATASOURCE_BRANCH} https://github.com/grafana/kairosdb-datasource && \
cd kairosdb-datasource && \
npm install -g grunt-cli && \
npm install && \
grunt && \
apt-get --purge -y autoremove git nodejs gnupg2 bzip2 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
USER grafana
ARG GF_INSTALL_PLUGINS="grafana-clock-panel,grafana-simple-json-datasource"
RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
OLDIFS=$IFS; \
IFS=','; \
for plugin in ${GF_INSTALL_PLUGINS}; do \
IFS=$OLDIFS; \
grafana-cli --pluginsDir "$GF_PATHS_PLUGINS" plugins install ${plugin}; \
done; \
fi
- The KairosDB version we are using is
KairosDB 1.2.1-1.20180331130457
- The Grafana version we built our docker image against is
Grafana v5.2.1 (2040f61)
We use variables to query metrics with regex:
We then created a chart panel repeating for each value of variable:
We filled the panel Metrics options as follow:
When selecting only one variable, everything is working fine:
But when we select more than 1 metric, all metrics are displayed on all charts (and only first one uses alias)
I didn't use Grafana before but I'm quite sure that I saw dashboards using such features and working fine !
Can you confirm that I'm not misusing any feature ?
This issue is mentionned in How reference a multi-variable on alias #66