SlideShare une entreprise Scribd logo
1  sur  16
2013 June 17
Deploying MySQL Metric Collectors W/Salt
Zach White, Sr. Site Reliability Engineer, LinkedIn
Monitoring Infrastructure Overview
MySQL Monitoring: Overview
MySQL Monitoring: Create Configuration
MySQL Monitoring: Create Monitoring User
Install autometrics_framework
MySQL Monitoring: Test Collectors
MySQL Monitoring: Create Monitoring User
MySQL Monitoring: Create Monitoring User
MySQL Monitoring: Install
autometrics_framework
MySQL Monitoring: Install
autometrics_framework
MySQL Monitoring: Install
autometrics_framework
MySQL Monitoring: Install
autometrics_framework
MySQL Monitoring: Test Collectors
MySQL Monitoring: Test Collectors
MySQL Monitoring: Questions?

Contenu connexe

En vedette

Esposto infortunio in buca 1-1
Esposto infortunio in buca  1-1Esposto infortunio in buca  1-1
Esposto infortunio in buca 1-1
Giuseppe Previato
 
зош №11 свято до дня збройних сил україни
зош №11 свято до дня збройних сил українизош №11 свято до дня збройних сил україни
зош №11 свято до дня збройних сил україни
Александр Дрон
 
Kd 3.2 expressing compliments (memuji) (1x)
Kd 3.2   expressing compliments (memuji) (1x)Kd 3.2   expressing compliments (memuji) (1x)
Kd 3.2 expressing compliments (memuji) (1x)
henisuhendayani
 

En vedette (14)

PM
PMPM
PM
 
на сайт з верховної ради
на сайт з верховної радина сайт з верховної ради
на сайт з верховної ради
 
Daza jose 2
Daza jose 2Daza jose 2
Daza jose 2
 
Alajos Mészáros: The Trap of the Triangle: Education-Research-Innovation
Alajos Mészáros: The Trap of the Triangle: Education-Research-InnovationAlajos Mészáros: The Trap of the Triangle: Education-Research-Innovation
Alajos Mészáros: The Trap of the Triangle: Education-Research-Innovation
 
BryanEllisonResume
BryanEllisonResumeBryanEllisonResume
BryanEllisonResume
 
Esposto infortunio in buca 1-1
Esposto infortunio in buca  1-1Esposto infortunio in buca  1-1
Esposto infortunio in buca 1-1
 
зош №11 свято до дня збройних сил україни
зош №11 свято до дня збройних сил українизош №11 свято до дня збройних сил україни
зош №11 свято до дня збройних сил україни
 
Diaz hernan 2
Diaz hernan 2Diaz hernan 2
Diaz hernan 2
 
ABP Technology Presentation_sentry360 Spanish
ABP Technology Presentation_sentry360 SpanishABP Technology Presentation_sentry360 Spanish
ABP Technology Presentation_sentry360 Spanish
 
Diploma of Business
Diploma of BusinessDiploma of Business
Diploma of Business
 
Archetypes آرکتایپ
Archetypes آرکتایپArchetypes آرکتایپ
Archetypes آرکتایپ
 
30 عادت بد كه بايد آنها را ترك كرد
30 عادت بد كه بايد آنها را ترك كرد30 عادت بد كه بايد آنها را ترك كرد
30 عادت بد كه بايد آنها را ترك كرد
 
Uma Cadeia de Valor Chamada Experiência
Uma Cadeia de Valor Chamada ExperiênciaUma Cadeia de Valor Chamada Experiência
Uma Cadeia de Valor Chamada Experiência
 
