Datto RMM Audit Data
Overview
Audit data in Datto RMM provides detailed hardware and software inventory for managed devices. The agent periodically collects this information and reports it to the platform. This skill covers accessing audit data, understanding its structure, and common audit workflows.
Key Concepts
Audit Categories
| Category | Description | Examples |
|---|---|---|
| Hardware | Physical components | CPU, RAM, disks, motherboard |
| Software | Installed applications | Programs, versions, publishers |
| Network | Network configuration | Interfaces, IPs, MACs |
| Operating System | OS details | Version, build, architecture |
| ESXi | VMware hypervisor info | VMs, datastores, hosts |
| Printer | Network printers | Name, model, status |
Audit Freshness
Audit data is collected periodically:
- Standard devices: Every 24 hours
- Software changes: Real-time detection
- On-demand: Triggered by agent commands
Field Reference
Hardware Audit
interface HardwareAudit {
// Processor
processor: {
name: string; // "Intel Core i7-10700"
cores: number; // Physical cores
logicalProcessors: number; // Logical processors
speed: number; // Clock speed (MHz)
architecture: string; // "x64", "ARM64"
};
// Memory
memory: {
totalRam: number; // Total RAM (bytes)
availableRam: number; // Available RAM (bytes)
slots: MemorySlot[];
};
// Storage
disks: DiskInfo[];
// Motherboard
motherboard: {
manufacturer: string; // "Dell Inc."
product: string; // "0VNP2H"
serialNumber: string;
};
// BIOS
bios: {
manufacturer: string;
version: string;
releaseDate: string;
};
}
interface MemorySlot {
slot: string; // "DIMM1"
size: number; // Size (bytes)
speed: number; // Speed (MHz)
type: string; // "DDR4"
manufacturer: string;
}
interface DiskInfo {
name: string; // "Disk 0"
model: string; // "Samsung SSD 970 EVO"
serialNumber: string;
size: number; // Total size (bytes)
interface: string; // "NVMe", "SATA"
mediaType: string; // "SSD", "HDD"
partitions: PartitionInfo[];
}
interface PartitionInfo {
name: string; // "C:"
size: number; // Partition size
freeSpace: number; // Free space
fileSystem: string; // "NTFS", "exFAT"
}
Software Audit
interface SoftwareAudit {
applications: Application[];
totalCount: number;
lastScan: number; // Unix milliseconds
}
interface Application {
name: string; // "Microsoft Office Professional Plus 2019"
version: string; // "16.0.14430.20234"
publisher: string; // "Microsoft Corporation"
installDate: string; // "2024-01-15"
installLocation?: string; // "C:\\Program Files\\Microsoft Office"
size?: number; // Installed size (bytes)
uninstallString?: string; // Uninstall command
isUpdate: boolean; // Is Windows Update
architecture: string; // "x64", "x86"
}
Network Audit
interface NetworkAudit {
interfaces: NetworkInterface[];
dnsServers: string[];
defaultGateway: string;
domainName?: string;
workgroup?: string;
}
interface NetworkInterface {
name: string; // "Ethernet"
description: string; // "Intel I219-LM Gigabit"
macAddress: string; // "00:1A:2B:3C:4D:5E"
ipAddresses: IPAddress[];
speed: number; // Link speed (Mbps)
status: string; // "Up", "Down"
type: string; // "Ethernet", "Wi-Fi", "Virtual"
}
interface IPAddress {
address: string; // "192.168.1.100"
subnetMask: string; // "255.255.255.0"
type: string; // "IPv4", "IPv6"
}
ESXi Host Audit
interface ESXiAudit {
version: string; // "7.0.3"
build: string; // "19193900"
hostname: string;
// Hardware
cpuModel: string;
cpuCores: number;
totalMemory: number; // Bytes
// Virtual Machines
vms: VirtualMachine[];
// Datastores
datastores: Datastore[];
// Network
virtualSwitches: VSwitch[];
}
interface VirtualMachine {
name: string;
powerState: string; // "poweredOn", "poweredOff", "suspended"
guestOS: string;
cpuCount: number;
memoryMB: number;
diskSizeGB: number;
vmwareToolsStatus: string;
}
interface Datastore {
name: string;
type: string; // "VMFS", "NFS", "vSAN"
capacity: number; // Bytes
freeSpace: number;
vmCount: number;
}
API Patterns
Get Device Audit
GET /api/v2/device/{deviceUid}/audit
Authorization: Bearer {token}
Response:
{
"deviceUid": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",
"lastAuditDate": 1707991200000,
"hardware": {
"processor": {
"name": "Intel Core i7-10700",
"cores": 8,
"logicalProcessors": 16,
"speed": 2900
},
"memory": {
"totalRam": 34359738368,
"availableRam": 17179869184,
"slots": [...]
},
"disks": [...]
},
"operatingSystem": {
"name": "Windows 11 Pro",
"version": "10.0.22631",
"architecture": "64-bit",
"installDate": "2023-10-15",
"lastBootTime": 1707800000000
},
"network": {
"interfaces": [...],
"dnsServers": ["192.168.1.1", "8.8.8.8"],
"defaultGateway": "192.168.1.1"
}
}
Get Software Inventory
GET /api/v2/device/{deviceUid}/audit/software
Authorization: Bearer {token}
Response:
{
"deviceUid": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",
"lastScan": 1707991200000,
"totalCount": 156,
"applications": [
{
"name": "Google Chrome",
"version": "121.0.6167.140",
"publisher": "Google LLC",
"installDate": "2024-01-20",
"architecture": "x64"
},
{
"name": "Microsoft 365 Apps",
"version": "16.0.17231.20182",
"publisher": "Microsoft Corporation",
"installDate": "2023-12-10",
"architecture": "x64"
}
]
}
Get ESXi Host Audit
GET /api/v2/device/{deviceUid}/audit/esxi
Authorization: Bearer {token}
Get Printer Audit
GET /api/v2/device/{deviceUid}/audit/printers
Authorization: Bearer {token}
Workflows
Software Compliance Check
async function checkSoftwareCompliance(client, deviceUid, requirements) {
const audit = await client.request(`/api/v2/device/${deviceUid}/audit/software`);
const apps = audit.applications || [];
const results = requirements.map(req => {
const found = apps.find(app =>
app.name.toLowerCase().includes(req.name.toLowerCase())
);
if (!found) {
return {
requirement: req.name,
status: 'missing',
compliant: false
};
}
// Check version if specified
if (req.minVersion) {
const versionOk = compareVersions(found.version, req.minVersion) >= 0;
return {
requirement: req.name,
status: versionOk ? 'compliant' : 'outdated',
installedVersion: found.version,
requiredVersion: req.minVersion,
compliant: versionOk
};
}
return {
requirement: req.name,
status: 'installed',
installedVersion: found.version,
compliant: true
};
});
return {
deviceUid,
totalRequirements: requirements.length,
compliant: results.filter(r => r.compliant).length,
nonCompliant: results.filter(r => !r.compliant).length,
results
};
}
function compareVersions(a, b) {
const partsA = a.split('.').map(Number);
const partsB = b.split('.').map(Number);