Comments (2)
@nemesisdesign is this the only change needed?
96f55f2
P.S. :- How the interface data looks like for wireguard? It would be easy to have a test case for it then
from openwrt-openwisp-monitoring.
@nemesisdesign is this the only change needed? 96f55f2
Yes. I think we'd be better off preparing a list of values and build the if to check if the proto is any of the values present in the list, so as we add support for more virtual interfaces we can extend this list of values (eg: vxlan, gre, etc).
P.S. :- How the interface data looks like for wireguard? It would be easy to have a test case for it then
Output now produced is:
{
"addresses": [
{
"address": "172.16.0.9",
"family": "ipv4",
"mask": 32,
"proto": "wireguard"
}
],
"mac": "00:00:00:00:00:00",
"mtu": 1280,
"multicast": false,
"name": "wg0",
"txqueuelen": 1000,
"type": "other",
"up": true
}
The output of ubus call network.interface dump
looks as follows:
{
"interface": "wg0",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 81437,
"l3_device": "wg0",
"proto": "wireguard",
"updated": [
"addresses",
"routes"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "172.16.0.9",
"mask": 32
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
{
"target": "172.16.0.1",
"mask": 32,
"nexthop": "0.0.0.0",
"source": "0.0.0.0/0"
}
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
}
from openwrt-openwisp-monitoring.
Related Issues (20)
- [bug] Do not retry sending data if HTTP response is 400 bad request HOT 1
- [bug] None is not of type 'object' HOT 2
- [change] Stop sending data on repeated 404 responses HOT 3
- [feature] Add retry mechanism with randomized backoff for HTTP requests
- [feature] Add bootup_delay option
- [tests] Change JSON string assertions to data structure assertions
- Time display and adjustement HOT 2
- [bug/change] Do not add wireless interface information if channel is not available
- [enhancement] Add `htmode` to wireless interface
- [bug] 'pairs' on unexpected variable value HOT 2
- [change] Move VERSION out of /etc/openwisp/
- [bug] Spanning Tree Status shown incorrectly HOT 2
- [feature] Add more wifi station information HOT 1
- [ci] "Build and upload package" job fails when using github action cache
- [change] Introduce random pause in sending of accumulated data
- [docs] Add package installation instructions
- [bug] Agent crashes when using monitored_interfaces "wlan0 wlan1 br-lan"
- [bug] ULA prefix check is bugged HOT 6
- [feature] Restart/reload agent when openwisp-config is restarted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openwrt-openwisp-monitoring.