big refactor, add makefile, update dashboard, use nocompile option

pull/2/head
lza_menace 4 years ago
parent 288ec0722c
commit 1bbc059f00

@ -1,11 +0,0 @@
FROM node:8
WORKDIR /opt/monerod_exporter
RUN git clone https://github.com/ExcitableAardvark/monerod_exporter.git --branch=master --depth=1 .
RUN npm install
EXPOSE 8080
ENTRYPOINT ["node", "index.js"]

@ -0,0 +1,19 @@
.PHONY: format help
# Help system from https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
up: ## Build and run the required containers by fetching binaries
docker-compose -f docker-compose.yaml up -d
build: ## Build the required containers by fetching binaries
docker-compose -f docker-compose.yaml build --no-cache
down: ## Stop the containers
docker-compose -f docker-compose.yaml down
logs: ## Get logs from the containers
docker-compose -f docker-compose.yaml logs -f

@ -5,7 +5,7 @@ volumes:
services: services:
prometheus: prometheus:
image: prom/prometheus:v2.18.0 image: prom/prometheus:v2.18.0
container_name: prometheus container_name: wownero_prometheus
restart: unless-stopped restart: unless-stopped
command: command:
- --config.file=/etc/prometheus/prometheus.yml - --config.file=/etc/prometheus/prometheus.yml
@ -20,7 +20,7 @@ services:
- 127.0.0.1:9090:9090 - 127.0.0.1:9090:9090
grafana: grafana:
image: grafana/grafana:6.5.0 image: grafana/grafana:6.5.0
container_name: grafana container_name: wownero_grafana
restart: unless-stopped restart: unless-stopped
ports: ports:
- 127.0.0.1:3000:3000 - 127.0.0.1:3000:3000
@ -40,9 +40,10 @@ services:
- ./files/grafana/daemon_metrics.json:/var/lib/grafana/dashboards/daemon_metrics.json:ro - ./files/grafana/daemon_metrics.json:/var/lib/grafana/dashboards/daemon_metrics.json:ro
- grafana:/var/lib/grafana - grafana:/var/lib/grafana
exporter: exporter:
container_name: wownero_exporter
build: build:
context: . context: dockerfiles
dockerfile: Dockerfile-exporter dockerfile: wownerod_exporter
restart: unless-stopped restart: unless-stopped
environment: environment:
DAEMON_HOST: http://wownerod:34570 DAEMON_HOST: http://wownerod:34570
@ -50,7 +51,10 @@ services:
ports: ports:
- 127.0.0.1:8080:8080 - 127.0.0.1:8080:8080
wownerod: wownerod:
image: lalanza808/wownero:v0.9.2.0 container_name: wownero_daemon
build:
context: dockerfiles
dockerfile: wownerod_nocompile
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ~/data/daemon:/data - ~/data/daemon:/data

@ -0,0 +1,11 @@
FROM node:8
WORKDIR /opt/wownerod_exporter
RUN git clone https://github.com/lalanza808/monerod_exporter.git --branch=master --depth=1 .
RUN npm install
EXPOSE 8080
ENTRYPOINT ["node", "index.js"]

