NetAlertX Module API Explanation
The NetAlertX module monitors device presence status and offline network alerts.
API Execution Logic
The module locates the service matching the identifier netalertx. It checks for the NETALERTX_API_KEY and passes it via the Authorization: Bearer [KEY] header.
Request Execution
Unlike other modules that parse object-key JSON structures, NetAlertX exposes a specialized array-response endpoint. The module queries the /devices/totals API route under the target URL. A 5-second timeout is attached.
Data Parsing
The endpoint returns a flat JSON array containing integer counts. The array indexes are mapped as follows:
- Index 0:
total(Total monitored devices) - Index 1:
connected(Currently active devices) - Index 2:
favorites - Index 3:
newDevices - Index 4:
down(Offline devices) -
Index 5:
archived -
Primary Metric: The total number of monitored devices (Index 0).
- Secondary Metric: The count of currently connected devices (Index 1).
Caching Strategy
The device data is cached in memory for 60 seconds (TTL) with a stale window of 300 seconds.