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

Add filter for the new field included in the Syscollector netaddr table #260

Merged
merged 1 commit into from
Jan 3, 2019

Conversation

chemamartinez
Copy link
Contributor

@chemamartinez chemamartinez commented Dec 26, 2018

The PR #1928 adds in Wazuh v3.8.0 a new field to the table sys_netaddr. This PR includes the filter for this field.

This is an example from the testing case:

# curl -u foo:bar -X GET "http://localhost:55000/syscollector/000/netaddr?pretty"
{
   "error": 0,
   "data": {
      "totalItems": 5,
      "items": [
         {
            "broadcast": "192.168.1.255",
            "scan_id": 743847639,
            "iface": "ens33",
            "proto": "ipv4",
            "address": "192.168.1.82",
            "netmask": "255.255.255.0"
         },
         {
            "scan_id": 743847639,
            "iface": "ens33",
            "netmask": "ffff:ffff:ffff:ffff::",
            "address": "fe80::20c:29ff:fe44:f40b",
            "proto": "ipv6"
         },
         {
            "broadcast": "172.16.143.255",
            "scan_id": 743847639,
            "iface": "ens38",
            "proto": "ipv4",
            "address": "172.16.143.136",
            "netmask": "255.255.255.0"
         },
         {
            "scan_id": 743847639,
            "iface": "ens38",
            "netmask": "ffff:ffff:ffff:ffff::",
            "address": "fe80::20c:29ff:fe44:f415",
            "proto": "ipv6"
         },
         {
            "broadcast": "172.17.255.255",
            "scan_id": 743847639,
            "iface": "docker0",
            "proto": "ipv4",
            "address": "172.17.0.1",
            "netmask": "255.255.0.0"
         }
      ]
   }
}
# curl -u foo:bar -X GET "http://localhost:55000/syscollector/000/netaddr?iface=ens33"
{
  "error": 0,
  "data": {
    "totalItems": 2,
    "items": [
      {
        "broadcast": "192.168.1.255",
        "scan_id": 743847639,
        "iface": "ens33",
        "proto": "ipv4",
        "address": "192.168.1.82",
        "netmask": "255.255.255.0"
      },
      {
        "scan_id": 743847639,
        "iface": "ens33",
        "netmask": "ffff:ffff:ffff:ffff::",
        "address": "fe80::20c:29ff:fe44:f40b",
        "proto": "ipv6"
      }
    ]
  }
}

Regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants