ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
MySQL
=====
Nested Filter POC Dashboard
---------------------------
Variable Definition
$hostname SELECT hostname FROM grafana_teting
$subhost SELECT subhost FROM grafana_teting WHERE hostname =
$hostname
-------------------------------------------------------------------------
-------------------------------------------------------------
Elasticsearch
=============
Variable Definition
$Filters
$NewFilter 1,2,3,5,10
Variable Definition
$source {"find": "terms", "field": "@source"}
$host {"find": "terms", "field": "@hostname", "query":
"@source:$source"}
$adhoc
-------------------------------------------------------------------------
-------------------------------------------------------------
Graphite
========
Variable Definition
$app apps.*
$server apps.$app.*
$interval 1m,10m,30m,1h,6h,12h,1d,7d,14d,30d
Variable Definition
$servers_users servers
$serversN_usersN _test-data.$servers_users.*
$requests_data _test-data.$servers_users.$serversN_usersN.*
$count _test-
data.$servers_users.$serversN_usersN.$requests_data.*
-------------------------------------------------------------------------
-------------------------------------------------------------
InfluxDB
========
Variable Definition
$datacenterSHOW TAG VALUES WITH KEY = "datacenter"
$host SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~
/^$datacenter$/
$summarize 1m,10m,30m,1h,6h,12h,1d,7d,14d,30d
$adhoc
-------------------------------------------------------------------------
-------------------------------------------------------------
Prometheus
==========
Variable Definition
$node label_values(node_load1{job="node"}, instance)
$filesystem_mountpoint query_result(node_filesystem_size{job="node",
instance=~"$node:.*", device=~"/dev/.*",
mountpoint!="/var/lib/docker/aufs"})

More Related Content

Quick reference for Grafana

  • 1. MySQL ===== Nested Filter POC Dashboard --------------------------- Variable Definition $hostname SELECT hostname FROM grafana_teting $subhost SELECT subhost FROM grafana_teting WHERE hostname = $hostname ------------------------------------------------------------------------- ------------------------------------------------------------- Elasticsearch ============= Variable Definition $Filters $NewFilter 1,2,3,5,10 Variable Definition $source {"find": "terms", "field": "@source"} $host {"find": "terms", "field": "@hostname", "query": "@source:$source"} $adhoc ------------------------------------------------------------------------- ------------------------------------------------------------- Graphite ======== Variable Definition $app apps.* $server apps.$app.* $interval 1m,10m,30m,1h,6h,12h,1d,7d,14d,30d Variable Definition $servers_users servers $serversN_usersN _test-data.$servers_users.* $requests_data _test-data.$servers_users.$serversN_usersN.* $count _test- data.$servers_users.$serversN_usersN.$requests_data.* ------------------------------------------------------------------------- ------------------------------------------------------------- InfluxDB ======== Variable Definition $datacenterSHOW TAG VALUES WITH KEY = "datacenter" $host SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~ /^$datacenter$/ $summarize 1m,10m,30m,1h,6h,12h,1d,7d,14d,30d $adhoc ------------------------------------------------------------------------- ------------------------------------------------------------- Prometheus ========== Variable Definition $node label_values(node_load1{job="node"}, instance) $filesystem_mountpoint query_result(node_filesystem_size{job="node", instance=~"$node:.*", device=~"/dev/.*", mountpoint!="/var/lib/docker/aufs"})