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 ARP table information in DeviceData.data #34

Closed
nemesifier opened this issue Apr 14, 2020 · 2 comments · Fixed by #62
Closed

[monitoring] Allow collecting ARP table information in DeviceData.data #34

nemesifier opened this issue Apr 14, 2020 · 2 comments · Fixed by #62

Comments

@nemesifier
Copy link
Member

nemesifier commented Apr 14, 2020

Like #33, but with ARP table information.

Incoming ARP table data:

{
    'type': 'DeviceMonitoring',
    'arp_table': [
        {
            'ip_address': '192.168.66.197',  # ipv4 or ipv6
            'mac_address': 'f2:f1:3e:56:d2:66',  # mac address
            'interface': 'br-lan',  # string
            'type': '0x1',  # string
            'flags': '0x2',  # string
            'mask': '*',  # 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 arp info will be rejected) we will have to ensure the arp table info is shown in the device status tab (type, flags and mask can be ignored for the moment):
https://github.com/openwisp/openwisp-monitoring/blob/master/openwisp_monitoring/device/templates/admin/config/device/change_form.html#L66-L124

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

Will need openwisp/openwrt-openwisp-monitoring#3 to be implemented in order to send the ARP information from the device.

@PabloCastellano
Copy link
Contributor

@nemesisdesign I'm close to finishing ARP table data collection. What kind of tests are appropriate to include? As I understand, JSON-schema validates the data received from the device but the validation is very simple (e.g. it does not check if the string received in the ip_address field is an IP address indeed).

@nemesifier
Copy link
Member Author

@PabloCastellano it should be possible to specify that it should be an ip, don't worry about it now, let's do a few iterations

PabloCastellano added a commit to PabloCastellano/openwisp-monitoring that referenced this issue Apr 30, 2020
PabloCastellano added a commit to PabloCastellano/openwisp-monitoring that referenced this issue Apr 30, 2020
PabloCastellano added a commit to PabloCastellano/openwisp-monitoring that referenced this issue May 3, 2020
PabloCastellano added a commit to PabloCastellano/openwisp-monitoring that referenced this issue May 5, 2020
PabloCastellano added a commit to PabloCastellano/openwisp-monitoring that referenced this issue May 5, 2020
PabloCastellano added a commit to PabloCastellano/openwisp-monitoring that referenced this issue May 6, 2020
OpenWISP Priorities for next releases automation moved this from To do to Done May 8, 2020
nemesifier pushed a commit that referenced this issue May 8, 2020
pandafy pushed a commit to pandafy/openwisp-monitoring that referenced this issue May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants