際際滷

際際滷Share a Scribd company logo
Integrate
Percona Monitoring and Management
With a Monitoring system
Rachid Zarouali
C.I.O
SYNOLIA
1
PERCONA PMM
Helps SysAdmin managing DB Server/Clusters
Helps Devs optimizing/analyzing queries
Works perfectly out of the box
2
WHY SHOULD YOU
INTEGRATE PMM ?
3
MONITORING INFRASTRUCTURE
Graphite
Grafana
Cabot
4
MYSQL
5
6
THE GOOD
integration method
THE BAD
THE UGLY
7
PERCONA PMM BUNDLE
QAN / Grafana / Prometheus / Orchestrator ( pmm 1.0.5)
used in
Monitoring systems
8
MONITORING INFRASTRUCTURE
Graphite
Grafana
Cabot
pmm-server
9
PROS CONS
Duplicated features
Signi鍖cant overhead
Noisy and untested system
pull metrics (security issue)
Fastest deployment ever
great dashboards
immediate bene鍖ts
percona supported since GA
UGLY: WHY
10
BETTER SOLUTION ?
Perhaps ......
11
MONITORING INFRASTRUCTURE
Graphite
Cabot
Grafana
12
PROS CONS
Cut from the upstream
Rewrite all dashboards
How about QAN ?
Lowest overhead
No more duplicated system
Uni鍖ed and simple platform
BAD: WHY
13
BETTER SOLUTION ?
Still not the best :(
Again YES !
14
MONITORING INFRASTRUCTURE
Graphite
Cabot
pmm-server
15
Production server overhead
"locked-in" in prometheus world
New system to use/manage
Pull mecanism for metrics
no docker container for pmm-client
BUT NOT THE BEST: WHY
16
ONE MORE THING!
DON'T PUT PMM IN PRODUCTION
UNLESS YOU KNOW WHAT YOU'RE DOING
BUT .....
I'LL SHOW YOU HOW ANYWAY :)
17
HOW TO ANYWAY ?!
Extending Monitoring capabilities
Staying as close as possible to PMM Upstream
Removing most of duplicate features
18
HOW ?!
Remove everything but the speci鍖c (i.e: Apache,Php)
Inject in Pmm's Grafana :
dashboards
datasources
19
HOW ?! HOW ?! HOW ?!
FROM percona/pmm-server:latest
MAINTAINER Rachid Zarouali <rzarouali@gmail.com>
RUN apt-get install wget -qqy
# ############################# #
# Add several custom dashboards #
# ############################# #
WORKDIR /var/lib/grafana/dashboards
RUN wget https://raw.githubusercontent.com/infinityworksltd/graf-db/master/dashboards/Rancher_Stats.json
RUN wget https://raw.githubusercontent.com/xinity/graf-db/master/dashboards/Container_Stats.json
# ############################## #
# Add specific scrapping options #
# ############################## #
COPY conf/tweak-prom.yml /tmp
RUN cat /tmp/tweak-prom.yml >> /opt/prometheus/prometheus.yml
# ######################## #
# Activate dashboards.json #
# ######################## #
COPY conf/grafana-dashs.yml /tmp
RUN cat /tmp/grafana-dashs.yml >> /etc/grafana/grafana.ini
DOCKER INSIDE !
20
HOW ?! HOW ?! HOW ?!
[dashboards.json]
enabled = true
path = /var/lib/grafana/dashboards
GRAFANA-DASHS.YML
TWEAK-PROM.YML
- job_name: 'HostsMetrics'
dns_sd_configs:
- names:
- node-exporter
refresh_interval: 15s
type: A
port: 9100
- job_name: 'ContainerMetrics'
dns_sd_configs:
- names:
- ranch-eye
refresh_interval: 15s
type: A
port: 9104
- job_name: 'rancher-api'
dns_sd_configs:
- names:
- 'prometheus-rancher-exporter'
refresh_interval: 15s
type: A
port: 9010
21
NEXT STEPS ?
22
NEXT STEPS
wait for / contribute to prometheus
backup/restore
Seperate TSDB from apps
other TSDB interfaces
replace collectd by prometheus exporter
maybe !
maybe not !
23

More Related Content

Percona: Integrate PMM within an existing monitoring platform

  • 1. Integrate Percona Monitoring and Management With a Monitoring system Rachid Zarouali C.I.O SYNOLIA 1
  • 2. PERCONA PMM Helps SysAdmin managing DB Server/Clusters Helps Devs optimizing/analyzing queries Works perfectly out of the box 2
  • 6. 6
  • 8. PERCONA PMM BUNDLE QAN / Grafana / Prometheus / Orchestrator ( pmm 1.0.5) used in Monitoring systems 8
  • 10. PROS CONS Duplicated features Signi鍖cant overhead Noisy and untested system pull metrics (security issue) Fastest deployment ever great dashboards immediate bene鍖ts percona supported since GA UGLY: WHY 10
  • 13. PROS CONS Cut from the upstream Rewrite all dashboards How about QAN ? Lowest overhead No more duplicated system Uni鍖ed and simple platform BAD: WHY 13
  • 14. BETTER SOLUTION ? Still not the best :( Again YES ! 14
  • 16. Production server overhead "locked-in" in prometheus world New system to use/manage Pull mecanism for metrics no docker container for pmm-client BUT NOT THE BEST: WHY 16
  • 17. ONE MORE THING! DON'T PUT PMM IN PRODUCTION UNLESS YOU KNOW WHAT YOU'RE DOING BUT ..... I'LL SHOW YOU HOW ANYWAY :) 17
  • 18. HOW TO ANYWAY ?! Extending Monitoring capabilities Staying as close as possible to PMM Upstream Removing most of duplicate features 18
  • 19. HOW ?! Remove everything but the speci鍖c (i.e: Apache,Php) Inject in Pmm's Grafana : dashboards datasources 19
  • 20. HOW ?! HOW ?! HOW ?! FROM percona/pmm-server:latest MAINTAINER Rachid Zarouali <rzarouali@gmail.com> RUN apt-get install wget -qqy # ############################# # # Add several custom dashboards # # ############################# # WORKDIR /var/lib/grafana/dashboards RUN wget https://raw.githubusercontent.com/infinityworksltd/graf-db/master/dashboards/Rancher_Stats.json RUN wget https://raw.githubusercontent.com/xinity/graf-db/master/dashboards/Container_Stats.json # ############################## # # Add specific scrapping options # # ############################## # COPY conf/tweak-prom.yml /tmp RUN cat /tmp/tweak-prom.yml >> /opt/prometheus/prometheus.yml # ######################## # # Activate dashboards.json # # ######################## # COPY conf/grafana-dashs.yml /tmp RUN cat /tmp/grafana-dashs.yml >> /etc/grafana/grafana.ini DOCKER INSIDE ! 20
  • 21. HOW ?! HOW ?! HOW ?! [dashboards.json] enabled = true path = /var/lib/grafana/dashboards GRAFANA-DASHS.YML TWEAK-PROM.YML - job_name: 'HostsMetrics' dns_sd_configs: - names: - node-exporter refresh_interval: 15s type: A port: 9100 - job_name: 'ContainerMetrics' dns_sd_configs: - names: - ranch-eye refresh_interval: 15s type: A port: 9104 - job_name: 'rancher-api' dns_sd_configs: - names: - 'prometheus-rancher-exporter' refresh_interval: 15s type: A port: 9010 21
  • 23. NEXT STEPS wait for / contribute to prometheus backup/restore Seperate TSDB from apps other TSDB interfaces replace collectd by prometheus exporter maybe ! maybe not ! 23