Upload
rachid-zarouali
View
125
Download
0
Embed Size (px)
Citation preview
IntegratePercona Monitoring and Management
With a Monitoring system
Rachid Zarouali
C.I.OSYNOLIA
1
PERCONA PMMHelps SysAdmin managing DB Server/Clusters Helps Devs optimizing/analyzing queriesWorks perfectly out of the box
2
WHY SHOULD YOUINTEGRATE PMM ?
3
MONITORING INFRASTRUCTURE
GraphiteGrafana
Cabot
4
MYSQL5
6
THE GOOD
integration method
THE BADTHE UGLY
7
PERCONA PMM BUNDLEQAN / Grafana / Prometheus / Orchestrator ( pmm 1.0.5)
used inMonitoring systems
8
MONITORING INFRASTRUCTURE
GraphiteGrafana
Cabot
pmm-server
9
PROS CONS
Duplicated features
Significant overhead
Noisy and untested system
pull metrics (security issue)
Fastest deployment ever
great dashboards
immediate benefits
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
Unified 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 capabilitiesStaying as close as possible to PMM UpstreamRemoving most of duplicate features
18
HOW ?!Remove everything but the specific (i.e: Apache,Php)Inject in Pmm's Grafana :
dashboardsdatasources
19
HOW ?! HOW ?! HOW ?!
FROM percona/pmm-server:latest
MAINTAINER Rachid Zarouali <[email protected]>
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.jsonRUN wget https://raw.githubusercontent.com/xinity/graf-db/master/dashboards/Container_Stats.json
# ############################## ## Add specific scrapping options ## ############################## #
COPY conf/tweak-prom.yml /tmpRUN cat /tmp/tweak-prom.yml >> /opt/prometheus/prometheus.yml
# ######################## ## Activate dashboards.json ## ######################## #
COPY conf/grafana-dashs.yml /tmpRUN cat /tmp/grafana-dashs.yml >> /etc/grafana/grafana.ini
DOCKER INSIDE !
20
HOW ?! HOW ?! HOW ?!
[dashboards.json]enabled = truepath = /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 STEPSwait for / contribute to prometheus
backup/restoreSeperate TSDB from appsother TSDB interfaces
replace collectd by prometheus exporter
maybe !maybe not !
23