浏览代码

instalación de estadisticas

Luciano Andrade 8 年之前
父节点
当前提交
91731748fd
共有 5 个文件被更改,包括 17 次插入6 次删除
  1. 10 1
      docker-compose.yml
  2. 2 0
      stats/endpoint/mysql/Dockerfile
  3. 2 2
      stats/endpoint/mysql/index.js
  4. 2 2
      stats/statsd/Dockerfile
  5. 1 1
      stats/statsd/statsd.config.js

+ 10 - 1
docker-compose.yml

@@ -105,15 +105,24 @@ services:
      - jsonendpoint:endpoint
      - jsonendpoint:endpoint
     build:
     build:
       context: ./stats/grafana
       context: ./stats/grafana
+    ports:
+     - 3000:3000
+    environment:
+      GF_SECURITY_ADMIN_PASSWORD: "queRini6"
+      GF_INSTALL_PLUGINS: grafana-simple-json-datasource
+
 
 
   jsonendpoint:
   jsonendpoint:
-    image: fd3_siple_json_endpoint_mysql
+    image: fd3_simple_json_endpoint_mysql
     environment:
     environment:
       MYSQL_ROOT_PASSWORD: 235r2342gtfsw
       MYSQL_ROOT_PASSWORD: 235r2342gtfsw
     links:
     links:
       - mysql:mysql
       - mysql:mysql
+    ports:
+      - 9000:8000
     build: 
     build: 
       context: ./stats/endpoint/mysql
       context: ./stats/endpoint/mysql
+    
 
 
   statsd:
   statsd:
     image: fd3-statsd-mysql-backend
     image: fd3-statsd-mysql-backend

+ 2 - 0
stats/endpoint/mysql/Dockerfile

@@ -6,6 +6,8 @@ RUN npm install -g n
 RUN n stable
 RUN n stable
 
 
 WORKDIR /opt/datasource
 WORKDIR /opt/datasource
+COPY index.js /opt/datasource/index.js
+COPY package.json /opt/datasource/package.json
 
 
 EXPOSE 8000
 EXPOSE 8000
 
 

+ 2 - 2
stats/endpoint/mysql/index.js

@@ -8,8 +8,8 @@ var app = express();
 var mysql      = require('mysql');
 var mysql      = require('mysql');
 var connection =  mysql.createConnection({
 var connection =  mysql.createConnection({
   host     : 'mysql',
   host     : 'mysql',
-  user     : 'statsd',
-  password : '2uhyenoi2y0',
+  user     : 'root',
+  password : '235r2342gtfsw',
   database : 'statsd_db'
   database : 'statsd_db'
 });
 });
 
 

+ 2 - 2
stats/statsd/Dockerfile

@@ -8,8 +8,8 @@ RUN n stable
 
 
 RUN git clone https://github.com/fradinni/nodejs-statsd-mysql-backend.git /opt/nodejs-statsd-mysql-backend
 RUN git clone https://github.com/fradinni/nodejs-statsd-mysql-backend.git /opt/nodejs-statsd-mysql-backend
 
 
-RUN cd /opt/smb ; npm install mysql
-RUN cd /opt/smb ; npm install sequence
+RUN cd /opt/nodejs-statsd-mysql-backend ; npm install mysql
+RUN cd /opt/nodejs-statsd-mysql-backend ; npm install sequence
 
 
 RUN git clone https://github.com/etsy/statsd /opt/statsd
 RUN git clone https://github.com/etsy/statsd /opt/statsd
 RUN apt-get install -yq wget 
 RUN apt-get install -yq wget 

+ 1 - 1
stats/statsd/statsd.config.js

@@ -16,7 +16,7 @@
 	     port: 3306, 
 	     port: 3306, 
 	     user: "root", 
 	     user: "root", 
              password: "235r2342gtfsw", 
              password: "235r2342gtfsw", 
-	     database: "statsd",
+	     database: "statsd_db",
 	     backendPath : "/opt/nodejs-statsd-mysql-backend/", 
 	     backendPath : "/opt/nodejs-statsd-mysql-backend/", 
 	     engines : {
 	     engines : {
 		    counters: ["engines/countersEngine.js"],
 		    counters: ["engines/countersEngine.js"],