Alerting With MySQL and Nagios Sheeri Cabral Senior DB Admin/Architect

Slides:



Advertisements
Similar presentations
How to monitor the $H!T out of Hadoop Developing a comprehensive open approach to monitoring hadoop clusters.
Advertisements

Refeng Wu CQ5 WCM System Administrator
© 2009 GroundWork Open Source, Inc. PROPRIETARY INFORMATION: Information contained herein is not for use or disclosure outside of GroundWork Open Source,
Drop in replacement of MySQL. Agenda MySQL branch GPL licence Maria storage engine Virtual columns FederatedX storage engine PBXT storage engine XtraDB.
How to Monitor Ingres with Open Source Tools
SQL Server Best Practices Keep Your Database In Top Performance Shape and Maintain Effective Backups September, 2007 Richard Kokoski.
Cacti Workshop Tony Roman Agenda What is Cacti? The Origins of Cacti Large Installation Considerations Automation The Current.
Chapter 9 Auditing Database Activities
Chapter 14 Chapter 14: Server Monitoring and Optimization.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Module 3: SQL Server 2005 Administrative Tools. Overview Using SQL Server Management Studio Using SQL Computer Manager Using the sqlcmd Utility Using.
Simple Web SQLite Manager/Form/Report
Sarah Sproehnle Cloudera, Inc
Replication with MySQL 5.1 Ligaya Turmelle Senior Technical Support Engineer - MySQL
Administration etc.. What is this ? This section is devoted to those bits that I could not find another home for… Again these may be useless, but humour.
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
5 Copyright © 2008, Oracle. All rights reserved. Configuring the Oracle Network Environment.
Passive Monitoring with Nagios Jim Prins
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
Your university or experiment logo here Nagios: An introduction and Brief Tutorial Chris Brew SciTech/PPD.
WhatsUp Gold v15 – WhatsUp Companion 3.7 WhatsUp Companion Extended
Josh Riggs Utilizing Open Source Network Monitoring.
© 2003 By Default! A Free sample background from Slide 1 Week 2  Free PHP Hosting Setup  PHP Backend  Backend Security 
Information Systems Today (©2006 Prentice Hall) MySQL 1CS3754 Class Note #8, Is an open-source relational database management system 2.Is fast and.
Eurotrace Hands-On The Eurotrace File System. 2 The Eurotrace file system Under MS ACCESS EUROTRACE generates several different files when you create.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
18 Copyright © Oracle Corporation, All rights reserved. Workshop.
Copyright 2002, Jeremy Zawodny MySQL Backup & Recovery O’Reilly Open Source Convention Jeremy Zawodny Yahoo! Finance July 24th, 2002.
Alerting With MySQL and Nagios Sheeri Cabral Senior DB Admin/Architect
Introduction To Nagios A Linux-based Monitoring System.
Introduction to dCache Zhenping (Jane) Liu ATLAS Computing Facility, Physics Department Brookhaven National Lab 09/12 – 09/13, 2005 USATLAS Tier-1 & Tier-2.
11 Distributed Monitoring for Web Apps Fernando Hönig
Damian Tamayo Tutorial DTM Data Generator Fall 2008 CIS 764.
Graphing and statistics with Cacti AfNOG 11, Kigali/Rwanda.
A Brief Documentation.  Provides basic information about connection, server, and client.
Nagios The monitoring tool. Why ? Nagios is a powerful, modular network monitoring system that can be used to monitor many network services like smtp,
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
Be a MySQL Ninja Sheeri Cabral Senior DB Admin/Architect
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
Module 1: Implementing Active Directory ® Domain Services.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Stuart Kenny and Stephen Childs Trinity.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Using Access Tools.
Get Rid of Cron Scripts Using Events Sheeri Cabral Senior DB Admin/Architect,
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration System Monitoring.
© 2009/2010 Pythian 1 mysqltuner 1.0 Author: Major Hayden Quick sanity check: » Status/system variables » Memory, Architecture, Tables Not all recommendations.
MySQL and GRID status Gabriele Carcassi 9 September 2002.
1 Windows 2008 Server Manager. 2 Server Manager Gives ability to perform effectively server administration without needing to launch a multitude of tools.
>> PHP: MySQL & CRUD. R ecall Database Tables Records is composed of Operations (CRUD) Create Retrieve Update Delete DBMS Access Control MySQL phpMyAdmin.
MySQL Overview Jed Reynolds Write Your Questions on the Board! Landscape, Engines, HA, Performance Questions.
© Copyright 2014 TONE SOFTWARE CORPORATION. Confidential and Proprietary. All rights reserved. ® Administrator Training – Release Alarms Administration.
Oracle Business Intelligence Foundation – Testing and Deploying OBI Repository.
Lab 3.21 MySQL Database Lab Developing the Tools May 5 th, 2004 Montréal, Québec Dominik Gehl Hôpital Ste-Justine, Montréal.
Monitoring Alfresco with Nagios/Icinga Toni de la Fuente Alfresco Senior Solutions Engineer Blog: blyx.com
Your current Moodle 1.9 Minimum Requirements Ability to do a TEST RUN! Upgrading Moodle to Version 2 By Ramzan Jabbar Doncaster College for the Deaf By.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
16 Copyright © 2004, Oracle. All rights reserved. Testing the Migrated Oracle Database.
Intermediate MySQL Administration Sheeri Cabral Senior DB Admin/Architect,
Ethan Galstad What Is Nagios? What Nagios Is IT Infrastructure Monitoring.
Nagios Plugins for Monitoring MySQL Presented by: Sheeri K. Cabral Database Operations Manager
Monitoring Asterisk with Icinga2
A Better mysqltuner Sheeri K. Cabral The Pythian Group
Get the Most out of SQL Server Standard Edition
CIT 470: Advanced Network and System Administration
Are You Getting the Best Out of Your MySQL Indexes?
Oracle Database Monitoring and beyond
The Involuntary DBA Where there is Linux, you most likely will find MySQL or MariaDB. Like it or not, if you're working with Linux, you're a DBA.
MySQL Cloud Service 1Z0-320 VCE
CIT 470: Advanced Network and System Administration
How to monitor the $H!T out of Hadoop
ODP node monitoring and maintenance
Presentation transcript:

