MySQL/NoSQL/Cloud
Monitoring with New
Relic
Ronald Bradford
http://ronaldbradford.com
Buenos Aires, Argentina
2013-10
EffectiveMySQL.com - Performance, Scalability & Business Continuity
ABOUT AUTHOR
Ronald Bradford
24 years of RDBMS experience,14 years with MySQL
MySQL Inc (2006-2008)
Oracle Corporation (1996-1999)
Published Author (4 books)
Oracle ACE Director
MySQL community member of the year (2009 & 2013)
All time top MySQL blogger
Provide independent MySQL/
LAMP/Cloud consulting
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Why Monitor?

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Text
Text
Monitoring your technology stack with New Relic
Zabbix
OpenTSDB

Zenoss
Hyperic

Cacti
Nagios
Munin

MySQL Enterprise Monitor

Monitoring
Options

Ganglia
CollectD
StatsD

http://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems

New Relic

Boundary

DataDog

EffectiveMySQL.com - Performance, Scalability & Business Continuity
New Relic

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
New Relic
Application Monitoring

Historically

Server Monitoring
Software as a Service (SaaS)
Agent-like

EffectiveMySQL.com - Performance, Scalability & Business Continuity
The cloud - SaaS
Minimal installation
Minimal administration
Cloud based management
Web
Mobile
Integrations to other products
EffectiveMySQL.com - Performance, Scalability & Business Continuity
New Relic
Application Monitoring

Introducing

Server Monitoring
NOW - New Relic Platform
<insert product here>

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
NEw Relic
Subscription per server
Standard ($24 p.s. p.m.)
Pro

($149 p.s. p.m.)

YOU CAN GET UNLIMITED
STANDARD FREE BECAUSE BY THE
MySQL PLUGIN AUTHOR
http://j.mp/newrelic-mysql
EffectiveMySQL.com - Performance, Scalability & Business Continuity
1
2
3

No Credit Card Details required

4

http://j.mp/newrelic-mysql
Monitoring your technology stack with New Relic
NAVIGATION

EffectiveMySQL.com - Performance, Scalability & Business Continuity
LICENSE

EffectiveMySQL.com - Performance, Scalability & Business Continuity
ALERTs

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Server
Ubuntu/Debian/RedHat/CentOS/Linux/Windows

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
SERVER INSTALL
LICENSE_KEY="<enter key here>"
sudo rpm -Uvh http://download.newrelic.com/pub/newrelic/
el5/x86_64/newrelic-repo-5-3.noarch.rpm
sudo yum install -y newrelic-sysmond
sudo nrsysmond-config --set license_key=${LICENSE_KEY}
sudo /etc/init.d/newrelic-sysmond start

Helps to use good hostnames

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Application
PHP/Ruby/.NET/Java/Python/Node.js

EffectiveMySQL.com - Performance, Scalability & Business Continuity
PHP, Ruby, .NET, Java, Python, Node.js
PHP INSTALL
LICENSE_KEY="<enter key here>"
sudo rpm -Uvh http://download.newrelic.com/pub/newrelic/
el5/x86_64/newrelic-repo-5-3.noarch.rpm
sudo yum install -y newrelic-php5
sudo newrelic-install install
# prompted for LICENSE_KEY
sudo service httpd restart

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Platform
MySQL/Memcached/Apache/Redis/MongoDB/AWS/...

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Monitoring your technology stack with New Relic
JRE (on some server)

https://github.com/newrelic-platform/newrelic_mysql_java_plugin/
MYSQL INSTALL
Version 1 - Needs streamlining

sudo su LICENSE_KEY="<enter key here>"
wget -O /tmp/newrelic.tar.gz https://raw.github.com/newrelic-platform/
newrelic_mysql_java_plugin/master/dist/newrelic_mysql_plugin-1.0.6.tar.gz
cd /usr/local
tar xvfz /tmp/newrelic.tar.gz
mv newrelic_mysql_plugin-1.* newrelic_mysql_plugin
cd /usr/local/newrelic_mysql_plugin
echo "licenseKey=${LICENSE_KEY}" > config/newrelic.properties
echo "java.util.logging.ConsoleHandler.level = INFO
com.newrelic.metrics.publish.handlers = java.util.logging.ConsoleHandler" >
config/logging.properties
echo '[
{
"name" : "'`hostname -s`'",
"host" : "localhost",
"metrics" : "status,newrelic,innodb,innodb_status,innodb_mutex,slave"
}
]' > config/mysql.instance.json
#mysql < mysql_user.sql
nohup java -jar newrelic_mysql_plugin-*.jar &

