Grafana + Influx share variables between measurements

  • What Grafana version and what operating system are you using?

v9.3.2 & Ubuntu 22.04

  • What are you trying to achieve?
    I have two measurements in Influx: syslog & metric_data, both have a “tenantName” in common. Syslog messages contain “tenantName” so I would like to load graphs for a specific tenant as well as logs associated with that tenant.

  • How are you trying to achieve it?

TenantVAR:
SHOW TAG VALUES WITH KEY = “tenantName”

MessageVAR:
SELECT * from syslog WHERE message =~ /^$tenant$/

CLI:

show measurements
name: measurements
name


exec_versa_monitoring
syslog

SHOW TAG VALUES WITH KEY = “tenantName”
name: exec_versa_monitoring
key value


tenantName MigrationTest1
tenantName Mister_Brown
tenantName Mister_Green
tenantName Mister_Joe
tenantName Mister_Purple
tenantName Mister_Red
tenantName Organziation-TEST-10
tenantName PPPOE-Test
tenantName Performance1
tenantName Provider-Org
tenantName Reg-Lab-Org-7
tenantName Reg-Lab-Org1
tenantName Reg-Lab-Org10
tenantName Reg-Lab-Org11
tenantName Reg-Lab-Org12
tenantName Reg-Lab-Org13
tenantName Reg-Lab-Org14
tenantName Reg-Lab-Org16
tenantName Reg-Lab-Org17
tenantName Reg-Lab-Org18
tenantName Reg-Lab-Org2
tenantName Reg-Lab-Org3
tenantName Reg-Lab-Org4
tenantName Reg-Lab-Org5
tenantName Reg-Lab-Org6
tenantName Reg-Lab-Org9
tenantName Reg-Lab_Org8
tenantName Spirent-PoC
tenantName TransitionOrg

SELECT * FROM syslog WHERE message =~ /MigrationTest1/ LIMIT 1
name: syslog
time appname facility facility_code hostname message severity severity_code timestamp version


1675101329858885316 sdwanHealthLog, user 1 versa-analytics tenantName=MigrationTest1, generateTime=1675101300, tenantId=53, applianceId=0, vsnId=0, duration=300000, pathsUp=0, pathsDown=0, pathsNoConf=0, rmtSitesUp=0, rmtSitesDown=0, allRmtSitesDown=0, allRmtSitesDownTime=0, svcUptime=19467294, allLclCktDown=0 notice 5 1675101329857890000 1

  • What happened?

“None” is returned when variable is created via Grafana UI

  • What did you expect to happen?

Expect a list of syslog messages matching the query

  • Can you copy/paste the configuration(s) that you are having problems with?

See able

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

No errors other than None being returned

  • Did you follow any online instructions? If so, what is the URL?
    No