4.07L Table Panel Lab - MartinWong06/grafana GitHub Wiki

Table Panel Lab

  1. Access mysql container
sudo docker exec -it mysql /bin/sh
  1. Login to mysql
mysql -u grafana -p
  1. Create animal table
CREATE TABLE `grafana`.`animal` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `username` varchar(45) DEFAULT NULL,
    `total` decimal(10,0) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
  1. Insert data to animal table
INSERT INTO `grafana`.`animal`
  (`username`,
  `total`)
  VALUES
  ('Cat',56),
  ('Dog',35),
  ('Lizard',41),
  ('Crocodile',22),
  ('Koala',26),
  ('Cassowary',29),
  ('Peacock',19),
  ('Emu',10),
  ('Kangaroo',13);
  1. Query data from animal table
SELECT * FROM `grafana`.`animal`;
  1. Create color table
CREATE TABLE `grafana`.`color` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `max` varchar(45) DEFAULT NULL,
    `mean` decimal(10,0) DEFAULT NULL,
	`last` decimal(10,0) DEFAULT NULL,
	`min` decimal(10,0) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
  1. Insert data to color table
INSERT INTO `grafana`.`color`
  (`max`,
  `mean`,`last`,`min`)
  VALUES
  (107,102,99.2,96.5),
  (90.4,87.6,89.8,84.5),
  (76.7,72.1,76.1,68.0),
  (52.8,46.3,50.3,40.2),
  (39.8,34.9,35.7,29.6),
  (33.2,22.4,30.2,12.3),
  (19.5,16.2,12.7,12.0);
  1. Query data from color table
SELECT * FROM `grafana`.`color`;
  1. Create Organization Table
