Dockerize and type mapping

This commit is contained in:
Vitaliy Skrypnyk
2020-07-29 19:52:40 +03:00
committed by Vitaliy Skrypnyk
parent 74109908c4
commit 2c4788e8a3
10 changed files with 126 additions and 35 deletions

View File

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

139
config/metrics.json Normal file
View File

@@ -0,0 +1,139 @@
{
"endpoint" : "http://192.168.1.1:79/rci",
"interval_sec" : 30,
"metrics" : [
{
"command": "processes",
"root" : "$.process.*",
"tags" : {
"name": "~",
"process_name" : "$.name",
"pid": "$.pid"
},
"values" : {
"cpu": "$.statistics.cpu.cur",
"memory": "$.vm-size"
}
},
{
"command": "ip hotspot",
"root" : "$.host[*]",
"tags" : {
"hostname" : "$.hostname",
"name" : "$.name",
"ssid": "$.ssid",
"mode": "$.mode",
"ip": "$.ip",
"mac": "$.mac",
"active": "$.active"
},
"values" : {
"rxbytes": "$.rxbytes",
"txbytes": "$.txbytes",
"txrate": "$.txrate",
"uptime": "$.uptime",
"signal": "$.rssi",
"speed": "$.speed"
}
},
{
"command": "interface",
"root" : "$.*",
"tags" : {
"id": "$.id",
"type": "$.type",
"description": "$.description",
"interface-name": "$.interface-name",
"address": "$.address"
},
"values" : {
"mtu": "$.mtu",
"uptime": "$.uptime",
"tx-queue": "$.tx-queue",
"state": "$.state"
}
},
{
"command": "ip nat",
"root" : "$.[*]",
"tags" : {
"src" : "$.src",
"dst" : "$.dst"
},
"values" : {
"bytes-in": "$.bytes",
"bytes-out": "$.bytes-out"
}
},
{
"command": "system",
"root" : "$",
"tags" : {
"hostname" : "$.hostname"
},
"values" : {
"cpuload": "$.cpuload",
"memtotal": "$.memtotal",
"memfree": "$.memfree",
"memcache": "$.memcache",
"swaptotal": "$.swaptotal",
"swapfree": "$.swapfree",
"uptime": "$.uptime",
"membuffers": "$.membuffers"
}
},
{
"command": "internet status",
"root" : "$",
"tags" : {},
"values" : {
"internet": "$.internet",
"gateway-accessible": "$.gateway-accessible",
"dns-accessible": "$.dns-accessible",
"host-accessible": "$.host-accessible",
"captive-accessible": "$.captive-accessible"
}
},
{
"command": "media",
"root" : "$.*.partition.[*]",
"tags" : {
"label" : "$.label",
"uuid" : "$.uuid"
},
"values" : {
"total": "$.total",
"free": "$.free",
"state" : "$.state"
}
},
{
"command": "interface stat",
"root" : "$",
"param" : {
"name" : "GigabitEthernet1"
},
"tags" : {},
"values" : {
"rxbytes": "$.rxbytes",
"txbytes": "$.txbytes",
"rxspeed": "$.rxspeed",
"txspeed": "$.txspeed"
}
},
{
"command": "interface stat",
"root" : "$",
"param" : {
"name" : "PPTP0"
},
"tags" : {},
"values" : {
"rxbytes": "$.rxbytes",
"txbytes": "$.txbytes",
"rxspeed": "$.rxspeed",
"txspeed": "$.txspeed"
}
}
]
}