https://github.com/newrelic-platform/newrelic_mysql_java_plugin/
EffectiveMySQL.com - Performance, Scalability & Business Continuity
General Views

EffectiveMySQL.com - Performance, Scalability & Business Continuity
navigation

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Summary View
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
More
More
Monitoring your technology stack with New Relic
MYSQL Sources
SHOW GLOBAL STATUS
SHOW MASTER STATUS
SHOW SLAVE STATUS
SHOW ENGINE INNODB STATUS
SHOW ENGINE INNODB MUTEX
<Any SQL statement>
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Coding Features
SHOW ENGINE INNODB MUTEX
Dynamic metric names

Rollup, supporting different formats
in 5.5, 5.6, Percona etc

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Coding Features
SHOW ENGINE INNODB STATUS

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Version 1
Your input and feedback
See limitations

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Monitoring your technology stack with New Relic
Default is “PHP Application”
/etc/php.d/newrelic.inc
newrelic.appname = "PHP Application"
Monitoring your technology stack with New Relic
Other Products

EffectiveMySQL.com - Performance, Scalability & Business Continuity
MEMCACHE INSTALL
LICENSE_KEY="<enter key here>"
sudo pip install newrelic-plugin-agent
sudo cp /opt/newrelic_plugin_agent/newrelic_plugin_agent.cfg 
/etc/newrelic/newrelic_plugin_agent.cfg
sudo
sudo
sudo
sudo
sudo