CREATE TABLE `grafana`.`organization` (
    `organizationId` varchar(30) NOT NULL,
    `Name` varchar(60) DEFAULT NULL,
    `Website` varchar(1000) DEFAULT NULL,
	`Country` varchar(1000) DEFAULT NULL,
	`Description` varchar(10000) DEFAULT NULL,
	`Founded` int(4) DEFAULT NULL,
	`Industry` varchar(1000) DEFAULT NULL,
	`no_of_employees` int(10) DEFAULT NULL,
    PRIMARY KEY (`organizationId`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  1. Insert data to organization table
INSERT INTO `grafana`.`organization`
  (`organizationId`,
  `Name`,`Website`,`Country`,
  `Description`,`Founded`,`Industry`,`no_of_employees`)
  VALUES
("FAB0d41d5b5d22c","Ferrell LLC","https://price.net/","Papua New Guinea","Horizontal empowering knowledgebase",1990,"Plastics",3498),
("6A7EdDEA9FaDC52","Mckinney, Riley and Day","http://www.hall-buchanan.info/","Finland","User-centric system-worthy leverage",2015,"Glass / Ceramics / Concrete",4952),
("0bFED1ADAE4bcC1","Hester Ltd","http://sullivan-reed.com/","China","Switchable scalable moratorium",1971,"Public Safety",5287),
("2bFC1Be8a4ce42f","Holder-Sellers","https://becker.com/","Turkmenistan","De-engineered systemic artificial intelligence","2004","Automotive",921),
("9eE8A6a4Eb96C24","Mayer Group","http://www.brewer.com/","Mauritius","Synchronized needs-based challenge",1991,"Transportation",7870),
("cC757116fe1C085","Henry-Thompson","http://morse.net/","Bahamas","Face-to-face well-modulated customer loyalty",1992,"Primary / Secondary Education",4914),
("219233e8aFF1BC3","Hansen-Everett","https://www.kidd.org/","Pakistan","Seamless disintermediate collaboration",2018,"Publishing Industry",7832),
("ccc93DCF81a31CD","Mcintosh-Mora","https://www.brooks.com/","Heard Island and McDonald Islands","Centralized attitude-oriented capability",1970,"Import / Export",4389),
("0B4F93aA06ED03e","Carr Inc","http://ross.com/","Kuwait","Distributed impactful customer loyalty",1996,"Plastics",8167),
("738b5aDe6B1C6A5","Gaines Inc","http://sandoval-hooper.com/","Uzbekistan","Multilateral scalable protocol",1997,"Outsourcing / Offshoring",9698),
("AE61b8Ffebbc476","Kidd Group","http://www.lyons.com/","Bouvet Island (Bouvetoya)","Proactive foreground paradigm",2001,"Primary / Secondary Education",7473),
("eb3B7D06cCdD609","Crane-Clarke","https://www.sandoval.com/","Denmark","Front-line clear-thinking encryption",2014,"Food / Beverages",9011),
("8D0c29189C9798B","Keller Campos and Black","https://www.garner.info/","Liberia","Ameliorated directional emulation",2020,"Museums / Institutions",2862),
("D2c91cc03CA394c","Glover-Pope","http://www.silva.biz/","United Arab Emirates","Persevering contextually-based approach",2013,"Medical Practice",9079),
("C8AC1eaf9C036F4","Pacheco-Spears","https://aguilar.com/","Sweden","Secured logistical synergy",1984,"Maritime",769),
("b5D10A14f7a8AfE","Hodge-Ayers","http://www.archer-elliott.com/","Honduras","Future-proofed radical implementation",1990,"Facilities Services",8508),
("68139b5C4De03B4","Bowers Guerra and Krause","http://www.carrillo-nicholson.com/","Uganda","De-engineered transitional strategy",1972,"Primary / Secondary Education",6986),
("5c2EffEfdba2BdF","Mckenzie-Melton","http://montoya-thompson.com/","Hong Kong","Reverse-engineered heuristic alliance",1998,"Investment Management / Hedge Fund / Private Equity",4589),
("ba179F19F7925f5","Branch-Mann","http://www.lozano.com/","Botswana","Adaptive intangible frame",1999,"Architecture / Planning",7961),
("c1Ce9B350BAc66b","Weiss and Sons","https://barrett.com/","Korea","Sharable optimal functionalities",2011,"Plastics",5984),
("8de40AC4e6EaCa4","Velez Payne and Coffey","http://burton.com/","Luxembourg","Mandatory coherent synergy",1986,"Wholesale",5010),
("Aad86a4F0385F2d","Harrell LLC","http://www.frey-rosario.com/","Guadeloupe","Reverse-engineered mission-critical moratorium",2018,"Construction",2185),
("22aC3FFd64fD703","Eaton Reynolds and Vargas","http://www.freeman.biz/","Monaco","Self-enabling multi-tasking process improvement",2014,"Luxury Goods / Jewelry",8987),
("5Ec4C272bCf085c","Robbins-Cummings","http://donaldson-wilkins.com/","Belgium","Organic non-volatile hierarchy",1991,"Pharmaceuticals",5038),
("5fDBeA8BB91a000","Jenkins Inc","http://www.kirk.biz/","South Africa","Front-line systematic help-desk",2002,"Insurance",1215),
("dFfD6a6F9AC2d9C","Greene Benjamin and Novak","http://www.kent.net/","Romania","Centralized leadingedge moratorium",2012,"Museums / Institutions",4941),
("4B217cC5a0674C5","Dickson  Richmond and Clay","http://everett.com/","Czech Republic","Team-oriented tangible complexity",1980,"Real Estate / Mortgage",3122),
("88b1f1cDcf59a37","Prince-David","http://thompson.com/","Christmas Island","Virtual holistic methodology",1970,"Banking / Mortgage",1046),
("f9F7bBCAEeC360F","Ayala LLC","http://www.zhang.com/","Philippines","Open-source zero administration hierarchy",2021,"Legal Services",7664),
("7Cb3AeFcE4Ba31e","Rivas Group","https://hebert.org/","Australia","Open-architected well-modulated capacity",1998,"Logistics / Procurement",4155),
("ccBcC32adcbc530","Sloan Mays and Whitehead","http://lawson.com/","Chad","Face-to-face high-level conglomeration",1997,"Civil Engineering",365),
("f5afd686b3d05F5","Durham Allen and Barnes","http://chan-stafford.org/","Zimbabwe","Synergistic web-enabled framework",1993,"Mechanical or Industrial Engineering",6135),
("38C6cfC5074Fa5e","Fritz-Franklin","http://www.lambert.com/","Nepal","Automated 4thgeneration website",1972,"Hospitality",4516),
("5Cd7efccCcba38f","Burch-Ewing","http://cline.net/","Taiwan","User-centric 4thgeneration system engine",1981,"Venture Capital / VC",7443),
("9E6Acb51e3F9d6F","Glass  Barrera and Turner","https://dunlap.com/","Kyrgyz Republic","Multi-channeled 3rdgeneration open system",2020,"Utilities",2610),
("4D4d7E18321eaeC","Pineda-Cox","http://aguilar.org/","Bolivia","Fundamental asynchronous capability",2010,"Human Resources / HR",1312),
("485f5d06B938F2b","Baker Mccann and Macdonald","http://www.anderson-barker.com/","Kenya","Cross-group user-facing focus group",2013,"Legislative Office",1638),
("19E3a5Bf6dBDc4F","Cuevas-Moss","https://dodson-castaneda.net/","Guatemala","Extended human-resource intranet",1994,"Music",9995),
("6883A965c7b68F7","Hahn PLC","http://newman.com/","Belarus","Organic logistical leverage",2012,"Electrical / Electronic Manufacturing",3715),
("AC5B7AA74Aa4A2E","Valentine Ferguson and Kramer","http://stuart.net/","Jersey","Centralized secondary time-frame",1997,"Non - Profit / Volunteering",3585),
("decab0D5027CA6a","Arroyo Inc","https://www.turner.com/","Grenada","Managed demand-driven website",2006,"Writing / Editing",9067),
("dF084FbBb613eea","Walls LLC","http://www.reese-vasquez.biz/","Cape Verde","Self-enabling fresh-thinking installation",1989,"Investment Management / Hedge Fund / Private Equity",1678),
("A2D89Ab9bCcAd4e","Mitchell Warren and Schneider","https://fox.biz/","Trinidad and Tobago","Enhanced intangible time-frame",2021,"Capital Markets / Hedge Fund / Private Equity",3816),
("77aDc905434a49f","Prince PLC","https://www.watts.com/","Sweden","Profit-focused coherent installation",2016,"Individual / Family Services",7645),
("235fdEFE2cfDa5F","Brock-Blackwell","http://www.small.com/","Benin","Secured foreground emulation",1986,"Online Publishing",7034),
("1eD64cFe986BBbE","Walton-Barnett","https://ashley-schaefer.com/","Western Sahara","Right-sized clear-thinking flexibility",2001,"Luxury Goods / Jewelry",1746),
("CbBbFcdd0eaE2cF","Bartlett-Arroyo","https://cruz.com/","Northern Mariana Islands","Realigned didactic function",1976,"Civic / Social Organization",3987),
("49aECbDaE6aBD53","Wallace Madden and Morris","http://www.blevins-fernandez.biz/","Germany","Persistent real-time customer loyalty",2016,"Pharmaceuticals",9443),
("7b3fe6e7E72bFa4","Berg-Sparks","https://cisneros-love.com/","Canada","Stand-alone static implementation",1974,"Arts / Crafts",2073),
("c6DedA82A8aef7E","Gonzales Ltd","http://bird.com/","Tonga","Managed human-resource policy",1988,"Consumer Goods",9069);
  1. Query data from organization table
SELECT * FROM `grafana`.`organization `;

Configure MySQL datasource in Grafana

  1. Get server ip address and enter into Host field
ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1
  1. Enter password that define in docker compose
    image
⚠️ **GitHub.com Fallback** ⚠️