Browse Source

instalación de estadisticas

Luciano Andrade 8 years ago
parent
commit
91731748fd

+ 10 - 1
docker-compose.yml

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

+ 2 - 0
stats/endpoint/mysql/Dockerfile

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

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

@@ -8,8 +8,8 @@ var app = express();
 var mysql      = require('mysql');
 var connection =  mysql.createConnection({
   host     : 'mysql',
-  user     : 'statsd',
-  password : '2uhyenoi2y0',
+  user     : 'root',
+  password : '235r2342gtfsw',
   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 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 apt-get install -yq wget 

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

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