forked from jwillmer/DrayTek-WAN-Status
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md.bak
101 lines (88 loc) · 3.07 KB
/
README.md.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# DrayTek-WAN-Status 1.1
The app collects the WAN status message that is send via UDP from a [DrayTek modem](https://www.draytek.com/en//products/products-a-z/router.all/vigor130) to your machine and stores it as CSV file or send it to [InfluxDB](https://www.influxdata.com/).
This fork is based on orginal https://github.com/jwillmer/DrayTek-WAN-Status:
- updated dotnet sources (Docker support)
- fix location of app.config (/app/config)
- fix Ip, etc to be read correctly from app.config
- added Port parameter for router Telnet Port
- added support for (un)corrected blocks and line parameters (SNR Margin, Line Att.)
## Usage Options
- Build the app from source code and use the command line: `dotnet "DrayTek WAN Status.dll"`
- Use the command line with docker:
```
docker create \
--name draytek-log \
-p 514:51400 \
-v </path/to/appdata>:/app/config \
-v <path/to/logfiles>:/app/data \
mrespin/draytekwanstatus:latest
```
- Use a `docker-compose.yml` file:
```
version: "2"
services:
draytek_log:
image: mrespin/draytekwanstatus:latest
container_name: "draytek_log"
volumes:
- </path/to/logfiles>:/app/config
- <path/to/appdata>:/app/data
ports:
- "514:51400/udp"
restart: always
```
## Configuration
On the first start the app will create a configuration file (`app.config`) and terminate. Please modify this fiel and restart the app.
```js
{
// Disables the console output if you run it inside a docker container
"DisableConsoleOutput": false,
// Disables console print of raw data before processing
"OutputRawData": false,
"QueryOptions": {
// Define the query option, available options: UDP, Telnet
"Option": "UDP",
"Udp": {
// The listening UDP port - do not change this if you run the app inside docker, just map your port to this one.
"ListeningPort": 51400,
// IP of your router, to validate that the package is from your router
"Ip": "192.168.0.1",
// Port of your router Telnet
"Port": 23
},
"Telnet": {
// Username of your outer
"User": "username",
// Password of your router
"Password": "password",
// The interval (in sec) to query for a new state
"QueryIntervalSeconds": 30,
// IP of your router
"Ip": "192.168.0.1"
}
},
"StorageProvider": {
// Define where to safe the data, available options: InfluxDb, CSV
"StorageProviderOption": "CSV",
"InfluxDb": {
// The InfluxDB version, available options: Latest, v_1_3, v_1_0_0, v_0_9_6, v_0_9_5, v_0_9_2, v_0_8_x
"Version": "Latest",
// InfluxDB URL
"Url": "http://192.168.0.2:8086",
// InfluxDB username, empty if none
"User": "username",
// InfluxDB password, empty if none
"Password": "password",
// InfluxDB database name
"DatabaseName": "database"
},
"Csv": {
// Delimiter for the CSV file
"Delimiter": ";"
}
}
}
```
## Output
![](https://github.com/mrespin/DrayTek-WAN-Status/raw/master/media/output-consol.png)
![](https://github.com/mrespin/DrayTek-WAN-Status/raw/master/media/output-csv.png)