{"id":63322,"date":"2022-04-01T09:02:03","date_gmt":"2022-04-01T09:02:03","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=63322"},"modified":"2022-04-01T09:02:03","modified_gmt":"2022-04-01T09:02:03","slug":"monitor-your-databases-with-this-open-source-tool","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=63322","title":{"rendered":"Monitor your databases with this open source tool"},"content":{"rendered":"<p><span class=\"field field--name-title field--type-string field--label-hidden\">Monitor your databases with this open source tool<\/span><br \/>\n<span class=\"field field--name-uid field--type-entity-reference field--label-hidden\"><a title=\"View user profile.\" href=\"https:\/\/opensource.com\/users\/dave-stokes-perconacom\" class=\"username\">Dave Stokes &#8211; \u2026<\/a><\/span><br \/>\n<span class=\"field field--name-created field--type-created field--label-hidden\">Fri, 04\/01\/2022 &#8211; 03:00<\/span><\/p>\n<div data-drupal-selector=\"rate-node-69751\" class=\"rate-widget-thumbs-up\">\n<div class=\"rate-thumbs-up-btn-up rate-thumbs-up-btn-up vote-pending\">Up<\/div>\n<div class=\"rate-score\"><a href=\"https:\/\/opensource.com\/user\/register?absolute=1\">Register<\/a> or <a href=\"https:\/\/opensource.com\/user\/login?current=\/rss.xml&amp;absolute=1\">Login<\/a> to like.<\/div>\n<\/div>\n<div class=\"clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item\">\n<p>I have been using databases for a lot longer than I care to admit, and a lot of that time has been spent looking at the entrails of servers, trying to determine exactly what they were doing. Thank goodness for the engineers behind the MySQL Performance Schema and Information Schema and their efforts to provide solid information. And then came the Sys schema with handy prepackaged peeks at the server. Before the advent of those schemas, there was no easy way to get granular information about a database instance.<\/p>\n<p>But peering at tabulated displays at the information of one point in time does not allow for trend-spotting or a quick glance to ascertain a server&#8217;s status. Being able to spot a trend on a graph or have alerts sent when a threshold is reached is vital. My friends in the PostgreSQL and MongoDB worlds had the same problem. The good news is that there is an open source solution for all three databases that is easy to install and use.<\/p>\n<\/p>\n<div class=\"embedded-resource-list callout-float-right\">\n<div class=\"field field--name-title field--type-string field--label-hidden field__item\">More great content<\/div>\n<div class=\"field field--name-links field--type-link field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/www.redhat.com\/en\/services\/training\/rh024-red-hat-linux-technical-overview?intcmp=7016000000127cYAAQ\">Free online course: RHEL technical overview<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/developers.redhat.com\/cheat-sheets\/advanced-linux-commands\/?intcmp=7016000000127cYAAQ\">Learn advanced Linux commands<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/cheat-sheets?intcmp=7016000000127cYAAQ\">Download cheat sheets<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/linux?intcmp=7016000000127cYAAQ\">Find an open source alternative<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/resources?intcmp=7016000000127cYAAQ\">Explore open source resources<\/a><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<p>I am a fairly new employee at Percona but have been around <a href=\"https:\/\/opensource.com\/downloads\/mariadb-mysql-cheat-sheet\">MySQL<\/a> for a <em>long<\/em> time. One of my first goals was to learn how to set up and use Percona Monitoring and Measurement (PMM). I know a whole slew of folks who use it happily, but I had only worked with it for a few moments at a trade show. My natural trepidation at installing anything that provided graphical information linked to a database was established well before open source databases were around. This hesitation is rooted in attempts to configure other monitoring software for proprietary databases.<\/p>\n<p>The TL;DR is that PMM is simple to install and use. The documentation is well written, detailed, and handy. The software itself is easy to obtain and install. The overall experience is a ten out of ten.<\/p>\n<h2>Test case<\/h2>\n<p>I like to try new stuff on old laptops, so I installed a fresh copy of Ubuntu 20.04 LTS. Next, I read the PMM <a href=\"https:\/\/www.percona.com\/software\/pmm\/quickstart#\" rel=\"noopener\" target=\"_blank\">documentation<\/a>.<\/p>\n<p>I should say I read the documentation twice while muttering <em>it can&#8217;t be that simple<\/em>. At the end of this article you will find the commands I entered to install the PMM server and the agents (MySQL, PostgreSQL, and Mongo). It&#8217;s a cookbook showing how to recreate this test case.<\/p>\n<p>Here are the Percona Database Distributions:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.percona.com\/downloads\/percona-distribution-mysql-ps\/LATEST\/\" rel=\"noopener\" target=\"_blank\">MySQL<\/a><\/li>\n<li><a href=\"https:\/\/www.percona.com\/downloads\/postgresql-downloads\" rel=\"noopener\" target=\"_blank\">PostgreSQL<\/a><\/li>\n<li><a href=\"https:\/\/www.percona.com\/downloads\/percona-distribution-mongodb-LATEST\/\" rel=\"noopener\" target=\"_blank\">MongoDB<\/a><\/li>\n<\/ul>\n<h2>Prerequisite<\/h2>\n<p>The prerequisite for installing PMM is Docker, which proves to be the most intensive part of the entire installation. Thankfully the package management software for Ubuntu (<code>apt<\/code>) makes this very simple.\u00a0<\/p>\n<h2>Installing the Percona Monitoring and Measurement server<\/h2>\n<p>Installing the PMM server is simple for anyone familiar with the APT package manager. Pay attention to the output that provides the URLs for connecting to the PMM server. In my case, the addresses were <a href=\"https:\/\/127.0.0.1\/\">https:\/\/127.0.0.1:443\/<\/a>, <a href=\"https:\/\/192.168.1.209\/\">https:\/\/192.168.1.209:443\/<\/a>, and <a href=\"https:\/\/172.17.0.1\/\">https:\/\/172.17.0.1:443\/<\/a>.<\/p>\n<p>You will have to log in to the PMM dashboard (default account and password are <code>admin<\/code> and <code>admin<\/code>).<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/login.png\" width=\"936\" height=\"536\" alt=\"PMM login\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(David Stokes, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>After a successful login, the PMM displays a dashboard.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/dashboard.png\" width=\"936\" height=\"536\" alt=\"dashboard\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(David Stokes, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>At this time, PMM is only monitoring the underlying system and the database it uses for gathering statistics\u2014that is what the Monitored Nodes and Monitored DB counts in the above image are both displaying <strong>1<\/strong>.<\/p>\n<h2>The database clients<\/h2>\n<p>The clients monitor the database instances, and again clients are simple to install with the package manager. The next step is registering the client with the server:<\/p>\n<pre>\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> pmm-admin config <span class=\"re5\">--server-insecure-tls<\/span> <span class=\"re5\">--server-url<\/span>=https:<span class=\"sy0\">\/\/<\/span>admin:admin<span class=\"sy0\">@<\/span>127.0.0.1<\/code><\/span><\/pre>\n<p>The final steps are configuring the database server. In the example below, Percona&#8217;s MySQL is installed, and an account is created for gathering statistics. Finally, the client collects information from the database instance:<\/p>\n<pre>\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> pmm-admin add mysql <span class=\"re5\">--username<\/span>=pmm <span class=\"re5\">--password<\/span>=pass <span class=\"re5\">--query-source<\/span>=perfschema<\/code><\/span><\/pre>\n<p>For PostgreSQL and MongoDB, replace the name of the database on the <code>add<\/code> option to the respective instance you desire to monitor.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/monitorednodes.png\" width=\"936\" height=\"536\" alt=\"monitored nodes\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(David Stokes, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>You will notice that the Monitored Node count increased to <strong>2<\/strong> above.<\/p>\n<p>PPM gives you access to many different views of what the server is doing. You can see the overall health of the server itself.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/instances-overview.png\" width=\"936\" height=\"536\" alt=\"instances overview\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(David Stokes, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>The general MySQL dashboard displays the overall health of the system.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/systemload.png\" width=\"936\" height=\"536\" alt=\"system load\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(David Stokes, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>And you can easily study the load on the system.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/queries.png\" width=\"936\" height=\"536\" alt=\"queries\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(David Stokes, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>Or study individual queries.<\/p>\n<h2>Wrap up<\/h2>\n<p>Percona Monitoring and Management is an open source tool to monitor your MySQL, MongoDB, or PostgreSQL instances. It is easy to install and provides great insight into your servers.<\/p>\n<p>Please let the author have any feedback or questions you have on this subject.<\/p>\n<h2>Cookbook<\/h2>\n<p>The following are the commands and responses needed to install PMM and Percona&#8217;s MySQL on a fresh installation of Ubuntu 20.04 LTS.<\/p>\n<h2>1. Install Docker<\/h2>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">sudo<\/span> update-manager<br><br>\n$ <span class=\"kw2\">apt-get install<\/span> ca-certificates curl gnupg lsudo sb-release<br><br>\n$ <span class=\"kw3\">echo<\/span> <span class=\"st0\">\"deb [arch=<span class=\"es4\">$(dpkg --print-architecture)<\/span> signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/ubuntu <span class=\"es1\"><br><\/span>\u00a0\u00a0<span class=\"es4\">$(lsb_release -cs)<\/span> stable\"<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">tee<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>sources.list.d<span class=\"sy0\">\/<\/span>docker.list <span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null<br><br>\n$ <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get update<\/span><\/div><\/div><\/pre>\n<h2>2. Install PMM Server<\/h2>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ curl <span class=\"re5\">-fsSL<\/span> https:<span class=\"sy0\">\/\/<\/span>www.percona.com<span class=\"sy0\">\/<\/span>get<span class=\"sy0\">\/<\/span>pmm <span class=\"sy0\">|<\/span> <span class=\"kw2\">sudo<\/span> <span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span><span class=\"kw2\">bash<\/span><br><br>\nGathering<span class=\"sy0\">\/<\/span>downloading required components, this may take a moment<br><br>\nChecking docker installation - installed.<br><br>\nStarting PMM server...<br>\nCreated PMM Data Volume: pmm-data<br>\nCreated PMM Server: pmm-server<br>\n\u00a0 \u00a0\u00a0Use the following <span class=\"kw3\">command<\/span> <span class=\"kw1\">if<\/span> you ever need to update your container by hand:<br>\n\u00a0 \u00a0\u00a0docker run <span class=\"re5\">-d<\/span> <span class=\"re5\">-p<\/span> <span class=\"nu0\">443<\/span>:<span class=\"nu0\">443<\/span> <span class=\"re5\">--volumes-from<\/span> pmm-data <span class=\"re5\">--name<\/span> pmm-server <span class=\"re5\">--restart<\/span> always percona<span class=\"sy0\">\/<\/span>pmm-server:<span class=\"nu0\">2<\/span><br><br>\nPMM Server has been successfully setup on this system<span class=\"sy0\">!<\/span><br><br>\nYou can access your new server using the one of following web addresses:<br>\n\u00a0 \u00a0\u00a0https:<span class=\"sy0\">\/\/<\/span>127.0.0.1:<span class=\"nu0\">443<\/span><span class=\"sy0\">\/<\/span><br>\n\u00a0 \u00a0\u00a0https:<span class=\"sy0\">\/\/<\/span>192.168.1.209:<span class=\"nu0\">443<\/span><span class=\"sy0\">\/<\/span><br>\n\u00a0 \u00a0\u00a0https:<span class=\"sy0\">\/\/<\/span>172.17.0.1:<span class=\"nu0\">443<\/span><span class=\"sy0\">\/<\/span><br><br>\nThe default username is <span class=\"st_h\">'admin'<\/span> and the password is <span class=\"st_h\">'admin'<\/span> :<span class=\"br0\">)<\/span><br>\nNote: Some browsers may not trust the default SSL certificate when you first open one of the urls above.<br>\nIf this is the <span class=\"kw1\">case<\/span>, Chrome <span class=\"kw2\">users<\/span> may want to <span class=\"kw3\">type<\/span> <span class=\"st_h\">'thisisunsafe'<\/span> to bypass the warning.<br><br>\nEnjoy Percona Monitoring and Management<span class=\"sy0\">!<\/span><\/div><\/div><\/pre>\n<h2>3. Add the Percona repo<\/h2>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">wget<\/span> https:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>percona-release_latest.$<span class=\"br0\">(<\/span>lsb_release -sc<span class=\"br0\">)<\/span>_all.deb<br><br>\n$ <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">dpkg<\/span> <span class=\"re5\">-i<\/span> percona-release_latest.$<span class=\"br0\">(<\/span>lsb_release -sc<span class=\"br0\">)<\/span>_all.deb<br><br>\n$ <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get update<\/span><br><br>\nGet:<span class=\"nu0\">1<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>percona<span class=\"sy0\">\/<\/span>apt focal InRelease <span class=\"br0\">[<\/span><span class=\"nu0\">15.8<\/span> kB<span class=\"br0\">]<\/span><br>\nHit:<span class=\"nu0\">2<\/span> http:<span class=\"sy0\">\/\/<\/span>us.archive.ubuntu.com<span class=\"sy0\">\/<\/span>ubuntu focal InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br>\nHit:<span class=\"nu0\">3<\/span> http:<span class=\"sy0\">\/\/<\/span>us.archive.ubuntu.com<span class=\"sy0\">\/<\/span>ubuntu focal-updates InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br>\nHit:<span class=\"nu0\">4<\/span> http:<span class=\"sy0\">\/\/<\/span>us.archive.ubuntu.com<span class=\"sy0\">\/<\/span>ubuntu focal-backports InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br>\nHit:<span class=\"nu0\">5<\/span> http:<span class=\"sy0\">\/\/<\/span>security.ubuntu.com<span class=\"sy0\">\/<\/span>ubuntu focal-security InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br>\nGet:<span class=\"nu0\">6<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>prel<span class=\"sy0\">\/<\/span>apt focal InRelease <span class=\"br0\">[<\/span><span class=\"nu0\">9<\/span>,<span class=\"nu0\">779<\/span> B<span class=\"br0\">]<\/span>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br>\nHit:<span class=\"nu0\">7<\/span> https:<span class=\"sy0\">\/\/<\/span>download.docker.com<span class=\"sy0\">\/<\/span>linux<span class=\"sy0\">\/<\/span>ubuntu focal InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br>\nGet:<span class=\"nu0\">8<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>percona<span class=\"sy0\">\/<\/span>apt focal<span class=\"sy0\">\/<\/span>main Sources <span class=\"br0\">[<\/span><span class=\"nu0\">4<\/span>,<span class=\"nu0\">509<\/span> B<span class=\"br0\">]<\/span><br>\nGet:<span class=\"nu0\">9<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>percona<span class=\"sy0\">\/<\/span>apt focal<span class=\"sy0\">\/<\/span>main amd64 Packages <span class=\"br0\">[<\/span><span class=\"nu0\">18.1<\/span> kB<span class=\"br0\">]<\/span><br>\nGet:<span class=\"nu0\">10<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>percona<span class=\"sy0\">\/<\/span>apt focal<span class=\"sy0\">\/<\/span>main i386 Packages <span class=\"br0\">[<\/span><span class=\"nu0\">414<\/span> B<span class=\"br0\">]<\/span><br>\nGet:<span class=\"nu0\">11<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>prel<span class=\"sy0\">\/<\/span>apt focal<span class=\"sy0\">\/<\/span>main i386 Packages <span class=\"br0\">[<\/span><span class=\"nu0\">750<\/span> B<span class=\"br0\">]<\/span><br>\nGet:<span class=\"nu0\">12<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>prel<span class=\"sy0\">\/<\/span>apt focal<span class=\"sy0\">\/<\/span>main amd64 Packages <span class=\"br0\">[<\/span><span class=\"nu0\">851<\/span> B<span class=\"br0\">]<\/span><br>\nFetched <span class=\"nu0\">50.2<\/span> kB <span class=\"kw1\">in<\/span> 2s <span class=\"br0\">(<\/span><span class=\"nu0\">22.7<\/span> kB<span class=\"sy0\">\/<\/span>s<span class=\"br0\">)<\/span><br>\nReading package lists... Done<\/div><\/div><\/pre>\n<h2>4. Install the agents<\/h2>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get install<\/span> pmm2-client<br><br>\nReading package lists... Done<br>\nBuilding dependency <span class=\"kw2\">tree<\/span>\u00a0 \u00a0 \u00a0 \u00a0<br>\nReading state information... Done<br>\nThe following NEW packages will be installed:<br>\n\u00a0\u00a0pmm2-client<br><span class=\"nu0\">0<\/span> upgraded, <span class=\"nu0\">1<\/span> newly installed, <span class=\"nu0\">0<\/span> to remove and <span class=\"nu0\">1<\/span> not upgraded.<br>\nNeed to get <span class=\"nu0\">78.0<\/span> MB of archives.<br>\nAfter this operation, <span class=\"nu0\">195<\/span> MB of additional disk space will be used.<br>\nGet:<span class=\"nu0\">1<\/span> http:<span class=\"sy0\">\/\/<\/span>repo.percona.com<span class=\"sy0\">\/<\/span>percona<span class=\"sy0\">\/<\/span>apt focal<span class=\"sy0\">\/<\/span>main amd64 pmm2-client amd64 2.26.0-<span class=\"nu0\">6<\/span>.focal <span class=\"br0\">[<\/span><span class=\"nu0\">78.0<\/span> MB<span class=\"br0\">]<\/span><br>\nFetched <span class=\"nu0\">78.0<\/span> MB <span class=\"kw1\">in<\/span> 9s <span class=\"br0\">(<\/span><span class=\"nu0\">9<\/span>,078 kB<span class=\"sy0\">\/<\/span>s<span class=\"br0\">)<\/span>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br>\nSelecting previously unselected package pmm2-client.<br><span class=\"br0\">(<\/span>Reading database ... <span class=\"nu0\">144323<\/span> files and directories currently installed.<span class=\"br0\">)<\/span><br>\nPreparing to unpack ...<span class=\"sy0\">\/<\/span>pmm2-client_2.26.0-<span class=\"nu0\">6<\/span>.focal_amd64.deb ...<br>\nAdding system user <span class=\"sy0\">`<\/span>pmm-agent<span class=\"st_h\">' (UID 127) ...<br>\nAdding new group `pmm-agent'<\/span> <span class=\"br0\">(<\/span>GID <span class=\"nu0\">134<\/span><span class=\"br0\">)<\/span> ...<br>\nAdding new user <span class=\"sy0\">`<\/span>pmm-agent<span class=\"st_h\">' (UID 127) with group `pmm-agent'<\/span> ...<br>\nCreating home directory <span class=\"sy0\">`\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>percona<span class=\"st_h\">' ...<br>\nUnpacking pmm2-client (2.26.0-6.focal) ...<br>\nSetting up pmm2-client (2.26.0-6.focal) ...<br>\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/pmm-agent.service \u00e2\u2020\u2019 \/lib\/systemd\/system\/pmm-agent.service.<br><br>\n$ sudo pmm-admin config --server-insecure-tls --server-url=https:\/\/admin:admin@127.0.0.1:443<br><br>\nChecking local pmm-agent status...<br>\npmm-agent is running.<br>\nRegistering pmm-agent on PMM Server...<br>\nRegistered.<br>\nConfiguration file \/usr\/local\/percona\/pmm2\/config\/pmm-agent.yaml updated.<br>\nReloading pmm-agent configuration...<br>\nConfiguration reloaded.<br>\nChecking local pmm-agent status...<br>\npmm-agent is running.<\/span><\/div><\/div><\/pre>\n<h2>5. Install Percona MySQL<\/h2>\n<pre>\n<code>$ wget https:\/\/repo.percona.com\/apt\/percona-release_latest.generic_all.deb\n--2022-03-08 12:57:38-- https:\/\/repo.percona.com\/apt\/percona-release_latest.generic_all.deb\nResolving repo.percona.com (repo.percona.com)... 149.56.23.204\nConnecting to repo.percona.com (repo.percona.com)|149.56.23.204|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 11804 (12K) [application\/x-debian-package]\nSaving to: \u00e2\u20ac\u02dcpercona-release_latest.generic_all.deb\u00e2\u20ac&#x2122;\n\npercona-release_latest.generic_ 100%[======================================================&gt;] 11.53K --.-KB\/s in 0s\u00a0 \u00a0 \u00a0\u00a0\n\n2022-03-08 12:57:38 (96.1 MB\/s) - \u00e2\u20ac\u02dcpercona-release_latest.generic_all.deb\u00e2\u20ac&#x2122; saved [11804\/11804]\n\n\n$ sudo dpkg -i percona-release_latest.generic_all.deb\n(Reading database ... 144372 files and directories currently installed.)\nPreparing to unpack percona-release_latest.generic_all.deb ...\nUnpacking percona-release (1.0-27.generic) over (1.0-27.generic) ...\nSetting up percona-release (1.0-27.generic) ...\n* Enabling the Percona Original repository\n All done!\n==&gt; Please run \"apt-get update\" to apply changes\n* Enabling the Percona Release repository\n All done!\n==&gt; Please run \"apt-get update\" to apply changes\nThe percona-release package now contains a percona-release script that can enable additional repositories for our newer products.\n\nFor example, to enable the Percona Server 8.0 repository use:\n\n\u00a0\u00a0percona-release setup ps80\n\nNote: To avoid conflicts with older product versions, the percona-release setup command may disable our original repository for some products.\n\nFor more information, please visit:\n\u00a0\u00a0https:\/\/www.percona.com\/doc\/percona-repo-config\/percona-release.html\n\n\n$ sudo percona-release setup pdps-8.0\n* Disabling all Percona Repositories\n* Enabling the Percona Distribution for MySQL 8.0 - PS repository\nHit:1 http:\/\/security.ubuntu.com\/ubuntu focal-security InRelease\nGet:2 http:\/\/repo.percona.com\/pdps-8.0\/apt focal InRelease [9,806 B]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\nHit:3 http:\/\/us.archive.ubuntu.com\/ubuntu focal InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\nHit:4 http:\/\/repo.percona.com\/prel\/apt focal InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\nHit:5 http:\/\/us.archive.ubuntu.com\/ubuntu focal-updates InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\nHit:6 https:\/\/download.docker.com\/linux\/ubuntu focal InRelease\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\nHit:7 http:\/\/us.archive.ubuntu.com\/ubuntu focal-backports InRelease\nGet:8 http:\/\/repo.percona.com\/pdps-8.0\/apt focal\/main Sources [6,609 B]\nGet:9 http:\/\/repo.percona.com\/pdps-8.0\/apt focal\/main amd64 Packages [67.4 kB]\nFetched 83.8 kB in 1s (63.1 kB\/s)\u00a0\u00a0\nReading package lists... Done\n\n\n$ sudo apt install percona-server-server\n\nmysql -e \"CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'\"\n\u00a0 \u00a0\u00a0mysql -e \"CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'\"\n\u00a0 \u00a0\u00a0mysql -e \"CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'\"\n\n\n$ sudo apt install percona-mysl-shell\n\nmysqlsh root@localhost\nSQL MODE\nCREATE USER 'pmm'@'localhost' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10;\nGRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON\u00a0*.*\u00a0TO 'pmm'@'localhost';<\/code><\/pre>\n<h2>6. Start the client<\/h2>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">sudo<\/span> pmm-admin add mysql <span class=\"re5\">--username<\/span>=pmm <span class=\"re5\">--password<\/span>=pass <span class=\"re5\">--query-source<\/span>=perfschema<br><br>\nMySQL Service added.<br>\nService ID : <span class=\"sy0\">\/<\/span>service_id<span class=\"sy0\">\/<\/span>d774faf2-fd3c-<span class=\"nu0\">4758<\/span>-9db9-3e1edb65b292<br>\nService name: test2-mysql<br><br>\nTable statistics collection enabled <span class=\"br0\">(<\/span>the limit is <span class=\"nu0\">1000<\/span>, the actual table count is <span class=\"nu0\">341<\/span><span class=\"br0\">)<\/span>.<\/div><\/div><\/pre>\n<\/div>\n<div class=\"clearfix text-formatted field field--name-field-article-subhead field--type-text-long field--label-hidden field__item\">\n<p>Percona Monitoring and Management is an open source tool to monitor your MySQL, MongoDB, or PostgreSQL instances.<\/p>\n<\/div>\n<div class=\"field field--name-field-lead-image field--type-entity-reference field--label-hidden field__item\">\n<article class=\"media media--type-image media--view-mode-caption\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/code_computer_laptop_hack_work.png\" width=\"1041\" height=\"584\" alt=\"Coding on a computer\" title=\"Coding on a computer\" loading=\"lazy\"><\/div>\n<\/article>\n<\/div>\n<div class=\"field field--name-field-tags field--type-entity-reference field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/databases\" hreflang=\"en\">Databases<\/a><\/div>\n<\/p><\/div>\n<div class=\"hidden field field--name-field-listicle-title field--type-string field--label-hidden field__item\">What to read next<\/div>\n<div class=\"field field--name-field-default-license field--type-list-string field--label-hidden field__item\"><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><br \/>\n        <img decoding=\"async\" alt=\"Creative Commons License\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/04\/cc-by-sa-4-1.png\" title=\"This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.\"><\/a>This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.<\/div>\n<section class=\"field field--name-field-comments field--type-comment field--label-hidden comment-wrapper\">\n<div class=\"comments__count\">\n<div class=\"login\"><a href=\"https:\/\/opensource.com\/user\/register?absolute=1\">Register<\/a> or <a href=\"https:\/\/opensource.com\/user\/login?current=\/rss.xml&amp;absolute=1\">Login<\/a> to post a comment.<\/div>\n<\/p><\/div>\n<\/section>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\" rel=\"noopener\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Monitor your databases with this open source tool Dave Stokes &#8211; \u2026 Fri, 04\/01\/2022 &#8211; 03:00 Up Register or Login to like. I have been using databases for a lot longer than I care to admit, and a lot of that time has been spent looking at the entrails of servers, trying to determine exactly [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":63323,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[307],"tags":[],"class_list":["post-63322","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/63322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63322"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/63322\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/63323"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}