pmm for aws

46
PMM for AWS Daniel Guzman Burgos Percona

Upload: others

Post on 24-Apr-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PMM for AWS

PMM for AWS

Daniel Guzman BurgosPercona

Page 2: PMM for AWS

2

Agenda

• What is different?

• What is additional?

• What is not there?

Page 3: PMM for AWS

What is Different?Doing alternative things

Page 4: PMM for AWS

● Adding/Removing instances procedure● Access requirements● Configuration Requirements

4

What is Different?

Page 5: PMM for AWS

5

Adding/Removing instances

No need to use the pmm-admin (From the pmm-client package)

Page 6: PMM for AWS

6

Adding/Removing instances

Though you could use pmm-admin (more on that in a bit)

Page 7: PMM for AWS

7

Adding/Removing instances

Use an IAM user account

Page 8: PMM for AWS

8

Access Requirements

Details on what is an IAM users are out of scope.

But not hard to find: https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html

Page 9: PMM for AWS

9

Access Requirements

IAM policy is part of the scope, though

Details: https://www.percona.com/doc/percona-monitoring-and-management/amazon-rds.html#pmm-amazon-rds-iam-user-policy

Page 10: PMM for AWS

10

Access Requirements

Once

1. IAM user is created 2. Policy is in place3. And credentials are created….

We can continue adding instances to PMM!

Page 11: PMM for AWS

11

Adding/Removing instances

Page 12: PMM for AWS

12

Adding/Removing instances

Page 13: PMM for AWS

13

Adding/Removing instances

What about PostgreSQL ?

Page 14: PMM for AWS

14

Adding/Removing instances

PostgreSQL RDS instance can be added as a remote DB instance:

Page 15: PMM for AWS

15

Adding/Removing instances

Only credentials access are required

Page 16: PMM for AWS

16

Adding/Removing instances

But also available on the remote instances dashboard

Page 17: PMM for AWS

17

Adding/Removing instances

the postgres_exporter will immediately kick in

Page 18: PMM for AWS

18

Adding/Removing instances

Page 19: PMM for AWS

19

Adding/Removing instances

Page 20: PMM for AWS

20

Adding/Removing instances

Page 21: PMM for AWS

21

Adding/Removing instances

The “Amazon RDS / Aurora MySQL Metrics” dashboard is going to be

deprecated on PMM 2

Page 22: PMM for AWS

22

Adding/Removing instances

PMM 2?? Whaat?

Currently on Alpha: https://www.percona.com/blog/2019/05/03/percona-monitoring-and-manage

ment-pmm-2-0-0-alpha2-is-now-available/

Page 23: PMM for AWS

23

Adding/Removing instances

PMM 2?? Whaat?

But coming as Beta TOMORROW May 30th!!!

Page 24: PMM for AWS

24

Adding/Removing instances

Why is the “Amazon RDS / Aurora MySQL Metrics” dashboard is going

to be deprecated on PMM 2 ?

Page 25: PMM for AWS

25

Adding/Removing instances

Because it was an intermediate solution.

It was Grafana’s CloudWatch data source-based

Page 26: PMM for AWS

26

Adding/Removing instances

It was kind of tricky to set it up.

Page 27: PMM for AWS

27

Adding/Removing instances

And data was not persisted on Prometheus

Page 28: PMM for AWS

28

Adding/Removing instances

All that was fixed when rds_exporter were

introduced

Page 29: PMM for AWS

29

Configuration requirements

● Performance Schema enabled for QAN

Page 30: PMM for AWS

30

Configuration requirements

● Performance Schema enabled for QAN● Enable Enhanced Monitoring for the RDS instance

Page 31: PMM for AWS

31

Configuration requirements

● Performance Schema enabled for QAN● Enable Enhanced monitoring for the RDS instance● If you want to use the legacy “Amazon RDS/ Aurora

MySQL Metrics” dashboard: Create the .aws/credentials file

Page 32: PMM for AWS

32

Configuration requirements

Docker steps:

● docker exec -ti pmm-server bash● mkdir /usr/share/grafana/.aws● vi /usr/share/grafana/.aws/credentials

[default]aws_access_key_id=YOURACCESSKEYaws_secret_access_key=YOURSECRETKEY

Page 33: PMM for AWS

33

Adding an RDS instance from the command line

Know that pmm-admin can still be used to add RDS instances to PMM...

...But it is not recommended

Page 34: PMM for AWS

34

● EC2 instance - yum -y install pmm-client● pmm-admin config● pmm-admin add mysql:metrics --server-host=SOMETHING-REMOTE

● Caveat is that you lose the rds_exporter - which means you don't have Host level metrics

● Caution - if you install linux:metrics (pmm-admin add mysql) you will get local ec2 compute metrics which is weird and won't make sense

Adding an RDS instance from the command line

Page 35: PMM for AWS

35

● Available through the Performance Schema.● No slow log● Currently not available for PostgreSQL (sorry)

QAN

Page 36: PMM for AWS

36

How you manage to get Query Digest-like info from the Performance Schema?

QAN

Page 37: PMM for AWS

37

How you manage to get Query Digest-like info from the Performance Schema?

QAN

The performance_schema.events_statements_summary_by_digest table got your back

More on that can be found at https://www.percona.com/blog/2015/10/13/mysql-query-digest-with-performance-schema/

Page 38: PMM for AWS

38

QAN

Page 39: PMM for AWS

What is Additional?Things custom made for AWS

Page 40: PMM for AWS

40

What is Additional?

● RDS/Aurora own dashboards● RDS_EXPORTER

Page 41: PMM for AWS

41

RDS/Aurora dashboards

Page 42: PMM for AWS

42

RDS/Aurora dashboards

Page 43: PMM for AWS

43

rds_exporter

● Collect metrics from CloudWatch AND store it in Prometheus

● Advanced metrics available if Enhanced Monitoring is enabled

● Saves money (credits are used once)● Allows for standard dashboards utilization

https://www.percona.com/doc/percona-monitoring-and-management/section.exporter.rds.html

Page 44: PMM for AWS

What is not There?What isn’t available

Page 45: PMM for AWS

45

What is not There?

• Anything that is not exposed by CloudWatch• Anything that Aurora removed from regular InnoDB

(like the change buffer, for example)• Anything that is not featured for PostgreSQL, like

QAN

Page 46: PMM for AWS

46

Rate My Session