Back to Basic CMDB

Basic CMDB Automation Examples

Starter automation rules to maintain data quality with minimal configuration. These automations alert before action - notify humans, don't auto-change data. Perfect for small teams just getting started.

📖 20 min read ⚡ Automations v1.0 🆓 Free Tier

Automation Philosophy

  • Alert before action - notify humans, don't auto-change data
  • Weekly cadence - most checks run weekly, not daily
  • Clear messages - tell people exactly what to fix
  • Easy setup - each automation takes 5-10 minutes to configure

Automation 1: Weekly Ownership Check

Ownership Alert

📅 Weekly - Monday 9:00 AM 🎯 High Priority

Alert when production assets don't have an owner assigned.

Query - Servers without owners:

objectType = "Server"
AND Environment = "Production"
AND "Managed By" IS EMPTY
AND Status = "Operational"

Query - Applications without owners:

objectType = "Application"
AND Environment = "Production"
AND "Managed By" IS EMPTY
AND Status = "Operational"

Email Template:

Automation 2: Inactive Owner Detection

Inactive Owner Alert

📅 Weekly - Monday 9:05 AM 🎯 High Priority

Find assets owned by people who are no longer active.

Step 1: Find inactive people

objectType = "Person" AND Active = "Inactive"

Step 2: For each inactive person, find their assets

objectType = "Server" AND "Managed By" = "{{person_key}}"
objectType = "Application" AND "Managed By" = "{{person_key}}"

Email Template:

Automation 3: Orphaned Application Check

Application Without Server

📅 Weekly - Monday 9:10 AM 🎯 Medium Priority

Find applications that aren't linked to any server.

Query:

objectType = "Application"
AND "Runs On" IS EMPTY
AND Status = "Operational"

Why This Matters:

  • Can't be included in impact analysis
  • Won't appear in server dependency views
  • May indicate outdated or unused apps

Automation 4: Stale Server Detection

Stale Server Alert

📅 Monthly - First Monday 9:00 AM 🎯 Medium Priority

Find servers that haven't been updated in 90+ days.

Query:

objectType = "Server"
AND Status = "Operational"
AND updated < now(-90d)

Recommended Actions:

  1. Verify server still exists (ping, console access)
  2. If exists: Update any changed attributes
  3. If decommissioned: Change Status to "Non-Operational"
  4. If unknown: Contact the owner

Automation 5: Person Deactivation Alert

Person Status Change Workflow

⚡ Real-time Trigger 🎯 High Priority

Alert when a person is marked inactive, prompting asset reassignment.

Trigger:

Object updated - Person - Active changed to "Inactive"

Email Template:

Automation 6: Server Status Change Notification

Server Status Change Impact

⚡ Real-time Trigger 🎯 Medium Priority

Notify application owners when their server's status changes.

Trigger:

Object updated - Server - Status changed

Step 1: Find affected applications

objectType = "Application" AND "Runs On" = "{{updated_server_key}}"

Conditional Messages:

New Status Message
Maintenance "Applications may be temporarily unavailable"
Non-Operational "Please migrate applications to a new server"
Operational "Server is now operational"

Automation 7: Weekly Quality Report

Weekly Data Quality Summary

📅 Weekly - Friday 4:00 PM 🎯 Low Priority

Send a weekly summary of CMDB health metrics.

Metrics to Calculate:

-- Total Records
objectType = "Person"        -- Count
objectType = "Server"        -- Count
objectType = "Application"   -- Count

-- Servers with owners
objectType = "Server" AND Environment = "Production" AND "Managed By" IS NOT EMPTY

-- Apps with servers
objectType = "Application" AND "Runs On" IS NOT EMPTY AND Status = "Operational"

Score Calculation:

Score =
  (owned_prod_servers / total_prod_servers * 25) +
  (linked_apps / total_apps * 25) +
  (stale_count == 0 ? 25 : max(0, 25 - stale_count * 2)) +
  (inactive_owners_with_assets == 0 ? 25 : 0)

Automation Schedule Summary

Weekly Automations (Mondays)

Automation Time Priority
Ownership Alert 9:00 AM High
Inactive Owner Detection 9:05 AM High
Orphaned Application Check 9:10 AM Medium

Monthly Automations (First Monday)

Automation Time Priority
Stale Server Detection 9:00 AM Medium

Real-Time Automations

Automation Trigger Priority
Person Deactivation Active → Inactive High
Server Status Change Status changed Medium

Implementation Guide

Step-by-Step: Creating Your First Automation

  1. Navigate to Automation - Go to Project Settings → Automation → Create rule
  2. Set the Trigger - For scheduled: Choose "Scheduled" → Set day/time
  3. Add AQL Query - Add action "AQL search" → Paste the query
  4. Configure Email Action - Add action "Send email" → Set recipients → Paste template
  5. Test and Enable - Use "Run rule" to test → Verify email → Enable the rule

Common AQL Patterns

Pattern Query
Operational production Environment = "Production" AND Status = "Operational"
Missing relationship "Relationship Name" IS EMPTY
Stale records updated < now(-90d)
Specific status Status = "Operational"
Exclude certain Status != "Non-Operational"

Troubleshooting

Issue Cause Solution
No email received Query returns no results Test query in Assets first
Too many emails Query too broad Add filters (Environment, Status)
Wrong recipients Email misconfigured Check recipient field
Automation not running Disabled or schedule wrong Check rule status and trigger