Using admin api, instead open port (#1)

* influxdb2 integration
* using python alpine base image
* add authorization, refactoring config
* logging instead print, keenetic api exception handling when try to collect metrics, a little pep8
This commit is contained in:
Sergei Samokhvalov
2021-03-24 13:44:34 +03:00
committed by GitHub
parent 7661b5819d
commit 16a37bf0d9
12 changed files with 196 additions and 97 deletions

13
config/config.ini.sample Normal file
View File

@@ -0,0 +1,13 @@
[influxdb]
host=<HOST>
port=80
username=admin
password=<INFLUX_PASS>
db=keenetic
[keenetic]
admin_endpoint=http://192.168.1.1:80
skip_auth=false
login=admin
password=<KEENETIC_PASS>
[collector]
interval_sec=30

View File

@@ -1,9 +0,0 @@
{
"influxdb": {
"host": "<HOST>",
"port": 80,
"username": "admin",
"password": "<PASS>",
"db": "keenetic"
}
}

View File

@@ -1,6 +1,4 @@
{
"endpoint" : "http://192.168.1.1:79/rci",
"interval_sec" : 30,
"metrics" : [
{
"command": "processes",