find_stale_cis
Identifies configuration items (CIs) not updated within a specified number of days, flagging potentially stale or decommissioned assets for review.
Instructions
Find CIs that have not been updated within a specified number of days.
Stale CIs are records whose sys_updated_on timestamp is older than the threshold. Filtering to operational CIs (status=1) by default highlights records that claim to be active but haven't been refreshed — often a sign of broken discovery or decommissioned assets.
Examples: find_stale_cis(ci_class="cmdb_ci_server", days=90, operational_status="1") find_stale_cis(ci_class="cmdb_ci_linux_server", days=30) find_stale_cis(ci_class="cmdb_ci", days=180, operational_status="") # all statuses
Args: ci_class: CMDB table to search (e.g. cmdb_ci_server). Defaults to cmdb_ci. days: Number of days since last update to consider stale (default 90). Must be between 1 and 3650. operational_status: Filter by operational status. Defaults to "1" (Operational). Set to empty string to include all statuses. limit: Maximum stale CIs to return (1-1000, default 25). offset: Pagination offset.
Returns: JSON object with "ci_class", "stale_days", "count", "total_count", "has_more", "next_offset", and "stale_cis" list ordered by sys_updated_on ascending (most stale first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ci_class | No | cmdb_ci | |
| days | No | ||
| operational_status | No | 1 | |
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |