Ctrl K
ring2all.com

Audit Logs Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Log Fields Reference
  5. Common Scenarios & Examples
  6. Limitations & Important Notes
  7. Troubleshooting Tips
  8. Glossary

---

1. Module Overview (Technical)

What Are Audit Logs?

Audit Logs is a security and compliance module that records all administrative actions performed in the system. It tracks who did what, when, from where, and provides a complete audit trail for regulatory compliance and security monitoring.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                  Audit Logs Architecture                        │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Admin Performs Action                                          │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Any Module (Extensions, Users, Gateways, etc.)    │   │
│  │                                                          │   │
│  │  User clicks [Save] / [Delete] / [Create]                │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ API Call with User Context                              │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Backend Middleware                                │   │
│  │                                                          │   │
│  │  Log entry created:                                      │   │
│  │  ├─ Action: CREATE / UPDATE / DELETE / LOGIN / etc.      │   │
│  │  ├─ Resource: extension / user / gateway / etc.          │   │
│  │  ├─ Resource ID: 123                                     │   │
│  │  ├─ User: admin@example.com                              │   │
│  │  ├─ IP Address: 192.168.1.100                           │   │
│  │  ├─ User Agent: Chrome/120.0                            │   │
│  │  └─ Metadata: JSON (old/new values)                      │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼                                                         │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        public.audit_logs                                 │   │
│  │                                                          │   │
│  │  id | action | resource | user | ip | timestamp | meta   │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Display in Viewer                                       │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Audit Logs Page                                   │   │
│  │                                                          │   │
│  │  [Filters: Date | Action | Resource | User]              │   │
│  │                                                          │   │
│  │  ┌─────────────────────────────────────────────────────┐ │   │
│  │  │Time      │Action │Resource│User    │IP          │...│ │   │
│  │  ├──────────┼───────┼────────┼────────┼────────────┼───┤ │   │
│  │  │10:30:45  │UPDATE │extens  │admin   │192.168.1.10│...│ │   │
│  │  │10:25:12  │CREATE │user    │admin   │192.168.1.10│...│ │   │
│  │  │10:20:00  │DELETE │gateway │admin   │192.168.1.15│...│ │   │
│  │  └─────────────────────────────────────────────────────┘ │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.audit_logsAudit trail records

Key Files

FileDescription
modules/auditLogs/Frontend module
modules/auditLogs/api/auditLogApi.tsAPI calls
modules/auditLogs/types/auditLog.types.tsType definitions
---

2. Module Overview (Commercial/Business)

Business Value

Audit Logs provides complete accountability:

Without Audit LogsWith Audit Logs
Unknown who changedFull accountability
No change historyComplete trail
Compliance gapsRegulatory compliance
Security blind spotsActivity visibility

Use Cases

  1. Security Monitoring
- Track administrator activity

- Identify suspicious actions

  1. Compliance
- SOC 2 requirements

- HIPAA audit trail

- PCI DSS logging

  1. Troubleshooting
- "Who changed this?"

- Configuration change history

  1. Investigation
- Security incident response

- Forensic analysis

Feature Highlights

FeatureBenefit
Action TrackingWhat was done
User IdentificationWho did it
IP LoggingWhere from
TimestampWhen it happened
MetadataWhat changed
Search/FilterFind specific events
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • View all system activity
  • Filter by date range
  • Filter by action type
  • Filter by resource
  • Filter by user
  • Search across logs
  • Export for compliance