useradd -m -s /bin/bash newrelic
mkdir -p /var/log/newrelic /var/run/newrelic
chown newrelic:newrelic /var/*/newrelic
vi /etc/newrelic/newrelic_plugin_agent.cfg
newrelic_plugin_agent -c 
/etc/newrelic/newrelic_plugin_agent.cfg -f

https://rpm.newrelic.com/accounts/389698/plugins/directory/53
EffectiveMySQL.com - Performance, Scalability & Business Continuity
EffectiveMySQL.com - Performance, Scalability & Business Continuity
EffectiveMySQL.com - Performance, Scalability & Business Continuity
EffectiveMySQL.com - Performance, Scalability & Business Continuity
meetme plugin
PHP Cache
HTTP Server
CouchDB
Edgecast CDN API
Memcached
MongoDB
Nginx
pgBouncer
PHP FPM

PostgreSQL
RabbitMQ
Redis
Riak
uWSGI

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Other Plugins
Logwatcher

F5

Varnish

AWS EC2/RDS/ELB

Sendgrid

Rabbit MQ

Cassandra

Sphinx

Haproxy

<write your own>

Hadoop
EffectiveMySQL.com - Performance, Scalability & Business Continuity
User Interface

EffectiveMySQL.com - Performance, Scalability & Business Continuity
History

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Click and drag for subset of time
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
Configuration

EffectiveMySQL.com - Performance, Scalability & Business Continuity
MySQL Plugin
Plugin has more features than UI can
support at present
Configurable namespaces
Row/Set SQL statements
Configurable metrics

EffectiveMySQL.com - Performance, Scalability & Business Continuity
MySQL config
$ cat /path/to/config/mysql.instance.json
[
{
"name" : "db1",
"host" : "localhost",
"metrics" : "status,newrelic,innodb_status,
innodb_mutex,master"
},
One agent can collect data from
{
many MySQL Instances
"name" : "db2",
"host" : "db2.hostname.com",
"user" : "monitor",
"password" : "password",
"metrics" : "status,newrelic,slave"
}
]

EffectiveMySQL.com - Performance, Scalability & Business Continuity
namespaces
$ cat /path/to/config/metric.category.json
[
{ "category" : "status",
"SQL" : "SHOW GLOBAL STATUS",
"result" : "set",
"value_metrics":"Max_used_connections,....",
"counter_metrics" :"Bytes_received,Bytes_sent,..."
},
{
"category" : "slave",
"SQL" : "SHOW SLAVE STATUS",
"result" : "row",
"value_metrics" : "Read_Master_Log_Pos,
Slave_IO_Running,
Slave_SQL_Running,

EffectiveMySQL.com - Performance, Scalability & Business Continuity
namespaces
$ cat /path/to/config/metric.category.json
[
{
"category" : "innodb_metrics",
"SQL" : "SELECT name, count FROM
information_schema.innodb_metrics",
"result" : "set",
"comment" : "MySQL 5.6 or later",
"value_metrics" : "...",
"counter_metrics" : "..."
},
...

Current UI does not support with
default MySQL plugin, but
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Modifying plugin
https://github.com/newrelic-platform/
newrelic_mysql_java_plugin
com.newrelic.plugins.mysql.instance.G
UID="new value"
Request to overload via parameter (to
help with current UI limitations)

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Limitations
(Also exist with most monitoring
products)

EffectiveMySQL.com - Performance, Scalability & Business Continuity
sampling
60 seconds (fixed)

EffectiveMySQL.com - Performance, Scalability & Business Continuity
CopperEgg Example
(15 second samples)
averaging
Deceiving

No maximum
support
EffectiveMySQL.com - Performance, Scalability & Business Continuity
alerting limits
Positive range only
Summary metrics
only
No low limits

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Custom Dashboards
Enables you to group graphs together
Does not work with plugins YET!

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Presentation
Likes lots of moving/changing data
Uninteresting values not well supported
replication lag
replication running YES/NO
Important summary alert[able] metric

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Servers
Likes to work on per server basis
Default reporting namespace
Current
com.newrelic.plugins.mysql.instance
[agent] /mysql/status/com_select
[agent] /mysql/status/com*
One Goal
com.newrelic.plugins.mysql.topology
/mysql/status/com_select/<instance>
EffectiveMySQL.com - Performance, Scalability & Business Continuity
What is monitoring the monitoring?
Usage Patterns

EffectiveMySQL.com - Performance, Scalability & Business Continuity
tmp disk tables
High disk I/O - Investigate SQL

EffectiveMySQL.com - Performance, Scalability & Business Continuity
query cache
Query Cache NOT working

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Query CAche
Enabling Query Cache benefit

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Monitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
Yes, this time the
database (servers)
are on fire!
If only I could trigger an
alert on this?
A Developers View

EffectiveMySQL.com - Performance, Scalability & Business Continuity
SQL for developers
Drill down to running queries
Look at ALL thread SQL statements
Aggregations

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Standard Feature
Monitoring your technology stack with New Relic
Standard Feature
Pro Feature
Standard Feature
Pro Feature
Pro Feature
Pro Feature
A better waterfall

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Standard Feature

Still not a DB problem, but,
I need to identify and fix
Monitoring your technology stack with New Relic
Conclusion

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Conclusion
There is no excuse to have NO monitoring
Visualization can generally help show issues
Historical reporting can help review issues
NEITHER WILL SOLVE THE PROBLEM
Hire Ronald Bradford

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Monitoring your technology stack with New Relic
Ronald Bradford
ronald@effectivemysql.com

More Related Content

PDF
MySQL Scalability Mistakes - OTN
PDF
Successful Scalability Principles - Part 1
PDF
Lessons Learned Managing Large AWS Environments
PDF
The History and Future of the MySQL ecosystem
PDF
MySQL Backup and Recovery Essentials
PDF
MySQL Best Practices - OTN LAD Tour
PPT
My two cents about Mysql backup
PDF
MySQL Best Practices - OTN
MySQL Scalability Mistakes - OTN
Successful Scalability Principles - Part 1
Lessons Learned Managing Large AWS Environments
The History and Future of the MySQL ecosystem
MySQL Backup and Recovery Essentials
MySQL Best Practices - OTN LAD Tour
My two cents about Mysql backup
MySQL Best Practices - OTN

What's hot (20)

PDF
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
PDF
MySQL For Oracle DBA's and Developers
PDF
MySQL Enterprise Backup - BnR Scenarios
PDF
MySQL Performance Best Practices
PDF
MySQL Performance Tuning: The Perfect Scalability (OOW2019)
PDF
MySQL 5.7 -- SCaLE Feb 2014
PDF
Posscon my sql56
PDF
MySQL Performance Tuning Variables
PDF
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
KEY
Perf Tuning Short
PDF
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
PDF
MySQL Monitoring 101
PDF
MySQL For Oracle Developers
PDF
My sql 5.7-upcoming-changes-v2
ODP
MySQL 5.7 - What's new and How to upgrade
PDF
Tx lf propercareandfeedmysql
PDF
MySql's NoSQL -- best of both worlds on the same disks
PDF
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
PDF
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
PPT
MySQL 5.6 Updates
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL For Oracle DBA's and Developers
MySQL Enterprise Backup - BnR Scenarios
MySQL Performance Best Practices
MySQL Performance Tuning: The Perfect Scalability (OOW2019)
MySQL 5.7 -- SCaLE Feb 2014
Posscon my sql56
MySQL Performance Tuning Variables
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
Perf Tuning Short
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Monitoring 101
MySQL For Oracle Developers
My sql 5.7-upcoming-changes-v2
MySQL 5.7 - What's new and How to upgrade
Tx lf propercareandfeedmysql
MySql's NoSQL -- best of both worlds on the same disks
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
MySQL 5.6 Updates
Ad

Similar to Monitoring your technology stack with New Relic (20)

PDF
Mysql High Availability Tools For Building Robust Data Centers Charles Bell
PDF
Performance schema and sys schema
ODP
MySQL Monitoring Shoot Out
PDF
OpenStack Days East -- MySQL Options in OpenStack
PDF
My sql enterprise_edition_wp_v38
PPTX
MySQL Options in OpenStack
PDF
02 -my_sql_roma-may2011
PDF
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
PDF
Scaling MySQL -- Swanseacon.co.uk
PDF
MySQL InnoDB Cluster HA Overview & Demo
PDF
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
PDF
MySQL Webinar Series 3/4 - MySQl Monitoring With Enterprise Monitor + Query A...
PDF
Monitoring MySQL at scale
PDF
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
PDF
MySQL Shell - The Best MySQL DBA Tool
PDF
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
PPT
MySQL Features & Implementation
PDF
MySQL InnoDB Cluster: High Availability Made Easy!
PDF
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
PDF
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
Mysql High Availability Tools For Building Robust Data Centers Charles Bell
Performance schema and sys schema
MySQL Monitoring Shoot Out
OpenStack Days East -- MySQL Options in OpenStack
My sql enterprise_edition_wp_v38
MySQL Options in OpenStack
02 -my_sql_roma-may2011
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
Scaling MySQL -- Swanseacon.co.uk
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL Webinar Series 3/4 - MySQl Monitoring With Enterprise Monitor + Query A...
Monitoring MySQL at scale
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL Shell - The Best MySQL DBA Tool
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Features & Implementation
MySQL InnoDB Cluster: High Availability Made Easy!
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
Ad

More from Ronald Bradford (20)

PDF
My SQL Idiosyncrasies That Bite OTN
PDF
MySQL Idiosyncrasies That Bite SF
PDF
Successful MySQL Scalability
PDF
MySQL Idiosyncrasies That Bite 2010.07
PDF
Capturing, Analyzing and Optimizing MySQL
PDF
MySQL Idiosyncrasies That Bite
KEY
10x Performance Improvements
PDF
LIFTOFF - MySQLCamp for the Oracle DBA
PDF
IGNITION - MySQLCamp for the Oracle DBA
PDF
10x Performance Improvements - A Case Study
PDF
Dolphins Now And Beyond - FOSDEM 2010
PDF
Drizzle - Status, Principles and Ecosystem
PDF
SQL v No SQL
PDF
MySQL for the Oracle DBA - Object Management
PDF
Know Your Competitor - Oracle 10g Express Edition
PDF
The Ideal Performance Architecture
PDF
Getting started with MySQL on Amazon Web Services
PDF
Best Practices in Migrating to MySQL - Part 1
PDF
Extending The My Sql Data Landscape
PDF
Best Design Practices A
My SQL Idiosyncrasies That Bite OTN
MySQL Idiosyncrasies That Bite SF
Successful MySQL Scalability
MySQL Idiosyncrasies That Bite 2010.07
Capturing, Analyzing and Optimizing MySQL
MySQL Idiosyncrasies That Bite
10x Performance Improvements
LIFTOFF - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBA
10x Performance Improvements - A Case Study
Dolphins Now And Beyond - FOSDEM 2010
Drizzle - Status, Principles and Ecosystem
SQL v No SQL
MySQL for the Oracle DBA - Object Management
Know Your Competitor - Oracle 10g Express Edition
The Ideal Performance Architecture
Getting started with MySQL on Amazon Web Services
Best Practices in Migrating to MySQL - Part 1
Extending The My Sql Data Landscape
Best Design Practices A

Recently uploaded (20)

PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
The AI Revolution in Customer Service - 2025
PDF
Examining Bias in AI Generated News Content.pdf
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
CEH Module 2 Footprinting CEH V13, concepts
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Build automations faster and more reliably with UiPath ScreenPlay
Co-training pseudo-labeling for text classification with support vector machi...
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
The AI Revolution in Customer Service - 2025
Examining Bias in AI Generated News Content.pdf
Presentation - Principles of Instructional Design.pptx
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
LMS bot: enhanced learning management systems for improved student learning e...
4 layer Arch & Reference Arch of IoT.pdf
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Introduction to MCP and A2A Protocols: Enabling Agent Communication
Early detection and classification of bone marrow changes in lumbar vertebrae...
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Data Virtualization in Action: Scaling APIs and Apps with FME
Lung cancer patients survival prediction using outlier detection and optimize...
CEH Module 2 Footprinting CEH V13, concepts

Monitoring your technology stack with New Relic