Alerting With MySQL and Nagios Sheeri Cabral Senior DB Admin/Architect

What is Monitoring? Threshold alerting Graphing/trending

Why Monitor? Problem alerting Find patterns Early warning for potential issues

What to Alert? Problems you can fix – max_connections – long running queries – locked queries – backup disk space

What to Alert? Problems you can fix – max_connections – long running queries – locked queries – backup disk space

Open Source Alerting Solutions Nagios Cacti Munin Zabbix Zenoss OpenNMS

Commercial Alerting Solutions MySQL Enterprise Monitor MONyog Oracle Grid Control Hyperic HQ

Best to use what you already have

Nagios is great because......anyone can write a plugin

The problem with Nagios......anyone can write a plugin

Nagios Flexibility Templates Page after x failures – Network, backup disk Time between checks Escalations Dependencies Time periods

Official Nagios Plugins for MySQL check_mysql check_mysql_query

check_mysql db connectivity slave running slave lag using seconds_behind_master

check_mysql_query Checks the output of a query is within a certain range (numerical)

System vars Status varsCachingCalculations check_mysql yes no check_mysql (standard) noyesno check_mysqld_status noyesno check_mysql_stats yesnoyesno check_mysqld nomanyno check_mysql_health yes noHard-coded check_mysql yes noHard-coded Third party plugins

“Let us know what you'd like to see!”

What I wanted System varsStatus varsCachingCalculations mysql_health_check.plyes flexible

Caching Save information to a file --cache-dir /path/to/dir/ Use the file instead of connecting again --max-cache-age --no-cache to force connection

--mode=varcomp %metadata{varstatus} SHOW GLOBAL VARIABLES SHOW GLOBAL STATUS --expression allows word replacement --warning --critical are flexible

Sample Command Definition define command { command_name check_mysql_tmp_tables command_line $USER1$/mysql_health_check.pl --hostname $HOSTADDRESS$ --user myuser --password mypass --cache-dir=/var/lib/nagios/mysql_cache --max-cache-age=300 --mode=varcomp --expression= "Created_tmp_tables/Uptime_since_flush_status" --warning=">(8/60)" --critical=">(10/60)" }

Sample Service Definition define service { use generic-service host_name __HOSTNAME__ service_description MySQL Temp Tables check_command check_mysql_tmp_tables }

--mode=long-query --mode=locked-query %metadata{proc_list} SHOW FULL PROCESSLIST

Rates Compare to last run mode=lastrun-varcomp

Sample Command Definition define command { command_name check_mysql_locked_queries command_line $USER1$/mysql_health_check.pl --hostname $HOSTADDRESS$ --user myuser -- password mypass --cache-dir=/var/lib/nagios/mysql_cache --max-cache-age=300 --mode=locked-query --warning=$ARG1$ --critical=$ARG2$ }

Extending Information sub fetch_server_meta_data {} add a new hash key to %metadata $metadata{innodb_status} = $dbh->selectall_arrayref( q|SHOW ENGINE INNODB STATUS|);

Currently Unused %metadata{innodb_status} – SHOW ENGINE INNODB STATUS %metadata{master_status} – SHOW MASTER STATUS %metadata{slave_status} – SHOW SLAVE STATUS

“Standard” checks using this plugin High Priority: % max connections --expression 'Threads_connected/max_connections*1 00' locked queries long-running queries InnoDB enabled --expression “have_innodb” --comparison=”ne 'YES'”

“Standard” checks using this plugin % of sleeping connections # connected, # running, # max connections --expression="(Threads_connected- Threads_running)/max_connections * 100" -- comparison=">$ARG1$" slaves set as read-only, masters not --expression “read_only” --comparison=”ne 'YES'”

Limitations One check/calculation per Nagios service – Many variables – Cache output Does not output for performance data

Nagios Plugin for Partitions table_partitions.pl --host --user --pass --database --table --range [days|weeks|months] --verify #

Nagios Plugin for Partitions table_partitions.pl --host db1.mozilla.com --user nagiosuser --pass nagiospass --database addons --table user_addons --range months --verify 3

Other monitoring tools Sar, ksar Iostat Vmstat Netstat pt-config-diff pt-stalk

Download Today! OurSQL podcast (oursql.com) MySQL Administrator's Bible youtube.com/tcation