In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Recently, we want to improve the database monitoring system. We found that Percona Monitoring and Management(PMM), an open source monitoring tool of Percona Company, is more comprehensive and accurate for all values of MySQL monitoring indicators. Now we have deployed it in the company's internal development and testing environment.
The main structure diagram is as follows: From the official
You can see that the client agent node_export\mysqld_export\mongodb_export and the client management tool pmm-admin are used as the data collection method and sent to the QAN API\Consul API\Prometheus and other APIs on the server. Then the data indicators are displayed through Grafana. The interface is very beautiful.
Pmm's server-side operation mode mainly has the following three modes provided by the official:
1. Docker is already integrated.
2. Integrated VirtualBox approach
3. Amazon Machine Image (AMI)
Here I use Docker mode, lightweight deployment, upgrade is very convenient
PMM client installation is relatively convenient, directly install the official yum installation is OK
#Please refer to official documentation for details
https://www.percona.com/doc/percona-monitoring-and-management/index.html
#Dokcer deployment
Prepare the system and Docker services in advance, installation is not shown here
1-Create a container's data disk
docker create \ -v /opt/prometheus/data \ -v /opt/consul-data \ -v /var/lib/mysql \ -v /var/lib/grafana \ --name pmm-data \ percona/pmm-server:1.1.1 /bin/true
2-Create a running instance of the container
docker run -d \ -p 80:80 \ --volumes-from pmm-data \ --name pmm-server \ --restart always \ percona/pmm-server:1.1.1
#Client installation
[root@master ~]# yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
[root@master ~]# yum install -y pmm-client
#Add client mysql monitoring
[root@master ~]# pmm-admin config --server 192.168.100.171
OK, PMM server is alive.
PMM Server | 192.168.100.171
Client Name | master.wboy.com
Client Address | 192.168.100.41
[root@master ~]# pmm-admin list
pmm-admin 1.1.1
PMM Server | 192.168.100.171
Client Name | master.wboy.com
Client Address | 192.168.100.41
Service Manager | unix-systemv
No monitoring registered for this node identified as 'master.wboy.com'.
#Command Help
[root@master ~]# pmm-admin add --help
This command is used to add a monitoring service.
Usage:
pmm-admin add [command]
Available Commands:
mysql Add complete monitoring for MySQL instance (linux and mysql metrics, queries).
linux:metrics Add this system to metrics monitoring.
mysql:metrics Add MySQL instance to metrics monitoring.
mysql:queries Add MySQL instance to Query Analytics.
mongodb Add complete monitoring for MongoDB instance (linux and mongodb metrics).
mongodb:metrics Add MongoDB instance to metrics monitoring.
proxysql:metrics Add ProxySQL instance to metrics monitoring.
Flags:
--service-port uint16 service port
Global Flags:
-c, --config-file string PMM config file (default "/usr/local/percona/pmm-client/pmm.yml")
Use "pmm-admin add [command] --help" for more information about a command.
[root@master ~]# pmm-admin add mysql --help
This command adds the given MySQL instance to system, metrics and queries monitoring.
When adding a MySQL instance, this tool tries to auto-detect the DSN and credentials.
If you want to create a new user to be used for metrics collecting, provide --create-user option. pmm-admin will create
a new user 'pmm@' automatically using the given (auto-detected) MySQL credentials for granting purpose.
Table statistics is automatically disabled when there are more than 10000 tables on MySQL.
[name] is an optional argument, by default it is set to the client name of this PMM client.
Usage:
pmm-admin add mysql [name] [flags]
Examples:
pmm-admin add mysql --password abc123
pmm-admin add mysql --password abc123 --create-user
pmm-admin add mysql --password abc123 --port 3307 instance3307
Flags:
--create-user create a new MySQL user
--create-user-maxconn uint16 max user connections for a new user (default 10)
--create-user-password string optional password for a new MySQL user
--defaults-file string path to my.cnf
--disable-binlogstats disable binlog statistics
--disable-processlist disable process state metrics
--disable-tablestats disable table statistics
--disable-tablestats-limit uint16 number of tables after which table stats are disabled automatically (default 1000)
--disable-userstats disable user statistics
--force force to create/update MySQL user
--host string MySQL host
--password string MySQL password
--port string MySQL port
--query-source string source of SQL queries: auto, slowlog, perfschema (default "auto")
--socket string MySQL socket
--user string MySQL username
Global Flags:
-c, --config-file string PMM config file (default "/usr/local/percona/pmm-client/pmm.yml")
--service-port uint16 service port
#Add local mysql instance
[root@master ~]# pmm-admin add mysql --user root --password root
[linux:metrics] OK, now monitoring this system.
[mysql:metrics] OK, now monitoring MySQL metrics using DSN root:***@unix(/var/lib/mysql/mysql.sock)
[mysql:queries] OK, now monitoring MySQL queries from slowlog using DSN root:***@unix(/var/lib/mysql/mysql.sock)
List of access addresses after installation: In fact, the landing page contains the following three functional pages
PMM landing pagehttp://192.168.100.1Query Analytics (QAN web app) 192.168.100.1/qan/Metrics Monitor (Grafana)
http://192.168.100.1/graph/
User name: admin
Password: admin
Orchestratorhttp://192.168.100.1/orchestrator
##
Here are some screenshots
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.