diff --git a/.vscode/launch.json b/.vscode/launch.json index d64a198..5f804c7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,4 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { diff --git a/README.md b/README.md index d6d281a..80c0f1e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ May work on other Keenetic routers # Supported InfluxDB version -InfluxDB 2.x (recomended) and InfluxDB 1.8+ +InfluxDB 2.x (recommended) and InfluxDB 1.8+ # Preparation @@ -72,24 +72,7 @@ skip_auth=true There are two options, you can run collector directly on the router or in Docker on separate host. -## Run on router - -* Copy repository content to your router `/opt/home/keenetic-grafana-monitoring` -* Install Python `opkg install python3 python3-pip` -* Install dependencies ` pip install -r requirements.txt` -* Create script for autorun `/opt/etc/init.d/S99keeneticgrafana` - -```$bash -#!/bin/sh - -[ "$1" != "start" ] && exit 0 - -nohup python /opt/home/keenetic-grafana-monitoring/keentic_influxdb_exporter.py >/dev/null 2>&1 & -``` - -* Run `/opt/etc/init.d/S99keeneticgrafana start` - -## Run on Docker +## Run in Docker on seprate host (recommended) ``` --- @@ -126,6 +109,23 @@ services: - DOCKER_INFLUXDB_INIT_PASSWORD=password ``` +## Run on router + +* Copy repository content to your router `/opt/home/keenetic-grafana-monitoring` +* Install Python `opkg install python3 python3-pip` +* Install dependencies ` pip install -r requirements.txt` +* Create script for autorun `/opt/etc/init.d/S99keeneticgrafana` + +```$bash +#!/bin/sh + +[ "$1" != "start" ] && exit 0 + +nohup python /opt/home/keenetic-grafana-monitoring/keentic_influxdb_exporter.py >/dev/null 2>&1 & +``` + +* Run `/opt/etc/init.d/S99keeneticgrafana start` + # Build Docker image `docker build -t keenetic-grafana-monitoring .` diff --git a/config/config.sample-influx-2.x.ini b/config/config.sample-influx-2.x.ini index 651e6f9..0142926 100644 --- a/config/config.sample-influx-2.x.ini +++ b/config/config.sample-influx-2.x.ini @@ -13,4 +13,4 @@ skip_auth=false login= password= [collector] -interval_sec=30 \ No newline at end of file +interval_sec=30