Kd 3.2 expressing compliments (memuji) (1x)
Kd 3.2   expressing compliments (memuji) (1x)Kd 3.2   expressing compliments (memuji) (1x)
Kd 3.2 expressing compliments (memuji) (1x)
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Notes de l'éditeur

  1. Today I’m going to show you how I used salt to simplify the process of installing Metric Collectors. The machinery I’ve setup is generic enough to be used for all of our standard metric collectors, but to avoid scope creep I’m going to focus on MySQL. Before I set this up we had a lot of manual process when setting up a MySQL server. Installing MySQL, configuring it, installing autometrics_framework, and dealing with config files that were all over the place. Between what I’m about to present to you and building an RPM for MySQL, we took a process that was taking 5-6 hours and condensed it down to 20-30 minutes.
  2. Let’s start by taking a brief look at the architecture we’ll be working with. On the left we have a typical application server running MySQL, a Java Application, and the autometrics_framework. Autometrics_framework is a small agent which can be configured to run plugins that collect and report various application metrics. Most of our java services emit performance metrics directly to our metrics pipeline, but we use autometrics_framework to collect and report metrics from other sources, such as the machine’s resources or 3rd party software like MySQL.
  3. Let’s start by taking a look at how we use this tool. Later on I’ll dive into how the tool is implemented. As you can see there are 4 basic steps needed to deploy monitoring for a new MySQL cluster.
  4. The first thing we need to do is to create a configuration file for the mysql autometrics_framework plugin. This tells the plugin what metrics to report and supplies a username and password to the collector. This is a minimal configuration; most of our configurations are more complex and need to supply information like port numbers and the path to the correct binary. We check this file into SVN so that it can be fetched by our salt module.
  5. Before we can monitor MySQL we need to create the monitoring user we defined in our configuration. Some clusters have this user setup as part of their bootstrap process, and so those clusters can skip this step.
  6. Next we run a simple salt command to install and configure the autometrics framework package. If I had more plugins I wanted to setup on those boxes, I could specify them as additional arguments.
  7. Finally, I have a command which tests the plugin to make sure that everything works correctly. The test function returns a list of the metrics that will be reported.
  8. So now that you’ve seen how we use this infrastructure, what do you say we take a look under the hood? Before I can show you the next slide, I have to give you a little caveat. At the time I wrote all of this there was a problem where we couldn’t easily use the Python MySQL bindings for some of our clusters. That has since been resolved but I have not had a chance to rewrite that code.
  9. Having said that, here is how we create the MySQL user. Parameterized code allows us to use this function in a variety of situations. I tried to protect against SQL injection, but I’m sure someone out there can break it. :)
  10. Now we get into the real meat of this presentation. In the next 3 slides we’ll take a look at how we install, configure and enable the autometrics framework and its plugins in only a single command.
  11. This is the basic logic for installing the autometrics_framework and its plugins. We use plugin_args to get a list of plugins we wish to enable, this is what allows us to specify an arbitrary list of plugins when we run our salt command, as well as passing arguments down to those plugins so they can be configured. First we make sure we have somewhere to put our autometrics framework configuration, then we install the autometrics_framework RPM. Switcher is a salt module that our infrastructure team wrote for maintaining symlinks to the current and previous version of a particular application. Finally, for each plugin specified, we configure and, if successful, enable that plugin.
  12. Next we have the function which configures the application. This function looks for a registered plugin, and if it finds one it runs the plugin’s configure function passing in the argument supplied on the salt command line.
  13. This is the function which we registered for the plugin. Here we can see that the argument specifies the location in SVN we need to pull our configuration from, and that the function essentially puts that single file into the proper location for autometrics framework.
  14. So now that everything is installed and enabled we’re done, right? (hold up hands and kinda shrug) I suppose we could test our collectors, and to do that we use this function.
  15. Oh my, it seems I didn’t use list comprehension here. That’s a little embarrassing. (Wait for laugh) Our autometrics_framework plugins are simply python modules with a single class, “Collector.” This module imports the plugin, instaniates an instance of Collector, and returns a list of metric names from that collector.
  16. That wraps up what I setup to replace a very manual process. Before I did this rolling out a new MySQL cluster took us upwards of 6 hours to install MySQL, set up the autometrics framework, and deal with config files that were all over the place. Between this work and building an RPM for MySQL, we got that time down to 20-30 minutes. We can also reuse this same infrastructure to setup collectors for other plugins we may want to install. Any questions?