Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7...

12
percona-agent Documentation Release 1.0.7 Percona October 20, 2014

Transcript of Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7...

Page 1: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

percona-agent DocumentationRelease 1.0.7

Percona

October 20, 2014

Page 2: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both
Page 3: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

Contents

1 Contents 11.1 Installation Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 System Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Reference 72.1 Percona Agent Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

i

Page 4: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

ii

Page 5: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

CHAPTER 1

Contents

1.1 Installation Guide

1.1.1 Quick Install

1. Get your API key.

2. As root, run in the terminal:

curl -s https://cloud.percona.com/install | bash /dev/stdin -api-key="<APIkey>"

By default a quick install:

• Enables Server Metrics Monitor

• Enables MySQL Metrics Monitor if MySQL is present

• Enables MySQL Query Analytics if MySQL is present and running locally

A quick install requires MySQL Auto-detection to work properly. If it fails (e.g. it can’t connect to MySQL), onlyServer Metrics Monitor is enabled.

1.1.2 Standard Install

1. Download the latest percona-agent.

2. Extract the tarball and change to the directory it creates.

3. Run the install script.

By default, the installer is automatic and interactive: it tries to do everything automatically as in a Quick Install, butif it has problems it prompts you for input. You can disable prompts by specifying -interactive=false for anAutomated Install.

1.1.3 Automated Install

To automate installation of percona-agent (e.g. for Chef, Puppet, etc.) add the -interacive=false flagto a Standard Install to prevent the installer from prompting. A Quick Install can be used too because it sets-interacive=false by default.

Automation relies on:

1

Page 6: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

percona-agent Documentation, Release 1.0.7

• proper MySQL Auto-detection

• or, specifying MySQL Options,

• or, a combination of both

If the installer fails to setup MySQL it will continue and enable only Server Metrics Monitor.

For example, without MySQL Auto-detection you can specify the necessary MySQL Options instead:

‘./install -interactive=false -mysql-user=root -mysql-pass=secret -mysql-socket=/var/run/mysqld/mysqld.sock‘

Note: An automated install must create the percona-agent MySQL user; you cannot specify an existing MySQL user.This ability will be added in a future version of the installer.

1.1.4 MySQL Auto-detection

The installer uses mysql --print-defaults to auto-detect the local MySQL instance and MySQL super usercredentials. To ensure proper auto-detection, make sure ~/.my.cnf (for root) has the necessary MySQL options toconnect to MySQL as super user, e.g.:

user=rootpassword=passsocket=/var/run/mysqld/mysqld.sock

MySQL super user credentials are used to create a MySQL user for the agent with these privileges:

• SUPER, PROCESS, USAGE, SELECT ON *.* TO ’percona-agent’@HOST

• UPDATE, DELETE, DROP ON performance_schema.* TO ’percona-agent’@HOST

HOST is localhost if a socket or localhost is used, else 127.0.0.1 if that IP is used, else %. Sometimes theprivileges are granted to localhost and 127.0.0.1.

The percona-agent MySQL user password is randomly generated and can be viewed later through the web app.

1.1.5 MySQL Options

Flag Default Description-mysql true Install for MySQL-create-mysql-user true Create MySQL user for agent-mysql-user MySQL username-mysql-pass MySQL password-mysql-host MySQL host-mysql-port MySQL port-mysql-socket MySQL socket file

To get list of all flags run ./install -help

MySQL options specified on the command line override (take precedence over) MySQL options discovered by MySQLAuto-detection.

1.1.6 Slave Install

To install percon-agent on a slave, first install it on the master, then on the slave run the install script with-create-mysql-user=false and it will prompt you for the existing percona-agent MySQL user credentials.

Since this requires a prompt, a slave install does not currently work for an Automated Install.

2 Chapter 1. Contents

Page 7: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

percona-agent Documentation, Release 1.0.7

1.1.7 Non-MySQL Install

To install percona-agent on a server without MySQL (e.g. to monitor only server metrics), use -mysql=false:

./install -mysql=false

1.1.8 Updating the Agent

With Quick Install

When new version is available

1. Get your api-key

2. Run in terminal as root:

curl -s https://cloud.percona.com/install | bash /dev/stdin -api-key="<APIkey>"

With Standard Install

1. Download the latest percona-agent to your server.

2. Extract the tarball.

3. Run the install script.

1.1.9 Uninstalling the Agent

First, to stop and remove percona-agent from a server, as root run either:

• curl -s https://cloud.percona.com/install | bash /dev/stdin -uninstall (ifyou did a Quick Install)

or,

• ./install -uninstall (if you did a Standard Install)

Then delete the agent in the web app. This removes its configuration and Query Analytics data from Percona CloudTools.

