Presentation is loading. Please wait.

Presentation is loading. Please wait.

Patrick Partin What just happened?

Similar presentations


Presentation on theme: "Patrick Partin What just happened?"— Presentation transcript:

1 Patrick Partin What just happened?
Creating your own real-time dashboard with Grafana, Influx, and Telegraf Congratulations on successfully downloading this slide deck! Inside is valuable information, and since there’s absolutely no cost other than your time, why not try it out?

2 Thanks to our Sponsors Big ups to these fine companies who make our jobs easier, and go out of their way to sponsor our day of nerding. Without them, I’d be doing this whole presentation to my dogs. #SQLSatSanDiego

3 Session Agenda Influx Telegraf Grafana
Install and Configure it to store your data Telegraf Install and Configure to pull and push to Influx Grafana Install and Configure to pull from Influx Create a few simple Dashboards Create an Alert that when triggered, posts to Slack Show them that you mean business, unzips those zips -- RIGHT IN FRONT OF THEIR VERY EYES! 3 | #SQLSatSanDiego

4 Background Patrick Partin Admin, Architect, DBA, Developer, Engineer
Manager of Data and Systems SmartDrive 20+ years trying to make cars and dbs as fast as can be @GingerDBA – Twitter @Paddyrick – SQLCommunity.Slack.com Nobody _really_ cares. That’s okay, you’re still great. Move on to the next slide. 4 | #SQLSatSanDiego

5 Orange County User Group Orange County Power BI User Group
Regional Local User Groups LA Data Platform (a.k.a. SQL Malibu) 3rd Wednesday of each month ladataplatform.pass.org - Join us remotely! L.A. User Group 3rd Thursday of each odd month sqlla.pass.org Los Angeles - Korean Every Other Tuesday sqlangeles.pass.org San Diego User Group 1st & 3rd Thursday of each month meetup.com/sdsqlug meetup.com/sdsqlbig Orange County User Group 2rd Thursday of each month bigpass.pass.org Orange County Power BI User Group meetup.com/OC-Power-BI-User-Group/ Sacramento User Group 1st Wednesday of each month I will try my best to be subjective, but I’ve got a pretty strong feeling that all of these are great groups. If you aren’t already going to every single one of them, what’s wrong with you? #SQLSatSanDiego

6 If you want to follow along…
Influx – 49mb Telegraf – 20mb Grafana – 52mb Slack – 0mb Today, I will show you this starter set which works, I swear. The beauty of this, is that it’s so flexible, and can work with just about anything, especially as you become more polyglot. 6 | #SQLSatSanDiego

7 ? In all seriousness, knowing your data is important. For Data Professionals, capturing, tracking, and displaying data shouldn’t be a blocker to your success. #SQLSatSanDiego

8 Time Structured Merge Tree
Data Acquisition Push/Pull Data Storage Time Structured Merge Tree Show n’ Tell – Quick stack overview Data Visualization Alerting Monitoring

9 Install InfluxDB Demo Things I’m not covering
Firewall : Inbound / TCP Port 8086 (Default client/server port) Windows - using NSSM to run as a service - Github link shows it Linux/macOS – InfluxData Documentation for all major distros Pretty much straight out of the box, and on your desktop. Run InfluxD.exe in a command prompt window, and the Influx.exe in another. #SQLSatSanDiego

10 InfluxDB Quickies CasE SenSITiVe
select * X limit 5 instead of select top 5 * X Influx <-> SQL speak Measurements <-> Table Series <-> Columns Tag – Optional Metadata that’s indexed Field – Required metadata that’s not indexed There is soooooooo much more about this database that I love and wish that I could cover, but 60 minutes goes pretty fast when you talk as much as I do.. #SQLSatSanDiego

11 Install Telegraf Demo Things I’m not covering: Firewall
If you’re pushing, outbound access to the InfluxDB’s 8086 If you’re pulling, you need outbound to your destination, Also inbound to go there, many go over app’s main port Windows/Linux/macOS – Install as Service We’re going to do it twice, OMG! #SQLSatSanDiego

12 Telegraf setup to pull SQL Server DMV
On the SQL Server, so you can touch those DMV’s Azure SQL? USE master; GO CREATE LOGIN [telegraf] WITH PASSWORD = N'mystrongpassword’; GRANT VIEW SERVER STATE TO [telegraf]; GRANT VIEW ANY DEFINITION TO [telegraf]; CREATE USER [telegraf] WITH PASSWORD = N'mystrongpassword’; GO GRANT VIEW DATABASE STATE TO [telegraf]; In Telegraf.conf, so you can go pull the data # Read metrics from Microsoft SQL Server [[inputs.sqlserver]] ## Specify instances to monitor with a list of connection strings. ## All connection parameters are optional. ## By default, the host is localhost, listening on default port, TCP 1433. ## for Windows, the user is the currently running AD user (SSO). ## See for detailed connection ## parameters, in particular, tls connections can be created like so: ## "encrypt=true;certificate=<cert>;hostNameInCertificate=<SqlServer host fqdn>" # servers = [ # "Server= ;Port=1433;User Id=<user>;Password=<pw>;app name=telegraf;log=1;", # ] ## Optional parameter, setting this to 2 will use a new version ## of the collection queries that break compatibility with the original ## dashboards. All new functionality is under V2 query_version = 2 Github Source #SQLSatSanDiego

13 Telegraf Quickies InfluxDB is schema on write typeperf –q
Database and Measurements created on the fly typeperf –q List all of the hosts’s available perf counters Different hosts, different counters available Awkward, but… Outputs are where the Telegraf instance will put it Inputs are what the Telegraf instance gets it from Pretty much sums it up. #SQLSatSanDiego

14 Install Grafana Demo Things I’m not covering:
Firewall : Inbound to the port we choose Installing as a service Windows - NSSM (yes, again) Linux/macOS/Docker This program is so seriously sweet. This space is getting crowded, but it’s awfully hard to find something better. #SQLSatSanDiego

15 Grafana Quickies In \conf, copy sample.ini to custom.ini
Uncomment the port, defaulted to 3000 Tons of config options to fit your need Use Influx to show the raw data Gauge Think thermostat 72, 72, 71, 72, 72, 71 Use last? Use max? Use average? Counter Ever-increasing count, usually huge numbers Non-Negative Derivative? Difference? This has such amazing community support, amazing to see how much it has grown in just the few years I’ve been doing this talk. #SQLSatSanDiego

16 Wrapping this session up -
We built a db server to take metrics We pulled SQL Performance Counter DMVs We pushed Windows Perf Counters We were able to create some simple dashboards, and configure thresholds and alerts We were able to create an alert to write Slack You’ve been a great crowd, all four of you. 16 | #SQLSatSanDiego

17 More Information, and it’s all free
Telegraf does LOTS more than I covered Grafana has plenty of generic dashboards SQL Server 2017 Developer Edition (free!) If serving from Windows, you’ll need NSSM Free! Say Free one more time! 17 | #SQLSatSanDiego

18 Questions? Thanks for your time today, and enjoy the rest of SQL Saturday San Diego If not, catch me after the session, or on the interwebs… Thank you! 18 | #SQLSatSanDiego


Download ppt "Patrick Partin What just happened?"

Similar presentations


Ads by Google