@ -0,0 +1,40 @@
FROM ubuntu:20.04
ENV WOWNERO_HASH 44d654d8ccff8d98dcecc778873345c42d069dfa12e8d83acc9d787de7920387
ENV WOWNERO_DL_URL https://git.wownero.com/attachments/6b7f2b29-dd0a-47d0-93ae-387f1a4e4adb
ENV WOWNERO_DL_FILE wownero.tar.bz2
ENV WOWNERO_SUMS_FILE sha256sums
WORKDIR /opt/wownero
# Update system and install dependencies
# Download Wownero binaries from Gitea
# Confirm hashes match
# Install daemon binary
# Clean up
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y tar wget
RUN wget -qO ${WOWNERO_DL_FILE} ${WOWNERO_DL_URL} \
&& echo "${WOWNERO_HASH} ${WOWNERO_DL_FILE}" > ${WOWNERO_SUMS_FILE} \
&& sha256sum -c ${WOWNERO_SUMS_FILE}; \
if [ "$?" -eq 0 ]; \
then \
echo -e "[+] Hashes match - proceeding with container build"; \
else \
echo -e "[!] Hashes do not match - exiting"; \
exit 5; \
fi \
&& mkdir ./tmp \
&& tar xjf ${WOWNERO_DL_FILE} -C ./tmp --strip 1 \
&& mv ./tmp/* /usr/local/bin/ \
&& rm -rf ./tmp ${WOWNERO_SUMS_FILE} ${WOWNERO_DL_FILE}
WORKDIR /data
EXPOSE 18080
EXPOSE 18081
EXPOSE 18082
EXPOSE 18083

@ -24,11 +24,11 @@
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": null,
"fill": 1, "fill": 0,
"fillGradient": 5, "fillGradient": 0,
"gridPos": { "gridPos": {
"h": 6, "h": 9,
"w": 24, "w": 18,
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
@ -44,7 +44,7 @@
"values": false "values": false
}, },
"lines": true, "lines": true,
"linewidth": 2, "linewidth": 3,
"nullPointMode": "connected", "nullPointMode": "connected",
"options": { "options": {
"dataLinks": [] "dataLinks": []
@ -55,7 +55,7 @@
"renderer": "flot", "renderer": "flot",
"seriesOverrides": [], "seriesOverrides": [],
"spaceLength": 10, "spaceLength": 10,
"stack": true, "stack": false,
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
@ -67,6 +67,11 @@
"expr": "avg(monerod_connections_outgoing)", "expr": "avg(monerod_connections_outgoing)",
"legendFormat": "Outgoing", "legendFormat": "Outgoing",
"refId": "B" "refId": "B"
},
{
"expr": "avg(monerod_rpc_connections_count)",
"legendFormat": "RPC",
"refId": "C"
} }
], ],
"thresholds": [], "thresholds": [],
@ -117,13 +122,13 @@
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": null,
"fill": 1, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 9,
"w": 12, "w": 6,
"x": 0, "x": 18,
"y": 6 "y": 0
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 8, "id": 8,
@ -136,7 +141,7 @@
"total": false, "total": false,
"values": false "values": false
}, },
"lines": true, "lines": false,
"linewidth": 1, "linewidth": 1,
"nullPointMode": "connected", "nullPointMode": "connected",
"options": { "options": {
@ -144,7 +149,7 @@
}, },
"percentage": false, "percentage": false,
"pointradius": 2, "pointradius": 2,
"points": false, "points": true,
"renderer": "flot", "renderer": "flot",
"seriesOverrides": [ "seriesOverrides": [
{ {
@ -158,7 +163,7 @@
"targets": [ "targets": [
{ {
"expr": "avg(monerod_block_reward)", "expr": "avg(monerod_block_reward)",
"legendFormat": "Block Reward (WOW)", "legendFormat": "Block Reward (XMR)",
"refId": "A" "refId": "A"
} }
], ],
@ -166,7 +171,7 @@
"timeFrom": null, "timeFrom": null,
"timeRegions": [], "timeRegions": [],
"timeShift": null, "timeShift": null,
"title": "Block Reward (WOW)", "title": "Block Reward (XMR)",
"tooltip": { "tooltip": {
"shared": true, "shared": true,
"sort": 0, "sort": 0,
@ -210,13 +215,105 @@
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": null,
"fill": 1, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 9,
"w": 12,
"x": 0,
"y": 9
},
"hiddenSeries": false,
"id": 6,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": true,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "/.*/",
"color": "#8F3BB8"
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": true,
"targets": [
{
"expr": "avg(monerod_tx_mempool)",
"legendFormat": "Pool Transactions",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Mempool Transactions",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 6 "y": 9
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 2, "id": 2,
@ -230,7 +327,7 @@
"values": false "values": false
}, },
"lines": true, "lines": true,
"linewidth": 1, "linewidth": 3,
"nullPointMode": "connected", "nullPointMode": "connected",
"options": { "options": {
"dataLinks": [] "dataLinks": []
@ -301,49 +398,48 @@
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": null,
"fill": 1, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 8,
"w": 24, "w": 20,
"x": 0, "x": 0,
"y": 13 "y": 18
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 6, "id": 12,
"legend": { "legend": {
"avg": false, "avg": false,
"current": false, "current": false,
"max": false, "max": false,
"min": false, "min": false,
"show": false, "show": true,
"total": false, "total": false,
"values": false "values": false
}, },
"lines": false, "lines": true,
"linewidth": 2, "linewidth": 3,
"nullPointMode": "connected", "nullPointMode": "null",
"options": { "options": {
"dataLinks": [] "dataLinks": []
}, },
"percentage": false, "percentage": false,
"pluginVersion": "6.5.0", "pointradius": 2,
"pointradius": 0.5, "points": false,
"points": true,
"renderer": "flot", "renderer": "flot",
"seriesOverrides": [ "seriesOverrides": [
{ {
"alias": "/.*/", "alias": "/.*/",
"color": "#8F3BB8" "color": "#1F60C4"
} }
], ],
"spaceLength": 10, "spaceLength": 10,
"stack": false, "stack": false,
"steppedLine": true, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "avg(monerod_tx_mempool)", "expr": "monerod_database_size",
"legendFormat": "Pool Transactions", "legendFormat": "Chain Size",
"refId": "A" "refId": "A"
} }
], ],
@ -351,7 +447,7 @@
"timeFrom": null, "timeFrom": null,
"timeRegions": [], "timeRegions": [],
"timeShift": null, "timeShift": null,
"title": "Mempool Transactions", "title": "Chain Size",
"tooltip": { "tooltip": {
"shared": true, "shared": true,
"sort": 0, "sort": 0,
@ -367,7 +463,7 @@
}, },
"yaxes": [ "yaxes": [
{ {
"format": "short", "format": "decbytes",
"label": null, "label": null,
"logBase": 1, "logBase": 1,
"max": null, "max": null,
@ -409,10 +505,10 @@
"thresholdMarkers": true "thresholdMarkers": true
}, },
"gridPos": { "gridPos": {
"h": 5, "h": 8,
"w": 8, "w": 4,
"x": 8, "x": 20,
"y": 20 "y": 18
}, },
"id": 10, "id": 10,
"interval": null, "interval": null,
@ -483,7 +579,7 @@
"list": [] "list": []
}, },
"time": { "time": {
"from": "now-7d", "from": "now-2d",
"to": "now" "to": "now"
}, },
"timepicker": { "timepicker": {

Loading…
Cancel
Save