Skip to content

Commit

Permalink
Mover percona-platform/ to pmm/ and pmm/metrics. Removed QAN agent fr…
Browse files Browse the repository at this point in the history
…om pmm-metrics and copied Roman's dbnode Docker stuff instead. Reassigned all ports for shorter 'docker run -p', using port ranges.
  • Loading branch information
daniel-nichter committed Feb 18, 2016
1 parent f06811e commit 5acf60b
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.swp
Binary file removed percona-platform/client/.start.sh.swp
Binary file not shown.
12 changes: 0 additions & 12 deletions percona-platform/client/start.sh

This file was deleted.

12 changes: 3 additions & 9 deletions percona-platform/client/Dockerfile → pmm-metrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
FROM centos

EXPOSE 9104 9204 9304 9100
EXPOSE 9100 9101 9102 9103

WORKDIR /opt

RUN yum -y install git make python-setuptools
RUN easy_install supervisor

RUN git clone https://github.com/prometheus/node_exporter.git
RUN cd node_exporter && make
RUN git clone https://github.com/prometheus/mysqld_exporter.git
RUN cd mysqld_exporter && make
ADD supervisord.conf /etc/

ADD https://www.percona.com/downloads/TESTING/ppl/open-source/ppl-agent.tar.gz /opt
RUN mkdir qan-agent && tar zxf ppl-agent.tar.gz --strip-components=1 -C qan-agent

COPY supervisord.conf /etc/
COPY start.sh /opt
CMD ["/opt/start.sh"]
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
4 changes: 4 additions & 0 deletions pmm-metrics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MySQL and system metrics for Percona Monitoring and Management (PMM)
====================================================================

See https://hub.docker.com/r/percona/pmm-metrics/.
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ logfile = /var/log/supervisord.log
nodaemon = true

# high res
[program:mysqld_exporter_9104]
command = /opt/mysqld_exporter/mysqld_exporter -web.listen-address=:9104 -collect.global_status=true -collect.global_variables=false -collect.slave_status=false -collect.info_schema.tables=false -collect.binlog_size=false -collect.info_schema.processlist=false -collect.info_schema.userstats=false -collect.info_schema.tables=false -collect.auto_increment.columns=false -collect.info_schema.tablestats=false -collect.perf_schema.file_events=false -collect.perf_schema.eventsstatements=false -collect.perf_schema.indexiowaits=false -collect.perf_schema.tableiowaits=false -collect.perf_schema.tablelocks=false -collect.perf_schema.eventswaits=false
stdout_logfile = /var/log/mysqld_exporter_9104.log
stderr_logfile = /var/log/mysqld_exporter_9104.log
[program:mysqld_exporter_9101]
command = /opt/mysqld_exporter/mysqld_exporter -web.listen-address=:9101 -collect.global_status=true -collect.global_variables=false -collect.slave_status=false -collect.info_schema.tables=false -collect.binlog_size=false -collect.info_schema.processlist=false -collect.info_schema.userstats=false -collect.info_schema.tables=false -collect.auto_increment.columns=false -collect.info_schema.tablestats=false -collect.perf_schema.file_events=false -collect.perf_schema.eventsstatements=false -collect.perf_schema.indexiowaits=false -collect.perf_schema.tableiowaits=false -collect.perf_schema.tablelocks=false -collect.perf_schema.eventswaits=false
stdout_logfile = /var/log/mysqld_exporter_9101.log
stderr_logfile = /var/log/mysqld_exporter_9101.log
autorestart = true

# med res
[program:mysqld_exporter_9204]
command = /opt/mysqld_exporter/mysqld_exporter -web.listen-address=:9204 -collect.global_status=false -collect.global_variables=false -collect.slave_status=true -collect.info_schema.tables=false -collect.binlog_size=false -collect.info_schema.processlist=true -collect.info_schema.userstats=false -collect.info_schema.tables=false -collect.auto_increment.columns=false -collect.info_schema.tablestats=false -collect.perf_schema.file_events=true -collect.perf_schema.eventsstatements=false -collect.perf_schema.indexiowaits=false -collect.perf_schema.tableiowaits=false -collect.perf_schema.tablelocks=false -collect.perf_schema.eventswaits=true
stdout_logfile = /var/log/mysqld_exporter_9204.log
stderr_logfile = /var/log/mysqld_exporter_9204.log
[program:mysqld_exporter_9102]
command = /opt/mysqld_exporter/mysqld_exporter -web.listen-address=:9102 -collect.global_status=false -collect.global_variables=false -collect.slave_status=true -collect.info_schema.tables=false -collect.binlog_size=false -collect.info_schema.processlist=true -collect.info_schema.userstats=false -collect.info_schema.tables=false -collect.auto_increment.columns=false -collect.info_schema.tablestats=false -collect.perf_schema.file_events=true -collect.perf_schema.eventsstatements=false -collect.perf_schema.indexiowaits=false -collect.perf_schema.tableiowaits=false -collect.perf_schema.tablelocks=false -collect.perf_schema.eventswaits=true
stdout_logfile = /var/log/mysqld_exporter_9102.log
stderr_logfile = /var/log/mysqld_exporter_9102.log
autorestart = true

