Skip to content

บันทึกการใช้งาน (Audit Logs)

Audit Logs บันทึก "ใครทำอะไร เมื่อไหร่ จากไหน" สำหรับทุกการกระทำสำคัญในระบบ

คืออะไร?

Log แบบ Immutable (แก้ไม่ได้) ที่บันทึก:

  • ใคร (User ID + Name)
  • ทำอะไร (Action)
  • กับอะไร (Entity + ID)
  • เมื่อไหร่ (Timestamp)
  • จากไหน (IP, Device)
  • Before / After (ค่าที่เปลี่ยน)

เมื่อไหร่ใช้?

  1. Audit Compliance — ISO, SOX, GDPR, HIPAA
  2. Investigate fraud / mistakes — สืบว่าเกิดอะไรขึ้น
  3. Customer dispute — ใครแก้ Order ทำไม
  4. Performance review — ดู productivity

วิธีเข้าหน้า Audit Logs

Sidebar (Admin) → Audit Logs

ประเภทเหตุการณ์ที่บันทึก

Categoryตัวอย่าง
AuthLogin, Logout, Failed login, Password reset
User ManagementCreate / Update / Delete user, Role change
PermissionsPermission change, Template applied
Master DataCreate / Edit / Delete Item, Location, Partner
TransactionsCreate / Edit / Cancel ASN/GRN/Order/Wave
InventoryAdjustment, Cycle Count, Movement
ConfigChange setting, Toggle feature
ApprovalsApprove / Reject
APIAPI key created, Webhook fired

ฟิลเตอร์

  • Date Range — ช่วงเวลา
  • User — ทำโดยใคร
  • Category — ประเภท
  • Action — เฉพาะ Action
  • Entity Type — Item / Order / etc.
  • Entity ID — เฉพาะ record นั้น

ดูรายละเอียด

กดแถว → เปิด Side Panel แสดง:

  • Diff View — Before / After (เหมือน git diff)
  • Context — IP, User Agent, Session ID
  • Related Logs — log ที่เกี่ยวข้องในช่วงเดียวกัน

Export Audit Logs

กด Export → CSV / JSON ใช้สำหรับ:

  • ส่งให้ Auditor ภายนอก
  • เก็บ Compliance archive
  • วิเคราะห์ใน BI tool

Retention Policy

  • เก็บ 2 ปีออนไลน์ (ค้นได้เร็ว)
  • เก็บ 7 ปี cold storage (ตามกฎหมายส่วนใหญ่)
  • หลังจากนั้น archive หรือลบตามนโยบาย

ตั้ง Retention ตามความต้องการ

ใน Global Config → Audit → Retention — ตั้งเก็บนานกว่า 7 ปีได้ถ้าธุรกิจต้องการ

Alerts จาก Audit

ตั้ง Alert ใน Admin → Notifications:

  • ใครก็ตามที่ลบ User
  • Failed login มากกว่า 5 ครั้ง / ชั่วโมง
  • Adjustment > 10,000 บาท
  • API key สร้างนอกเวลาทำงาน

เก็บความสมบูรณ์ของ Audit

  • ลบไม่ได้ — แม้แต่ SuperAdmin
  • แก้ไขไม่ได้ — เก็บ hash chain (tamper detection)
  • มี Backup — ทุกวัน

ดู Audit ของ Resource เดียว

ในหน้าใด ๆ ใน Main WMS:

  • เปิด Item / Order / etc.
  • Tab History → กระโดดไป Audit Log ของ resource นี้

หน้าที่เกี่ยวข้อง

เผยแพร่ภายใต้ Digital Outsourcing