no mysql or mongodb no problem! how to extend pmm's ... · santa clara, california | april...

77
Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to Monitor Other DBMSs

Upload: others

Post on 31-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Santa Clara California | April 23th ndash 25th 2018

No MySQL or MongoDB No Problem How to Extend PMMs Functionality to

Monitor Other DBMSs

2

Who are we

Agustiacuten Gallego Percona Support Engineer httpswwwlinkedincominagustiacuten-g

Fernando Ipar Pythian Principal Consultant httpsuylinkedincominfipar

3

Agenda

PMM architecture Adding an external exporter Dashboards Importing dashboards Creating dashboards Extending Functionality

PMM Architecture

5

Introducing Percona Monitoring and Management

Built on top of software like Grafana Prometheus Nginx Consul Docker

Main github repository httpsgithubcomperconapmm

Percona Monitoring and Management (PMM) is a free and open-source platform for managing and monitoring MySQLreg MariaDBreg and MongoDBreg performance

httpswwwperconacomsoftwaredatabase-toolspercona-monitoring-and-management

6

Introducing Percona Monitoring and Management

7

PMM Architecture

httpswwwperconacomdocpercona-monitoring-and-managementarchitecturehtml

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 2: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

2

Who are we

Agustiacuten Gallego Percona Support Engineer httpswwwlinkedincominagustiacuten-g

Fernando Ipar Pythian Principal Consultant httpsuylinkedincominfipar

3

Agenda

PMM architecture Adding an external exporter Dashboards Importing dashboards Creating dashboards Extending Functionality

PMM Architecture

5

Introducing Percona Monitoring and Management

Built on top of software like Grafana Prometheus Nginx Consul Docker

Main github repository httpsgithubcomperconapmm

Percona Monitoring and Management (PMM) is a free and open-source platform for managing and monitoring MySQLreg MariaDBreg and MongoDBreg performance

httpswwwperconacomsoftwaredatabase-toolspercona-monitoring-and-management

6

Introducing Percona Monitoring and Management

7

PMM Architecture

httpswwwperconacomdocpercona-monitoring-and-managementarchitecturehtml

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 3: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

3

Agenda

PMM architecture Adding an external exporter Dashboards Importing dashboards Creating dashboards Extending Functionality

PMM Architecture

5

Introducing Percona Monitoring and Management

Built on top of software like Grafana Prometheus Nginx Consul Docker

Main github repository httpsgithubcomperconapmm

Percona Monitoring and Management (PMM) is a free and open-source platform for managing and monitoring MySQLreg MariaDBreg and MongoDBreg performance

httpswwwperconacomsoftwaredatabase-toolspercona-monitoring-and-management

6

Introducing Percona Monitoring and Management

7

PMM Architecture

httpswwwperconacomdocpercona-monitoring-and-managementarchitecturehtml

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 4: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

PMM Architecture

5

Introducing Percona Monitoring and Management

Built on top of software like Grafana Prometheus Nginx Consul Docker

Main github repository httpsgithubcomperconapmm

Percona Monitoring and Management (PMM) is a free and open-source platform for managing and monitoring MySQLreg MariaDBreg and MongoDBreg performance

httpswwwperconacomsoftwaredatabase-toolspercona-monitoring-and-management

6

Introducing Percona Monitoring and Management

7

PMM Architecture

httpswwwperconacomdocpercona-monitoring-and-managementarchitecturehtml

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 5: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

5

Introducing Percona Monitoring and Management

Built on top of software like Grafana Prometheus Nginx Consul Docker

Main github repository httpsgithubcomperconapmm

Percona Monitoring and Management (PMM) is a free and open-source platform for managing and monitoring MySQLreg MariaDBreg and MongoDBreg performance

httpswwwperconacomsoftwaredatabase-toolspercona-monitoring-and-management

6

Introducing Percona Monitoring and Management

7

PMM Architecture

httpswwwperconacomdocpercona-monitoring-and-managementarchitecturehtml

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 6: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

6

Introducing Percona Monitoring and Management

7

PMM Architecture

httpswwwperconacomdocpercona-monitoring-and-managementarchitecturehtml

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 7: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

7

PMM Architecture

httpswwwperconacomdocpercona-monitoring-and-managementarchitecturehtml

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 8: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

8

PMM Server

Can be run in the following ways Docker container Open Virtual Appliance (OVA) package Amazon Machine Image (AMI) instance

Has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployindexhtmlinstalling-pmm-server

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 9: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

9

PMM Client

Can be installed via the following methods yum apt repos yum apt packages linux generic tarball

Can have many exporters per instance Use explicit names for each to avoid confusions

hostname is used by default Also has some specialized dashboards for monitoring itself

httpswwwperconacomdocpercona-monitoring-and-managementdeployclientindexhtmlinstalling-pmm-client

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 10: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Adding an External Exporter

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 11: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

11

For which exporters will we see examples

PostgreSQL

Cassandra

ClickHouse

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 12: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

12

Are there any other we can choose from

These are just three of them there are plenty more httpsprometheusiodocsinstrumentingexporters

Some examples Consul ElasticSearch Memcached OpenTSDB Redis RethinkDB

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 13: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

13

Before anything else

Have a running PMM server

shellgt git clone httpsgithubcomguriandoropercona_live_18git

shellgt cd percona_live_18

shellgt source pmm-dockersh

shellgt initsh

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 14: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

14

Before anything else

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 15: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

15

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

httpsgithubcomwrouesnelpostgres_exporter

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 16: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

16

PostgreSQL

httpswwwpostgresqlorg

httpsgithubcomguriandoropercona_live_18

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 17: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

17

PostgreSQL

Continuing examples from Slide 13 Before anything else

shellgt create_and_start_postgresql

shellgt create_and_start_postgresql_exporters

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 18: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

