diff --git a/cloud-init.sh b/cloud-init.sh index b454444..cbdd903 100644 --- a/cloud-init.sh +++ b/cloud-init.sh @@ -21,7 +21,6 @@ chown -R debian-tor:debian-tor /run/tor chmod 700 -R /run/tor mkdir -p /var/www/tor cat << EOF > /etc/tor/torrc -BridgeRelay 1 ControlSocket /run/tor/control ControlSocketsGroupWritable 1 CookieAuthentication 1 diff --git a/docker-compose.yaml b/docker-compose.yaml index e1eb30d..b8623ba 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -32,7 +32,7 @@ services: - -config=/etc/grafana/grafana.ini container_name: monerod_grafana restart: unless-stopped - image: grafana/grafana:${GRAFANA_TAG:-8.5.4} + image: grafana/grafana:${GRAFANA_TAG:-10.1.4} ports: - 127.0.0.1:${GRAF_PORT:-3000}:3000 volumes: @@ -58,13 +58,25 @@ services: container_name: monerod_exporter build: context: dockerfiles - dockerfile: monerod_exporter + dockerfile: exporter restart: unless-stopped # ports: # - 127.0.0.1:9000:9000 command: - --monero-addr=http://monerod:${UNRESTRICTED_PORT:-18083} <<: *log-config + nodemapper: + container_name: monerod_nodemapper + restart: unless-stopped + build: + context: dockerfiles + dockerfile: nodemapper + environment: + NODE_HOST: monerod + NODE_PORT: 18083 + # ports: + # - 127.0.0.1:${MAPPER_PORT:-5000}:5000 + <<: *log-config monerod: container_name: monerod build: diff --git a/dockerfiles/monero b/dockerfiles/monero index 025f514..0568827 100644 --- a/dockerfiles/monero +++ b/dockerfiles/monero @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:22.04 as OG ENV MONERO_HASH 186800de18f67cca8475ce392168aabeb5709a8f8058b0f7919d7c693786d56b ENV MONERO_DL_URL https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.2.2.tar.bz2 @@ -34,7 +34,9 @@ RUN wget -qO ${MONERO_DL_FILE} ${MONERO_DL_URL} \ WORKDIR /data -RUN wget https://gui.xmr.pm/files/block.txt -q +# Copy to fresh Ubuntu image to reduce size +FROM ubuntu:22.04 +COPY --from=OG /usr/local/bin/monerod /usr/local/bin/monerod EXPOSE 18080 EXPOSE 18081 diff --git a/dockerfiles/nodemapper b/dockerfiles/nodemapper new file mode 100644 index 0000000..088b305 --- /dev/null +++ b/dockerfiles/nodemapper @@ -0,0 +1,13 @@ +FROM ubuntu:22.04 as OG + +WORKDIR /srv/nodemapper + +RUN apt update && apt install wget python3 python3-venv -y +RUN python3 -m venv .venv +RUN .venv/bin/pip install flask==3.0.0 +RUN .venv/bin/pip install geoip2==4.7.0 +RUN wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb -qO ./geoip.mmdb + +COPY nodemapper.py app.py + +ENTRYPOINT [ ".venv/bin/flask", "--app", "app", "run", "--host", "0.0.0.0" ] \ No newline at end of file diff --git a/dockerfiles/nodemapper.py b/dockerfiles/nodemapper.py new file mode 100644 index 0000000..eaae82a --- /dev/null +++ b/dockerfiles/nodemapper.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 + +""" +This is a lightweight web service which will retrieve a peer list +from a Monero node, determine GeoIP information, and return +a list of metrics in a Prometheus compatible structure. +Use it to start plotting maps of active node connections. +""" + +import socket, struct +from os import environ as env + +import requests +import geoip2.database +from flask import Flask, make_response + + +app = Flask(__name__) + + +NODE_HOST = env.get('NODE_HOST', 'monerod') +NODE_PORT = env.get('NODE_PORT', 18083) + + +def get_geoip(ip): + """Takes an IP address and determines GeoIP data""" + with geoip2.database.Reader("./geoip.mmdb") as reader: + return reader.city(ip) + + +@app.route("/metrics") +def nodes(): + """Return all nodes""" + peers = list() + peer_list = requests.get(f'http://{NODE_HOST}:{NODE_PORT}/get_peer_list').json() + def add_peer(host, status): + geo = get_geoip(host) + geostr = 'geoip{{latitude="{lat}", longitude="{lon}", country_code="{country_code}", country_name="{country_name}", status="{status}"}} 1' + if geostr not in peers: + peers.append(geostr.format( + lat=geo.location.latitude, + lon=geo.location.longitude, + country_code=geo.continent.code, + country_name=geo.continent.names['en'], + status=status + )) + for peer in peer_list['gray_list']: + if peer.get('host'): + add_peer(peer['host'], 'gray') + for peer in peer_list['white_list']: + if peer.get('host'): + add_peer(peer['host'], 'white') + data = '\n'.join(peers) + response = make_response(data, 200) + response.mimetype = "text/plain" + return response \ No newline at end of file diff --git a/files/grafana/dashboards/node_stats.json b/files/grafana/dashboards/node_stats.json index b35e8c6..cf1be75 100644 --- a/files/grafana/dashboards/node_stats.json +++ b/files/grafana/dashboards/node_stats.json @@ -26,10 +26,244 @@ "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 1, - "iteration": 1663865836167, "links": [], "liveNow": false, "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 22, + "x": 0, + "y": 0 + }, + "id": 85, + "options": { + "basemap": { + "config": {}, + "name": "Layer 0", + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showMeasure": false, + "showScale": false, + "showZoom": true + }, + "layers": [ + { + "config": { + "showLegend": true, + "style": { + "color": { + "fixed": "dark-yellow" + }, + "opacity": 0.4, + "rotation": { + "fixed": 0, + "max": 360, + "min": -360, + "mode": "mod" + }, + "size": { + "fixed": 3, + "max": 15, + "min": 2 + }, + "symbol": { + "fixed": "img/icons/marker/x-mark.svg", + "mode": "fixed" + }, + "textConfig": { + "fontSize": 12, + "offsetX": 0, + "offsetY": 0, + "textAlign": "center", + "textBaseline": "middle" + } + } + }, + "location": { + "mode": "auto" + }, + "name": "Layer 1", + "tooltip": true, + "type": "markers" + } + ], + "tooltip": { + "mode": "details" + }, + "view": { + "allLayers": true, + "id": "zero", + "lat": 0, + "lon": 0, + "zoom": 1 + } + }, + "pluginVersion": "10.1.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "editorMode": "code", + "exemplar": false, + "expr": "geoip{}", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Peer Map", + "type": "geomap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "A" + }, + "properties": [ + { + "id": "displayName", + "value": "Disconnected" + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "displayName", + "value": "Connected" + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 2, + "x": 22, + "y": 0 + }, + "id": 86, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.1.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(geoip{status=\"gray\"})", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(geoip{status=\"white\"})", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + } + ], + "title": "Peer Counts", + "type": "stat" + }, { "datasource": { "type": "prometheus", @@ -78,7 +312,7 @@ "h": 4, "w": 2, "x": 0, - "y": 0 + "y": 11 }, "id": 68, "options": { @@ -96,7 +330,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.5.4", + "pluginVersion": "10.1.4", "targets": [ { "datasource": { @@ -163,7 +397,7 @@ "h": 4, "w": 2, "x": 2, - "y": 0 + "y": 11 }, "id": 69, "options": { @@ -181,7 +415,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.5.4", + "pluginVersion": "10.1.4", "targets": [ { "datasource": { @@ -233,7 +467,7 @@ "h": 4, "w": 3, "x": 4, - "y": 0 + "y": 11 }, "id": 81, "options": { @@ -250,7 +484,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.4", + "pluginVersion": "10.1.4", "targets": [ { "exemplar": true, @@ -299,7 +533,7 @@ "h": 4, "w": 3, "x": 7, - "y": 0 + "y": 11 }, "id": 79, "options": { @@ -316,7 +550,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.4", + "pluginVersion": "10.1.4", "targets": [ { "exemplar": true, @@ -392,7 +626,7 @@ "h": 4, "w": 3, "x": 10, - "y": 0 + "y": 11 }, "id": 80, "options": { @@ -409,7 +643,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.4", + "pluginVersion": "10.1.4", "targets": [ { "datasource": { @@ -492,7 +726,7 @@ "h": 4, "w": 6, "x": 13, - "y": 0 + "y": 11 }, "id": 84, "options": { @@ -509,7 +743,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.4", + "pluginVersion": "10.1.4", "targets": [ { "datasource": { @@ -593,7 +827,7 @@ "h": 4, "w": 5, "x": 19, - "y": 0 + "y": 11 }, "id": 76, "options": { @@ -613,7 +847,7 @@ }, "textMode": "value" }, - "pluginVersion": "8.5.4", + "pluginVersion": "10.1.4", "targets": [ { "datasource": { @@ -658,6 +892,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -670,6 +906,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -738,14 +975,15 @@ "h": 7, "w": 8, "x": 0, - "y": 4 + "y": 15 }, "id": 71, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -803,6 +1041,8 @@ "seriesBy": "last" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -815,6 +1055,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -856,14 +1097,15 @@ "h": 7, "w": 8, "x": 8, - "y": 4 + "y": 15 }, "id": 66, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -898,6 +1140,8 @@ "seriesBy": "last" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -910,6 +1154,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -952,14 +1197,15 @@ "h": 7, "w": 8, "x": 16, - "y": 4 + "y": 15 }, "id": 75, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -998,6 +1244,8 @@ "mode": "continuous-BlPu" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1010,6 +1258,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1048,14 +1297,15 @@ "h": 7, "w": 8, "x": 0, - "y": 11 + "y": 22 }, "id": 49, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -1094,6 +1344,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1106,6 +1358,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1176,14 +1429,15 @@ "h": 7, "w": 8, "x": 8, - "y": 11 + "y": 22 }, "id": 59, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -1236,6 +1490,8 @@ "mode": "thresholds" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1248,6 +1504,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -1326,14 +1583,15 @@ "h": 7, "w": 8, "x": 16, - "y": 11 + "y": 22 }, "id": 74, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -1373,6 +1631,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1385,6 +1645,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1424,14 +1685,15 @@ "h": 7, "w": 8, "x": 0, - "y": 18 + "y": 29 }, "id": 50, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -1470,6 +1732,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1482,6 +1746,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1551,14 +1816,15 @@ "h": 7, "w": 8, "x": 8, - "y": 18 + "y": 29 }, "id": 58, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -1612,6 +1878,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1624,6 +1892,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -1666,14 +1935,15 @@ "h": 7, "w": 8, "x": 16, - "y": 18 + "y": 29 }, "id": 60, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1713,6 +1983,8 @@ "seriesBy": "max" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1725,6 +1997,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1764,14 +2037,15 @@ "h": 8, "w": 12, "x": 0, - "y": 25 + "y": 36 }, "id": 42, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1810,6 +2084,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1822,6 +2098,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -1864,14 +2141,15 @@ "h": 8, "w": 12, "x": 12, - "y": 25 + "y": 36 }, "id": 40, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1911,6 +2189,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -1923,6 +2203,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -1964,14 +2245,15 @@ "h": 7, "w": 8, "x": 0, - "y": 33 + "y": 44 }, "id": 18, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2011,6 +2293,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -2023,6 +2307,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2061,14 +2346,15 @@ "h": 7, "w": 8, "x": 8, - "y": 33 + "y": 44 }, "id": 23, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2108,6 +2394,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", @@ -2120,6 +2408,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2158,14 +2447,15 @@ "h": 7, "w": 8, "x": 16, - "y": 33 + "y": 44 }, "id": 24, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2205,6 +2495,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2216,6 +2508,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2254,14 +2547,15 @@ "h": 7, "w": 8, "x": 0, - "y": 40 + "y": 51 }, "id": 12, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2301,6 +2595,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2312,6 +2608,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2350,14 +2647,15 @@ "h": 7, "w": 8, "x": 8, - "y": 40 + "y": 51 }, "id": 6, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2390,6 +2688,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2401,6 +2701,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2438,14 +2739,15 @@ "h": 7, "w": 8, "x": 16, - "y": 40 + "y": 51 }, "id": 14, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2499,6 +2801,8 @@ "mode": "continuous-YlBl" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2510,6 +2814,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2548,7 +2853,7 @@ "h": 7, "w": 8, "x": 0, - "y": 47 + "y": 58 }, "id": 57, "options": { @@ -2557,7 +2862,8 @@ "lastNotNull" ], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -2596,6 +2902,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2607,6 +2915,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 8, @@ -2645,14 +2954,15 @@ "h": 7, "w": 8, "x": 8, - "y": 47 + "y": 58 }, "id": 32, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -2731,6 +3041,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2742,6 +3054,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -2784,14 +3097,15 @@ "h": 7, "w": 8, "x": 16, - "y": 47 + "y": 58 }, "id": 11, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2831,6 +3145,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2842,6 +3158,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2880,14 +3197,15 @@ "h": 7, "w": 8, "x": 0, - "y": 54 + "y": 65 }, "id": 73, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -2929,6 +3247,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2940,6 +3260,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2978,14 +3299,15 @@ "h": 7, "w": 8, "x": 8, - "y": 54 + "y": 65 }, "id": 51, "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -3024,6 +3346,8 @@ "mode": "continuous-YlBl" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -3035,6 +3359,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -3073,14 +3398,15 @@ "h": 7, "w": 8, "x": 16, - "y": 54 + "y": 65 }, "id": 47, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -3109,7 +3435,7 @@ } ], "refresh": "1m", - "schemaVersion": 36, + "schemaVersion": 38, "style": "dark", "tags": [], "templating": { @@ -3133,6 +3459,6 @@ "timezone": "", "title": "Node Stats", "uid": "K9dtfZG7z", - "version": 25, + "version": 6, "weekStart": "" } \ No newline at end of file diff --git a/files/prometheus/config.yaml b/files/prometheus/config.yaml index 098fca8..b970471 100644 --- a/files/prometheus/config.yaml +++ b/files/prometheus/config.yaml @@ -1,9 +1,11 @@ global: - scrape_interval: 10s - evaluation_interval: 10s - external_labels: - monitor: node-exporter + evaluation_interval: 10m scrape_configs: - job_name: "node-exporter" + scrape_interval: 20s static_configs: - targets: ["exporter:9000"] + - job_name: "nodemapper" + scrape_interval: 2m + static_configs: + - targets: ["nodemapper:5000"]