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?
Support Our Sponsors Duh moment of the day, please do support our sponsors. Without them, none of this is possible. Same for the volunteers
Local User Groups Orange County Data Professionals Los Angeles SQL 2nd Thursday of each month 6:30—8:30 PM Irvine BigPASS.pass.org Los Angeles SQL 3rd Thursday of each odd month 7:00—8:30 PM USC Campus Sql.la Orange County Power BI 3rd Thursday of the month 7:00—8:30 PM Irvine Meetup.com Malibu SQL 3rd Wednesday of each month 6:30—9:00 PM sqlMalibu.pass.org To whom it may concern: The San Diego SQL User Group chapter is the best. Full stop. San Diego User Groups 1st & 3rd Thursday 6:00—8:30 PM www.meetup.com/sdsqlug Los Angeles—Korean Every other Tuesday 8:00—9:00 PM El Segundo sqlAngeles.pass.org
Session Agenda Influx Telegraf Grafana Install and Configure it to store your data Telegraf Install and Configure to push and pull to Influx Grafana Install and Configure to pull from Influx Create a few simple Dashboards Create an Alert that when triggered, posts into Slack That’s what I hope to accomplish. Here hoping we make it through without too many problems.
Session Presenter Patrick Partin Accidental Admin, Architect, DBA, Developer, Engineer 20+ years experience fixing and sometimes breaking stuff @GingerDBA – Twitter @Paddyrick – SQLCommunity.Slack.Com You could go on and on, but they’re here for the information, not the backstory. Shut up, move on.
Let’s Prepare Note to self: Do try to scare more people away.
Want to follow along? Grafana (Grafana Labs) Grafana 6.1.3 (Apr 9) https://grafana.com/get Grafana 6.1.3 (Apr 9) Serving it in Windows? NSSM (Non-sucking Service Manager) https://nssm.cc/ Currently needed for Influx and Grafana Influx + Telegraf (InfluxData) https://portal.influxdata.com/downloads/ InfluxDB 1.7.5 (Mar 26) Telegraf 1.10.2 (Apr 2)
Quick Architectural Overview
Time Structured Merge Tree Storage Data Acquisition Push/Pull Time Structured Merge Tree Storage 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 anything as you may become more polyglot. Alerting Monitoring Visualization Front-end
InfluxDB Demo Here goes, don’t mess up. Dear Hyper-V Gods, please don’t let me fail infront of these fine folks spending their Saturday listening to you babble on.
Influx <-> SQL speak – Measurements = table Series = column(s) Quick terms/recap: Linux speak – daemon = Service Influx <-> SQL speak – Measurements = table Series = column(s) Tag = optional metadata that’s indexed, what we’d use in a where clause Field = required metadata that is not indexed, what we’d use as an include Not a fan of doing Unix Epoch math in your head? precision rfc3339 Storage Engine - What’s a TSM? How does that differ from binary tree? https://docs.influxdata.com/influxdb/v1.7/concepts/storage_engine/ Sorry about the names, they came up with them, I didn’t. The more you play with Influx, the more it makes sense.
Telegraf Demo
Quick terms/recap: Chooch was running Telegraf locally to push Windows metrics to Influx Halladay was running Telegraf locally to push Windows metrics + SSAS Chooch was also configured to run the SQL Server plugin to pull SQL Server metrics The database was created on the fly The measurements were created on the fly typeperf –q | more dumps all perf counters to the screen typeperf –q > yo.txt dumps all perf counters to a text file, yo.txt https://github.com/influxdata/telegraf/tree/master/plugins Their list of inputs and outputs increases so fast, chances are, it’s there
Grafana Demo
Alerting > Notification Channels Quick terms/recap: In the \conf folder copy sample.ini to custom.ini make some quick changes, like port Grab a Slack, it’s free! Alerting > Notification Channels
More Info
Telegraf does more than just SQL Server, LOTS https://docs.influxdata.com/telegraf/v1.10/plugins/inputs/ https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters -I showed you SSAS, and show some AD, DNS, IIS, .NET/www counters DBATools.io (free!) https://dbatools.io/download/ CentOS 7 (free!) https://www.centos.org/download/ SQL Server 2017 Developer Edition (free!) https://www.microsoft.com/en-ie/sql-server/sql-server-downloads Grafana Dashboards (free!) https://grafana.com/dashboards
Thank you! Thanks. As always, feel free to meet me afterwards, or drop me a line. I’m even better when not trying to rush through a day’s worth of material in 60 minutes.