18

PostgreSQL

shellgt pmm-admin config --server pmm-server

shellgt pmm-admin add externalmetrics postgresql postgresql-exporter9187

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 19: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

19

PostgreSQL

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 20: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

20

PostgreSQL

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 21: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

21

create_and_start_postgresql_exporters()

docker run -d

--publish 91879187

--name postgresql-exporter

--network pmm-network

--env DATA_SOURCE_NAME=postgresqlpostgrespostgrespostgresql5432sslmode=disable

wrouesnelpostgres_exporterlatest

docker exec -it postgresql usrlocalbinconfigure-pmm-clientsh

PostgreSQL

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 22: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

22

PostgreSQL

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 23: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

23

Exporter is up and running now

Buthellip

PostgreSQL

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 24: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

24

Exporter is up and running now

Buthellip how can we see the data

PostgreSQL

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 25: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

25

Cassandra

httpscassandraapacheorg

httpsgithubcomfipardocker-cassandra-prometheus

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 26: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

26

Cassandra

Continuing examples from Slide 17 PostgreSQL

shellgt create_and_start_cassandra

shellgt create_and_start_cassandra_exporters

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 27: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

27

Cassandra

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 28: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

28

Cassandra

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 29: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

29

Cassandra

create_and_start_cassandra()

for i in 1 2 do

docker run --name cassandra$i

--network pmm-network

-p 127001$i74007400

-e CASSANDRA_CLUSTER_NAME=plmce

-d fiparcassandra-pmmv1

done

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 30: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

30

Cassandra

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 31: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

31

Cassandra

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 32: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

32

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

Docker image httpshubdockercomryandexclickhouse-server Exporter httpsgithubcomf1yegorclickhouse_exporter

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 33: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

33

ClickHouse

httpsclickhouseyandex

httpsgithubcomguriandoropercona_live_18

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 34: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

34

ClickHouse

Continuing examples from Slide 25 Cassandra

shellgt create_and_start_clickhouse

shellgt create_and_start_clickhouse_exporters

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 35: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

35

ClickHouse

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 36: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

36

ClickHouse

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 37: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

37

create_and_start_clickhouse_exporters() docker run -d --publish 91169116 --name clickhouse-exporter --network pmm-network f1yegorclickhouse-exporter -scrape_uri=httpclickhouse8123

docker exec -it clickhouse usrlocalbinconfigure-pmm-clientsh

ClickHouse

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 38: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

38

ClickHouse

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 39: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Dashboards

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 40: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

40

What are dashboards

Where information and metrics are displayed Composed of panels positioned in a grid Highly customizable In PMM dashboards group similar metrics together

OS -gt Disk Performance MySQL -gt InnoDB Metrics MongoDB -gt ReplSet

(it is a convention only but well come back to this point soon) They are stored in JSON format

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 41: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

41

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 42: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

42

What are dashboards

httpspmmdemoperconacomgraphdashboarddbmysql-overview

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 43: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Importing Dashboards

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 44: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

44

Where can we get custom dashboards

Since they are simply json files sharing dashboards is very straightforward

We can get custom dashboards from the official Grafana dashboards page

httpsgrafanacomdashboards github repositories like our own PMM dashboards page

httpsgithubcomperconagrafana-dashboards any other means of sharing the json file(s)

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 45: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

45

How can we import custom dashboards

There are three ways in which we can do this Upload a json file Provide a dashboard ID from official repository Copypaste JSON directly to text box

TODO check a fourth way programmatically via API

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 46: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

46

How can we import custom dashboards

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 47: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

47

How can we import custom dashboards

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 48: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

48

How can we import custom dashboards

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 49: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

49

Checking for Data Sources

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 50: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

50

Checking for Data Sources

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 51: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

51

How can we import custom dashboards

Remember Slide 23 PostgreSQL We had exporter running but how did we see data from it

Lets see an example for PostgreSQL

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 52: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

52

How can we import custom dashboards

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 53: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

53

How can we import custom dashboards

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 54: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

54

How can we import custom dashboards

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 55: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

55

How can we import custom dashboards

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 56: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

56

How can we import custom dashboards

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 57: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

57

How can we import custom dashboards

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 58: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

58

How can we import custom dashboards

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 59: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

59

How can we import custom dashboards

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 60: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

60

How can we import custom dashboards

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 61: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

61

How can we import custom dashboards

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 62: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

62

How can we import custom dashboards

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 63: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

63

How can we import custom dashboards

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 64: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

64

How can we import custom dashboards

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 65: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

65

How can we import custom dashboards

Takeaways PMM uses Prometheus as datasource name Check for variables used

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 66: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Creating Dashboards

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 67: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

67

Creating a dashboard from scratch

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 68: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

68

Creating a dashboard from scratch

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 69: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

69

Creating a dashboard from scratch

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 70: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

70

Cloning an existing dashboard

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 71: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

71

Why were these sections important

Dashboards are what holds everything together PMM is not just about gathering meaningful metrics but also about

displaying them Adding external exporters can break this harmony if the dashboards

used to show metrics dont follow the same principles

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 72: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Extending Functionality Further

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 73: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

73

Extending functionality

We can even extend exporting capabilities further

httpsgithubcomalbertodonatoquery-exporter

In a nutshell this query exporter has the ability to add business logic from our application into the Dashboards

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 74: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

74

query-exporter

Questions

76

Rate Our Session

Thank You

Page 75: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Questions

76

Rate Our Session

Thank You

Page 76: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

76

Rate Our Session

Thank You

Page 77: No MySQL or MongoDB No Problem! How to Extend PMM's ... · Santa Clara, California | April 23th – 25th, 2018 No MySQL or MongoDB? No Problem! How to Extend PMM's Functionality to

Thank You