Skip to content
All recipes

Find devices that haven't checked in for X days

List every device in Iru, compare each one's last check-in to a cutoff and report the ones that are overdue.

Open in Claude Open in ChatGPT
Product
Endpoint Management
Platforms
All platforms
Effect
Read-only
Agent access
Iru MCP or the Iru API

Before you start

  • An Iru API token with MCP turned on and permissions that cover the calls below (recipe 1).

Prompt for your agent

List every device in Iru with GET /api/v1/devices and limit set to 300. Keep requesting pages with the offset parameter until a page comes back empty. Report the devices whose last_check_in is more than [number] days before today, with each device's name, serial number, platform, blueprint name and last_check_in. Sort them with the oldest check-in first. Tell me how many devices you checked in total.

Steps

  1. List every device

    Each request returns at most 300 devices. To get more, use pagination with the limit and offset parameters.

    The documented query parameters don't include a check-in date, so have the agent filter the full list itself.

    GET/api/v1/devices?limit=300

    Source: Iru API: List Devices

  2. Compare each check-in to the cutoff

    Each device in the response example has a last_check_in timestamp, plus device_name, serial_number, platform and blueprint_name. Have the agent keep the devices whose last_check_in is older than your cutoff.

    Source: Iru API: List Devices

  3. Wake a device that went quiet

    The Iru Agent attempts to check in every 15 minutes on macOS and Windows. For a Mac that isn't checking in, ask the user to open Iru Self Service, go to Device Info and select Sync, or run sudo iru run -F in Terminal. Also check the device's network connection.

    Source: Troubleshooting Agent Check Ins

Check it worked

  • The device count in the agent's answer matches the device count you see in the web app.

Common pitfalls

  • A first page of 300 devices isn't the whole fleet. Make sure the agent keeps paging.
  • The device record also holds separate check-in values for MDM and for the Iru Agent. Ask the agent which last_check_in it used.
  • The MDM daily check-in runs every 24 hours, so a cutoff shorter than one day is tighter than that schedule.

FAQ

Which API call lists devices with their last check-in?

GET /api/v1/devices returns each device with a last_check_in timestamp.

How do I get more than 300 devices?

A single request returns at most 300 devices. Use pagination with the limit and offset parameters to get the rest.

How often does the Iru Agent check in?

The Iru Agent checks in every 15 minutes on macOS and Windows. The MDM daily check-in runs every 24 hours.

How do I force a Mac to check in?

Run sudo iru run -F in Terminal, or have the user open Iru Self Service, go to Device Info and select Sync.

Next steps

Sources

Stay up to date

Iru's bi-weekly collection of articles, videos, and research to keep IT & Security teams ahead of the curve.