Skip to content

UNFIMP sets devLastIP to 0.0.0.0 when UniFi controller doesn't report client IP (related to #1207, #1717) #1727

Description

@rhussmann

What installation are you running?

Production (netalertx) 📦

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

The UNFIMP plugin (front/plugins/unifi_import/script.py) writes 0.0.0.0 to CurrentScan.scanLastIP whenever the UniFi controller returns no IP for a client. The orchestrator's IP Changed event query (server/scan/session_events.py) treats 0.0.0.0 as a real value (it's not in NULL_EQUIVALENTS), so a spurious IP Changed event with eveIp = 0.0.0.0 fires for every device the UniFi controller doesn't have IP data for, on every scan cycle.

On my live instance this generated 5,082 IP Changed events with eveIp = 0.0.0.0 for a single device (192.168.11.190) over 65 days — about 80 per day. Across the system, 96% of all IP Changed events had eveIp = 0.0.0.0 (1,277 of 1,508 sampled).

Expected Behavior

Devices without UniFi-tracked IPs should not produce IP Changed events. The CurrentScan row should either be empty or use the documented null sentinel, so the orchestrator skips it cleanly.

Steps To Reproduce

  1. Deploy NetAlertX with a UniFi controller that doesn't report IP for some clients (e.g., Ethernet-attached devices on UniFi AP-managed switches that don't show in the controller's client list).
  2. Configure UNFIMP with valid controller credentials (UNFIMP_HOST, UNFIMP_USERNAME, UNFIMP_PASSWORD, UNFIMP_fullimport = once).
  3. Wait ~20 minutes for a UNFIMP scan cycle.
  4. Open the Events page and filter by IP Changed.
  5. Observe: events with eveIp = 0.0.0.0 for devices that have a real IP recorded elsewhere in the system.

Relevant app.conf settings

docker-compose.yml

Debug or Trace enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.

Relevant app.log section

  PASTE LOG HERE. Using the triple backticks preserves format.

Docker Logs

  PASTE DOCKER LOG HERE. Using the triple backticks preserves format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't workingnext release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions