Skip to content
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 collecting DHCP lease information in DeviceData.data #33

Closed
nemesifier opened this issue Apr 14, 2020 · 0 comments
Closed

Comments

@nemesifier
Copy link
Member

nemesifier commented Apr 14, 2020

Like #30, but with DHCP lease information.

Incoming DHCP lease data:

{
    'type': 'DeviceMonitoring',
    'dhcp_leases': [
        {
            'expiry': '1586943200',
            'mac_address': 'f2:f1:3e:56:d2:77',
            'ip_address': '192.168.66.196',
            'client_name': 'MyPhone1',
            'client_id': '01:20:f4:78:19:3b:38'
        },
        {
            'expiry': '1586943120',  # integer
            'mac_address': 'f2:f1:3e:56:d2:66',  # mac address
            'ip_address': '192.168.66.197',  # ipv4 or ipv6
            'client_name': '*',  # string
            'client_id': '01:00:00:00:00:00:04'  # string
        }
    }
}

The schema in openwisp_monitoring.device.schema will have to be updated accordingly.

Once the data is saved and validated correctly (a few tests will need to ensure bogus leases will be rejected) we will have to ensure the leases 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

If the dhcp_leases info is not available, do not mention this in the admin UI.

Once this is ready, openwisp/openwrt-openwisp-monitoring#2 will have to be implemented on the device side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants