Skip to content

Commit ec36746

Browse files
author
Dmitry Voronov
committed
Merge branch 'develop' into feature/ETCM-129-scala-point-13
2 parents 29b6c7b + 7c517df commit ec36746

File tree

14 files changed

+6373
-22
lines changed

14 files changed

+6373
-22
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,15 @@ git commit -m "Update nix-sbt sha"
135135

136136
#### Locally build & run monitoring client
137137

138-
```
139-
# Build monitoring client docker image
140-
projectRoot $ docker build -f ./docker/monitoring-client.Dockerfile -t mantis-monitoring-client ./docker/
141-
# Run monitoring client in http://localhost:9090
142-
projectRoot $ docker run --network=host mantis-monitoring-client
143-
```
138+
Setup a dashboard using Prometheus and Grafana, popular choice of monitoring stack.
139+
Before that you need enable the metrics in the file “metrics.conf”, setting mantis.metrics.enabled=true.
140+
141+
You can start Docker Compose initializing Prometheus and Grafana with a preconfigured dashboard.
142+
For build the monitoring, you need to run the following script: `./docker/monitoring/build.sh`
143+
This script prepares a docker image of mantis. And as a precondition you need to have installed docker-compose and sbt.
144+
145+
We can see the dashboard called "Mantis" at URL: http://localhost:3000 using user and password: admin and admin
146+
144147

145148
### TLS setup
146149

build.sbt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
enablePlugins(JDKPackagerPlugin, JavaAppPackaging, SolidityPlugin)
1+
enablePlugins(JDKPackagerPlugin, JavaAppPackaging, SolidityPlugin, JavaAgent)
2+
3+
javaAgents += "io.kamon" % "kanela-agent" % "1.0.6"
24

35
import scala.sys.process.Process
46
import NativePackagerHelper._
@@ -123,6 +125,7 @@ lazy val node = {
123125
Dependencies.logging,
124126
Dependencies.apacheCommons,
125127
Dependencies.micrometer,
128+
Dependencies.kamon,
126129
Dependencies.prometheus,
127130
Dependencies.cli,
128131
Dependencies.dependencies

docker/monitoring-client.Dockerfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

docker/monitoring/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
HERE=$(dirname $0)
4+
5+
cd $HERE/../../
6+
sbt 'set version := "latest"' docker:publishLocal
7+
8+
docker-compose -f docker/monitoring/docker-compose.yml up -d

docker/monitoring/docker-compose.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
version: '3.1'
2+
3+
volumes:
4+
prometheus_data: {}
5+
grafana_data: {}
6+
7+
networks:
8+
mantis-net:
9+
10+
services:
11+
12+
prometheus:
13+
image: prom/prometheus:v2.23.0
14+
volumes:
15+
- ./prometheus/:/etc/prometheus/
16+
- prometheus_data:/prometheus
17+
command:
18+
- '--config.file=/etc/prometheus/prometheus.yml'
19+
- '--storage.tsdb.path=/prometheus'
20+
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
21+
- '--web.console.templates=/usr/share/prometheus/consoles'
22+
ports:
23+
- 9090:9090
24+
links:
25+
- mantis:mantis
26+
depends_on:
27+
- mantis
28+
networks:
29+
- mantis-net
30+
restart: always
31+
32+
mantis:
33+
image: mantis:latest
34+
ports:
35+
- 8546:8546
36+
- 13798:13798
37+
- 9095:9095
38+
networks:
39+
- mantis-net
40+
restart: always
41+
42+
grafana:
43+
image: grafana/grafana:7.3.6
44+
depends_on:
45+
- prometheus
46+
ports:
47+
- 3000:3000
48+
volumes:
49+
- grafana_data:/var/lib/grafana
50+
- ./grafana/provisioning/:/etc/grafana/provisioning/
51+
networks:
52+
- mantis-net
53+
restart: always
54+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: 1
2+
3+
providers:
4+
- name: 'Prometheus'
5+
orgId: 1
6+
folder: ''
7+
type: file
8+
disableDeletion: false
9+
editable: true
10+
options:
11+
path: /etc/grafana/provisioning/dashboards

0 commit comments

Comments
 (0)