Multiple dashboards are created with every sa file upload
Firstly, great framework! 👍
When collecting & uploading sa files to nginx, a new dashboard is created for every file. For example, if I upload the latest 31 SAR sa files from a host, I get 31 dashboards for that host, which appear to visualise metrics across the time window.
Behaviour appears to be consistent whether using Vizit or uploading directly from the web front-end.
Is there a way to group the input files, so that we only see a single dashboard for any given host?
A usage scenario is that over time, we have a script executed via cron to collect the latest sa file(s) from one or more hosts and copy locally, then upload to SARjitsu using Vizit.
Script contents:
#!/bin/bash
# Network details:
IP_SUBNET="1.2.3." # Last octet left blank intentionally
TARGET_IPS=( 11 12 13 14 15 16 17 18 19 20 ) # Creating an array of specific IPs to connect to
USERNAME="${USER}" # Using to more easily allow a different user context to be specified
#SSH_KEY="-i ${HOME}/.ssh/ssh_key" # Path to ssh key, unless _id_rsa_ is used
# Sarjitsu details:
SARJITSU_PATH="/home/${USER}/sarjitsu"
SAR_LOCAL_DATA_PATH="${SARJITSU_PATH}/sar_data"
VIZIT_PATH="${SARJITSU_PATH}/utils"
# Logging the date to collect the relevant SAR files:
DAY="[0-9][0-9]" # Capturing all sa* files, ignoring sar* ASCII text files
#DAY=$(date --date="yesterday" "+%d") # Yesterday
#DAY=$(date "+%d") # Today
cd ${VIZIT_PATH} # Required unless being run in the 'vizit' directory, or the script is amended to reflect a full path for the variable 'APP_CONF'
for NODE_OCTET in ${TARGET_IPS[*]}
do
NODE_IP_ADDRESS="${IP_SUBNET}${NODE_OCTET}"
# Collecting the SAR files from each remote node:
scp ${SSH_KEY} ${USERNAME}@${NODE_IP_ADDRESS}:/var/log/sa/sa${DAY} ${SAR_LOCAL_DATA_PATH}/${NODE_OCTET}/sa/${DAY}
#scp ${SSH_KEY} ${USERNAME}@${NODE_IP_ADDRESS}:/var/log/sa/sar${DAY} ${SAR_LOCAL_DATA_PATH}/${NODE_OCTET}/sar/${DAY}
# Uploading the collected SAR files to Sarjitsu using the Vizit client::
./vizit -d ${SAR_LOCAL_DATA_PATH}/${NODE_OCTET}/sa
#./vizit -p ${SAR_LOCAL_DATA_PATH}/${NODE_OCTET}/sar
#./vizit -f ${SAR_LOCAL_DATA_PATH}/${NODE_OCTET}/sa/${COLLECT_FILES}${DAY}
done
echo "Daily SAR collection & ingest activities complete"
date
Hi @whatsondoc Nice script there ;) This sounds like a decent feature request.
I've updated the labels. cc/ @portante thoughts?