Audit Logs Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Audit Logs                                         │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  View and analyze system audit logs and user activity           │
│                                                                 │
│  Filters:                                                       │
│  ├─ Range: [Today ▼] [01/16/2026] to [01/16/2026]              │
│  ├─ Actions: [All Actions ▼] (CREATE, UPDATE, DELETE...)       │
│  ├─ Resource: [                    ]                           │
│  ├─ User: [All Users ▼]                                        │
│  └─ [🔄 Refresh] [Clear Filters]                               │
│                                                                 │
│  🔍 [Search by action, resource, or user...              ]     │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │Timestamp    │Action │Resource  │Res ID│User  │IP Address │  │
│  ├─────────────┼───────┼──────────┼──────┼──────┼───────────┤  │
│  │01/16 10:30  │UPDATE │extension │ 123  │admin │192.168.1.1│  │
│  │01/16 10:28  │CREATE │user      │ 456  │admin │192.168.1.1│  │
│  │01/16 10:25  │DELETE │gateway   │ 789  │super │10.0.0.5   │  │
│  │01/16 10:20  │LOGIN  │session   │  -   │admin │192.168.1.1│  │
│  │01/16 10:15  │UPDATE │queue     │ 101  │admin │192.168.1.1│  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
│  Showing 1-25 of 1,234 records                                  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Quick Ranges: Use Today, 7 Days, 15 Days, 30 Days for fast filtering.
TIP
Multi-Action Filter: Select multiple action types to filter.
NOTE
Metadata: Click row to view full metadata with old/new values.

---

4. Log Fields Reference

Display Columns

ColumnDescription
IDUnique log entry ID
TimestampWhen action occurred
ActionType of action
ResourceWhat was affected
Resource IDSpecific item ID
UserWho performed action
IP AddressSource IP
User AgentBrowser/client info
MetadataAdditional details

Common Actions

ActionDescription
CREATENew record created
UPDATERecord modified
DELETERecord removed
LOGINUser logged in
LOGOUTUser logged out
EXPORTData exported
IMPORTData imported

Common Resources

ResourceDescription
extensionSIP extension
userSystem user
gatewaySIP gateway
queueCall queue
ivrIVR menu
routeInbound/outbound route
domainTenant domain
sessionLogin session
---

5. Common Scenarios & Examples

Scenario 1: Who Changed Extension 1001?

  1. Filter Resource by "extension"
  2. Search for resource ID or number
  3. View action history
  4. Check metadata for changes

Scenario 2: Security Investigation

  1. Filter by specific user
  2. Set date range for incident window
  3. Review all actions
  4. Export for report

Scenario 3: Login Audit

  1. Filter Action by "LOGIN"
  2. Review login times and IPs
  3. Identify unusual patterns
  4. Check for failed logins

Scenario 4: Compliance Report

  1. Set date range for reporting period
  2. Apply relevant filters
  3. Export full log
  4. Submit for audit

---

6. Limitations & Important Notes

Technical Notes

NOTE
Automatic Logging: All admin actions are logged automatically.
NOTE
Read-Only: Audit logs cannot be modified or deleted.
WARNING
Storage: Long retention periods increase storage needs.

Retention

SettingDescription
Default RetentionConfigured per system
Compliance NeedsMay require 1-7 years

Best Practices

  1. Regular Review: Check logs weekly for anomalies
  2. Export Archives: Export and archive regularly
  3. Monitor Logins: Watch for unusual login patterns
  4. Track Deletions: Review all DELETE actions
  5. IP Awareness: Know your admin IPs

---

7. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
No logsToo restrictive filterClear filters
Missing actionNot loggedCheck if action type is logged
Slow loadingLarge date rangeReduce date range
User not foundUser deletedSearch by user ID
No metadataNot capturedSome actions have limited metadata

Diagnostic SQL

Recent audit entries:

Sql
SELECT 
  timestamp,
  action,
  resource,
  resource_id,
  user_email,
  ip_address
FROM public.audit_logs
ORDER BY timestamp DESC
LIMIT 50;

Actions by user:

Sql
SELECT 
  action,
  COUNT(*) as count
FROM public.audit_logs
WHERE user_email = 'admin@example.com'
  AND timestamp >= NOW() - INTERVAL '24 hours'
GROUP BY action
ORDER BY count DESC;

---

8. Glossary

TermDefinition
Audit LogRecord of system activity
ActionType of operation performed
ResourceType of object affected
MetadataAdditional change details
User AgentBrowser/client identification
Audit TrailComplete history of actions
---

Lua Script Status ℹ️

No Lua Handler Required

ComponentStatus
Audit Logsℹ️ Backend-logged - recorded by API middleware
Audit Logs is a frontend reporting module. Logging is performed automatically by the backend middleware when API calls are made. No Lua handlers are used.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?