-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[monitoring] Allow to store IP addresses of interfaces in DeviceData.data #30
Comments
I am working on it 😃 |
@nepython do you already have an openwrt device or VM? Coordinate on the gitter channel with @NoumbissiValere and @PabloCastellano, they already have done similar things. |
No, I don't have an openwrt device currently but I have setup a VM (though I need to configure it correctly).
Sure 😄 |
@nemesisdesign, can you please give few details on how the openwisp-monitoring/openwisp_monitoring/device/models.py Lines 55 to 57 in 4d96d74
I have created a draft PR here. I am still working on it, created it for reference. |
@nepython just loop over the addresses and show them in a table, eg:
The difficult part may be to get the correct |
The device status information (accessible via
DeviceData.data
) stores information about the current status of the device (uptime, memory usage, load averages).When the device has interfaces (eg LAN or WAN) set in DHCP client mode, there's no way to easily know which address the device got from the DHCP server.
This aims to fix that.
Incoming payoad example:
The schema in
openwisp_monitoring.device.schema
will have to be updated to include the addresses schema: http://netjson.org/rfc.html#addresses1The gateway option can be ignored.
If we get a non-wireless interface without any address, we will not store it for now (wireless interfaces are stored anyway, they contain other useful info related to the wireless settings).
Once the data is saved and validated correctly (a few tests will need to ensure bogus addresses will be rejected) we will have to ensure the ip addresses of each interface are shown in the device status tab:
https://github.com/openwisp/openwisp-monitoring/blob/master/openwisp_monitoring/device/templates/admin/config/device/change_form.html#L66-L124
Will require openwisp/openwrt-openwisp-monitoring#1 to be complete.
The text was updated successfully, but these errors were encountered: