Skip to content

Error when filtering by iface in syscollector experimental call #273

Open
@crd1985

Description

@crd1985

Bug report

OS
Ubuntu18

Wazuh version
3.8.0-rev

Wazuh API version
3.8.0

Python version
2, 3

Install type
manager

Install method
packages

Bug description

Filtering by iface when querying to syscollector fails when pointing to /experimental/syscollector/netaddr endpoint. However, when sending request to /syscollector/000/netaddr it works fine. See the example below:

root@master:/home/vagrant# curl -u foo:bar -k "https://localhost:55000/experimental/syscollector/netaddr?pretty&iface=enp0s3"
{
   "error": 604,
   "message": "Filter error. Allowed filters: [ offset  limit  sort  search  select  proto  address  broadcast  netmask ]  "
}
root@master:/home/vagrant# curl -u foo:bar -k "https://localhost:55000/syscollector/000/netaddr?pretty&iface=enp0s3"
{
   "error": 0,
   "data": {
      "totalItems": 2,
      "items": [
         {
            "scan_id": 1872632128,
            "iface": "enp0s3",
            "proto": "ipv4",
            "broadcast": "10.0.2.255",
            "netmask": "255.255.255.0",
            "address": "10.0.2.15"
         },
         {
            "proto": "ipv6",
            "scan_id": 1872632128,
            "iface": "enp0s3",
            "netmask": "ffff:ffff:ffff:ffff::",
            "address": "fe80::62:7aff:fe79:f6ca"
         }
      ]
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions