diff --git a/README.md b/README.md index 4b97079..2d8e169 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ MySQL monitoring example using docker-compose to orchestrate a monitoring soluti * cd to monitor and run: `docker-compose up -d` * To install an example db node with associated collectors, cd to example_dbnode and run: `docker-compose up -d` * To install only the collecters using docker (not required for the example dbnode), cd to collecters and run: `docker-compose up -d` +* Manually create external network (monitor_dbnode) which required by collectors and example_dbnode. Using the following command:`docker network create monitor_dbnode` If you want to monitor other hosts edit the prometheus config file `./prometheus/config/prometheus.yml` add additional targets or your service discovery of choice, and restart prometheus, cd to monitor and run: `docker-compose restart prometheus` diff --git a/example_dbnode/sysbench/Dockerfile b/example_dbnode/sysbench/Dockerfile index 83e5b1a..62f5052 100644 --- a/example_dbnode/sysbench/Dockerfile +++ b/example_dbnode/sysbench/Dockerfile @@ -2,7 +2,7 @@ FROM centos:latest MAINTAINER Ben Mildren RUN yum install -y http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm && \ - yum update && \ + yum -y update && \ sed -i 's/tsflags=nodocs//g' /etc/yum.conf && \ yum install -y sysbench nmap && \ yum clean all && \ diff --git a/monitor/prometheus/config/prometheus.yml b/monitor/prometheus/config/prometheus.yml index 01c34bd..8d0740d 100644 --- a/monitor/prometheus/config/prometheus.yml +++ b/monitor/prometheus/config/prometheus.yml @@ -5,23 +5,23 @@ global: scrape_configs: - job_name: prometheus - target_groups: + static_configs: - targets: ['localhost:9090'] - job_name: linux - target_groups: + static_configs: - targets: ['db1_node_exporter:9100'] labels: alias: db1 - job_name: docker - target_groups: + static_configs: - targets: ['db1_cadvisor:8080'] labels: alias: db1 - job_name: mysql-hres - target_groups: + static_configs: - targets: ['db1_mysqld_exporter_hres:9104'] labels: alias: db1 @@ -29,7 +29,7 @@ scrape_configs: - job_name: mysql-mres scrape_interval: 5s scrape_timeout: 1s - target_groups: + static_configs: - targets: ['db1_mysqld_exporter_mres:9105'] labels: alias: db1 @@ -37,7 +37,7 @@ scrape_configs: - job_name: mysql-lres scrape_interval: 60s scrape_timeout: 5s - target_groups: + static_configs: - targets: ['db1_mysqld_exporter_lres:9106'] labels: alias: db1