You can also delete any MySQL instances that the agent was monitoring.

Finally, you drop the percona-agent MySQL user from any MySQL instance the agent was monitoring by executing:

DROP USER ’percona-agent’@’localhost’;DROP USER ’percona-agent’@’127.0.0.1’;

1.2 System Info

1.2.1 About

System Info provides nicely formatted information about Server instance and/or MySQL instance.

1.2. System Info 3

Page 8: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

percona-agent Documentation, Release 1.0.7

1.2.2 Requirements

System Info requires:

• Percona Agent in version 1.0.7 or greater

Installation and update instructions for Percona Agent can be found here

• Percona Toolkit installed on the same server as Percona Agent

Installation instructions for Percona Toolkit can be found in the Percona Toolkit manual

1.2.3 Usage

To access this information click on System Info link for chosen instance in Metrics or Queries section ofcloud.percona.com. You can also access it from configuration section of Server Instances or MySQL Instances

Below is an example System Info link for db07 MySQL instance on Metrics tab

And this is how the example report looks like

4 Chapter 1. Contents

Page 9: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

percona-agent Documentation, Release 1.0.7

1.2.4 Output

System Info report can be generated for Server instance or MySQL instance. Each report has his own tab with anavigation bar on the left. Navigation bar allows to quickly jump to different sections of the report. Whole report andeach section of it can be copied to clipboard (look for clipboard icon) and then pasted into emails without losing theformatting.

Server

Runs a large variety of commands to inspect system status and its configuration. Report is split into sections:

• Server Info

• Processor

• Memory

• Mounted Filesystems

• Disk Schedulers And Queue Size

• Disk Partioning

• Kernel Inode State

• LVM Volumes

• LVM Volume Groups

• RAID Controller

• Network Config

• Interface Statistics

• Network Connections

1.2. System Info 5

Page 10: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

percona-agent Documentation, Release 1.0.7

• Top Processes

• Notable Processes

• Simplified and fuzzy rounded vmstat

Detailed information about each of those sections can be found in official pt-summary documentation

MySQL

Conveniently summarizes the status and configuration of a MySQL database server. Report is split into sections:

• MySQL Info

• Instances

• MySQL Executable

• Report On Port <port>

• Processlist

• Status Counters

• Table cache

• Key Percona Server features

• Percona XtraDB Cluster

• Plugins

• Query cache

• Schema

• Noteworthy Technologies

• InnoDB

• MyISAM

• Security

• Binary Logging

• Noteworthy Variables

• Configuration File

Detailed information about each of those sections can be found in official pt-mysql-summary documentation

6 Chapter 1. Contents

Page 11: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

CHAPTER 2

Reference

2.1 Percona Agent Release Notes

2.1.1 Percona Agent 1.0

Percona Agent 1.0.7

Percona is glad to announce the release of Percona Agent 1.0.7 on September 5th 2014. Downloads are availablefrom our download site here. Percona Agent can be installed or upgraded as described in the manual. This version ofpt-agent has been built with with Go MySQL driver ver. 0b000424e5.

New Features

• pt-agent is now able to gather the detailed system and MySQL server information. This information isgathered by running the pt-summary and pt-mysql-summary on a server. Gathered information will bedisplayed in the System Info section in Percona Cloud Tools.

Bugs Fixed

• Count metric which is used for displaying number of samples was missing one sample per minute.

• If gathering MySQL metrics from server takes to long, it will be skipped to avoid saturating the server evenfurther.

• Bad data file was causing agent to stop sending but keep spooling the data. Error handling for bad data files hasbeen improved not to cause unnecessary stalls and zero-length data files are now ignored/removed (and cause awarning).

• Running EXPLAIN when key_len column contained more than one value wasn’t supported.

Percona Agent 1.0.8

Percona is glad to announce the release of Percona Agent 1.0.8 on September 18th 2014. Downloads are availablefrom our download site here. Percona Agent can be installed or upgraded as described in the manual. This version ofpt-agent has been built with with Go MySQL driver ver. 0b000424e5.

7

Page 12: Release 1.0.7 Percona - media.readthedocs.org · percona-agent Documentation, Release 1.0.7 •properMySQL Auto-detection •or, specifyingMySQL Options, •or, a combination of both

percona-agent Documentation, Release 1.0.7

Bugs Fixed

• The agent could start reporting the same values for metrics, which would produce a flat line for metrics. Thisregression was caused by fixes for bugs in 1.0.7 release.

• Agent was adding up the difference and using that to calculate the average, instead of adding up the rates inorder to average the rates.

• Fixed the typo in the mysql.Monitor warning regarding the skipped interval.

8 Chapter 2. Reference