forked from paulinhoart/bank-tweet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
anotacoes
64 lines (48 loc) · 1.51 KB
/
anotacoes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#docker build -t bank-tweet-teste .
#docker run -p 3100:3100
docker-compose up
docker network create bubble
docker-compose up
docker-compose up -d mongo
#docker run --name mongodb -p 27017:27017 -d mongo:4
#Cliente mongodb
docker run --name mongoclient -p 3010:3010 --link mongodb:mongodb -d mongoclient/mongoclient
prometheus:
container_name: prometheus
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus:/etc/prometheus
grafana:
image: grafana/grafana
ports:
- "3000:3000"
network:
default:
driver: brigde
grafana-dashboards:
image: alpine:3.10
depends_on:
- grafana
volumes:
- ./grafana:/grafana
command: >
/bin/sh -c "
apk add --no-cache curl
echo 'waiting for grafana'
sleep 5s
cd /grafana
curl --request POST http://grafana:3000/api/datasources --header 'Content-Type: application/json' -d @datasources.json
curl --request POST http://grafana:3000/api/dashboards/db --header 'Content-Type: application/json' -d @dashboard.json"
//////////////
//Simula a sleep
var start = new Date()
var simulateTime = 1000
setTimeout(function(argument){
//execution time simulated with seTimeout Function
var end = new Date() - start
histogram.observe(end / 1000); // converte em seconds
}, simulateTime);
////////
Ajustando para DIFF