Audit Log
ฟีเจอร์ Audit Log ให้ประวัติกิจกรรมของผู้ใช้ทั้งหมดภายใน Consentrix platform แบบครบถ้วน ผู้ดูแลสามารถกรองและ export audit logs เพื่อใช้กับงาน compliance, troubleshooting และ security auditing ได้
Prerequisites
ก่อนเริ่มต้น ตรวจสอบว่าคุณมี:
- Consentrix Account ที่ใช้งานได้
- สิทธิ์
audit_logs:viewสำหรับเข้าถึงและ export audit logs
Required Permissions
| Permission Code | Access |
|---|---|
audit_logs:view | ดูและ export audit logs |
Key Features
| Feature | Description |
|---|---|
| Date Range Filter | กรอง logs ตามวันที่เริ่มต้นและสิ้นสุด |
| Role Filter | กรองตาม role ของผู้ใช้ |
| Action Filter | กรองตาม action type |
| CSV Export | export logs ที่กรองแล้วเป็นไฟล์ CSV |
Navigate to Audit Log
- Log in เข้า Consentrix platform
- ไปที่ Administration > Audit Log
คุณจะเห็นหน้า Audit Log ที่มี filters และปุ่ม Export

Export Audit Logs
Audit logs จะถูก export เป็นไฟล์ CSV คุณสามารถใส่ filters เพื่อลดขอบเขตข้อมูลก่อน export ได้
Step 1: Select Date Range
- Start Date: คลิก date picker แล้วเลือกวันเริ่มต้น
- End Date: คลิก date picker แล้วเลือกวันสิ้นสุด
Note: วันที่จะแสดงใน timezone Asia/Bangkok และ End Date ต้องไม่เกินวันปัจจุบัน
Step 2: Filter by Role (Optional)
- คลิก dropdown Role
- เลือกหนึ่งหรือหลาย roles เพื่อใช้กรอง เช่น
CUSTOMER_SERVICE,ADMIN,READ_ONLY - คลิกนอก dropdown เพื่อยืนยันการเลือก
ข้อความบน trigger label จะแสดงเป็น:
- "All Roles" ถ้ายังไม่เลือก filter
- ชื่อ role ถ้าเลือกไว้หนึ่ง role
- จำนวน roles ที่เลือก เช่น "3 Roles"
Step 3: Filter by Action (Optional)
- คลิก dropdown Action
- เลือกหนึ่งหรือหลาย action types เช่น
CONSENT_TEMPLATE_CREATED,USER_UPDATED,API_KEY_GENERATED - คลิกนอก dropdown เพื่อยืนยันการเลือก
ข้อความบน trigger label จะแสดงเป็น:
- "All Actions" ถ้ายังไม่เลือก filter
- ชื่อ action ถ้าเลือกไว้หนึ่ง action
- จำนวน actions ที่เลือก เช่น "5 Actions"
Step 4: Export CSV
- หลังตั้ง filters ตามต้องการแล้ว คลิก Export CSV
- ระหว่างประมวลผล ปุ่มจะแสดงคำว่า "Exporting..."
- ระบบจะดาวน์โหลดไฟล์ audit log CSV ตาม filters ที่เลือกไว้ลงเครื่องของคุณ
Audit Log CSV Format
ไฟล์ CSV ที่ export จะมี columns ดังนี้:
| Column | Description |
|---|---|
| Timestamp | เวลาที่ action เกิดขึ้นในรูปแบบ ISO 8601 |
| User | ผู้ใช้ที่ทำ action นั้น |
| Role | role ของผู้ใช้ในเวลาที่เกิด action |
| Action | ประเภทของ action ที่เกิดขึ้น |
| Resource | resource ที่ได้รับผลกระทบ |
| Details | รายละเอียดเพิ่มเติมในรูปแบบ JSON |
Common Use Cases
Compliance Auditing
ทำการ export audit logs ทั้งหมดในช่วงวันที่ต้องการ เพื่อส่งต่อให้ compliance auditors
Troubleshooting
กรองตาม action type เพื่อตรวจสอบเหตุการณ์เฉพาะ เช่น กิจกรรมการสร้าง template ทั้งหมด
User Activity Review
กรองตาม role เพื่อตรวจสอบกิจกรรมที่ทำโดยผู้ใช้ที่มีสิทธิ์บางประเภท
Security Investigation
ทำการ export logs หลังเกิด security incident เพื่อดูว่ามี resources ไหนและ actions ใดได้รับผลกระทบบ้าง
Best Practices
- Regular Exports: export audit logs เป็นระยะและจัดเก็บไว้อย่างปลอดภัยสำหรับการเก็บรักษาระยะยาว
- Date Range Limits: ถ้าช่วงวันที่กว้างมาก ให้พิจารณาแยก export เป็นช่วงย่อย เช่น รายเดือน
- Secure Storage: เก็บไฟล์ CSV ที่ export ไว้ในตำแหน่งที่มี access controls เหมาะสม
- Automated Backups: หากเหมาะกับการใช้งานจริง อาจตั้ง process อัตโนมัติสำหรับ export และ archive audit logs เป็นประจำ
Troubleshooting
"Export CSV" button is disabled or not visible
- บัญชีของคุณไม่มีสิทธิ์
audit_logs:viewให้ติดต่อ administrator
No data in exported CSV
- ตรวจสอบว่า filters ที่เลือก ทั้ง date range, role และ action ตรงกับข้อมูลที่คาดหวัง
- ลอง export โดยใช้ "All Roles" และ "All Actions" เพื่อยืนยันว่ามีข้อมูลในระบบจริง
Export takes a long time
- ช่วงวันที่กว้างมากหรือ filters ที่ครอบคลุมมากอาจทำให้ไฟล์ใหญ่ ลองลดช่วงวันที่หรือปรับ filters ให้แคบลง
Related Links
- Audit Log Guide - ติดตามกิจกรรมบน platform
- API Key Management - กิจกรรมเกี่ยวกับ API key จะถูกบันทึกใน audit log
- Role & Permission Guide - กิจกรรมจัดการ role จะถูกบันทึกใน audit log
- User Management - กิจกรรมจัดการ users จะถูกบันทึกใน audit log