# low res
[program:mysqld_exporter_9304]
command = /opt/mysqld_exporter/mysqld_exporter -web.listen-address=:9304 -collect.global_status=false -collect.global_variables=true -collect.slave_status=false -collect.info_schema.tables=true -collect.binlog_size=false -collect.info_schema.processlist=false -collect.info_schema.userstats=true -collect.info_schema.tables=true -collect.auto_increment.columns=true -collect.info_schema.tablestats=true -collect.perf_schema.file_events=false -collect.perf_schema.eventsstatements=true -collect.perf_schema.indexiowaits=true -collect.perf_schema.tableiowaits=true -collect.perf_schema.tablelocks=false -collect.perf_schema.eventswaits=false
stdout_logfile = /var/log/mysqld_exporter_9304.log
stderr_logfile = /var/log/mysqld_exporter_9304.log
[program:mysqld_exporter_9103]
command = /opt/mysqld_exporter/mysqld_exporter -web.listen-address=:9103 -collect.global_status=false -collect.global_variables=true -collect.slave_status=false -collect.info_schema.tables=true -collect.binlog_size=false -collect.info_schema.processlist=false -collect.info_schema.userstats=true -collect.info_schema.tables=true -collect.auto_increment.columns=true -collect.info_schema.tablestats=true -collect.perf_schema.file_events=false -collect.perf_schema.eventsstatements=true -collect.perf_schema.indexiowaits=true -collect.perf_schema.tableiowaits=true -collect.perf_schema.tablelocks=false -collect.perf_schema.eventswaits=false
stdout_logfile = /var/log/mysqld_exporter_9103.log
stderr_logfile = /var/log/mysqld_exporter_9103.log
autorestart = true

[program:node_exporter]
command = /opt/node_exporter/node_exporter -web.listen-address=:9100 -collectors.enabled=diskstats,filesystem,loadavg,meminfo,netdev,stat,time,uname
stdout_logfile = /var/log/node_exporter.log
stderr_logfile = /var/log/node_exporter.log
autorestart = true

2 changes: 1 addition & 1 deletion percona-platform/server/Dockerfile → pmm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:latest

EXPOSE 3000 8000 9001 9090
EXPOSE 9000 9001 9002 9090

WORKDIR /opt

Expand Down
4 changes: 4 additions & 0 deletions pmm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Percona Monitoring and Management BETA
======================================

See https://hub.docker.com/r/percona/pmm/.
2 changes: 1 addition & 1 deletion percona-platform/server/grafana.ini → pmm/grafana.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
;http_addr =

# The http port to use
;http_port = 3000
http_port = 9000

# The public facing domain name used to access grafana from a browser
;domain = localhost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cd /opt/qan-api
START="no" ./install

cd /opt/qan-app
START="no" ./install
START="no" LISTEN="0.0.0.0:9002" ./install
6 changes: 3 additions & 3 deletions percona-platform/server/prometheus.yml → pmm/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ scrape_configs:
scrape_interval: 1s
scrape_timeout: 1s
target_groups:
- targets: ['NODE_IP:9104']
- targets: ['NODE_IP:9101']
labels:
alias: db1

- job_name: mysql_mr
scrape_interval: 5s
scrape_timeout: 1s
target_groups:
- targets: ['NODE_IP:9204']
- targets: ['NODE_IP:9102']
labels:
alias: db1

- job_name: mysql_lr
scrape_interval: 60s
scrape_timeout: 5s
target_groups:
- targets: ['NODE_IP:9304']
- targets: ['NODE_IP:9103']
labels:
alias: db1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ stderr_logfile = /var/log/grafana.log
autorestart = true

[program:post-grafana]
command = curl http://admin:admin@localhost:3000/api/datasources -X POST -H 'Content-Type: application/json' --data-binary '{"name":"Prometheus","type":"prometheus","url":"http://localhost:9090","access":"proxy","isDefault":true}' ; sed -i 's/step_input:""/step_input:c.target.step/; s/ HH:MM/ HH:mm/; s/,function(c)/,"templateSrv",function(c,g)/; s/expr:c.target.expr/expr:g.replace(c.target.expr,c.panel.scopedVars)/' /usr/share/grafana/public/app/plugins/datasource/prometheus/query_ctrl.js ; sed -i 's/h=a.interval/h=g.replace(a.interval, c.scopedVars)/' /usr/share/grafana/public/app/plugins/datasource/prometheus/datasource.js
command = curl http://admin:admin@localhost:9000/api/datasources -X POST -H 'Content-Type: application/json' --data-binary '{"name":"Prometheus","type":"prometheus","url":"http://localhost:9090","access":"proxy","isDefault":true}' ; sed -i 's/step_input:""/step_input:c.target.step/; s/ HH:MM/ HH:mm/; s/,function(c)/,"templateSrv",function(c,g)/; s/expr:c.target.expr/expr:g.replace(c.target.expr,c.panel.scopedVars)/' /usr/share/grafana/public/app/plugins/datasource/prometheus/query_ctrl.js ; sed -i 's/h=a.interval/h=g.replace(a.interval, c.scopedVars)/' /usr/share/grafana/public/app/plugins/datasource/prometheus/datasource.js
autorestart = false

[program:qan-api]
Expand Down

0 comments on commit 5acf60b

Please sign in to comment.