مراقبة قواعد البيانات باستخدام Cloud Monitoring

يصف هذا المستند تسجيلات التدقيق في Cloud Firestore. Google Cloud تنشئ خدمات سجلّات تدقيق تسجِّل الأنشطة الإدارية وأنشطة الوصول ضمن موارد Google Cloud.

لمزيد من المعلومات عن سجلّات تدقيق السحابة الإلكترونية، يُرجى الاطّلاع على ما يلي:

ملاحظات

عند ضبط تسجيلات التدقيق، استخدِم اسم الخدمة datastore.googleapis.com لضبط كل من datastore.googleapis.com وfirestore.googleapis.com. Once configured, logs for the Cloud Firestore API include the service namefirestore.googleapis.com`.

للاطّلاع على الوقت المستغرَق لمعالجة طلب DATA_READ أو DATA_WRITE، راجِع الحقل processing_duration ضِمن عنصر metadata في AuditLog. يصف الحقل processing_duration الوقت الذي استغرقه نظام قاعدة البيانات لمعالجة الطلب. وهو أقل من وقت استجابة المستخدم النهائي. على وجه الخصوص، لا يتضمّن ذلك النفقات العامة للشبكة.

اسم الخدمة

تستخدِم سجلّات تدقيق Cloud Firestore اسم الخدمة firestore.googleapis.com. يمكنك فلترة هذه الخدمة:

protoPayload.serviceName="firestore.googleapis.com"

الطرُق حسب نوع الإذن

يحتوي كل إذن من أذونات إدارة الهوية والوصول (IAM) على سمة type، وقيمتها هي تعداد يمكن أن تكون إحدى القيم الأربع التالية: ADMIN_READ أو ADMIN_WRITE أو DATA_READ أو DATA_WRITE. عند استدعاء طريقة، Cloud Firestore تنشئ سجلّ تدقيق يعتمد تصنيفه على الـ type للإذن المطلوب لتنفيذ الطريقة.

تنشئ الطُرق التي تتطلّب إذنًا من أذونات إدارة الهوية والوصول (IAM) تكون قيمة السمة type DATA_READ أو DATA_WRITE أو ADMIN_READ سجلّات تدقيق الوصول إلى البيانات.

تنشئ الطُرق التي تتطلّب إذنًا من أذونات إدارة الهوية والوصول (IAM) تكون قيمة السمة type ADMIN_WRITE تنشئ النشاط الإداري سجلّات تدقيق.

نوع الأذونات الإجراءات
ADMIN_READ google.cloud.location.Locations.GetLocation
google.cloud.location.Locations.ListLocations
google.firestore.admin.v1.FirestoreAdmin.GetBackup
google.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.GetDatabase
google.firestore.admin.v1.FirestoreAdmin.GetField
google.firestore.admin.v1.FirestoreAdmin.GetIndex
google.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules
google.firestore.admin.v1.FirestoreAdmin.ListBackups
google.firestore.admin.v1.FirestoreAdmin.ListDatabases
google.firestore.admin.v1.FirestoreAdmin.ListFields
google.firestore.admin.v1.FirestoreAdmin.ListIndexes
google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex
google.firestore.admin.v1.MongoDBCompatible.ListIndexes
google.firestore.admin.v1.MongoDBCompatible.ListDatabases
ADMIN_WRITE google.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.CreateDatabase
google.firestore.admin.v1.FirestoreAdmin.CreateIndex
google.firestore.admin.v1.FirestoreAdmin.DeleteBackup
google.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase
google.firestore.admin.v1.FirestoreAdmin.DeleteIndex
google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase
google.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule
google.firestore.admin.v1.FirestoreAdmin.UpdateDatabase
google.firestore.admin.v1.FirestoreAdmin.UpdateField
google.longrunning.Operations.CancelOperation
google.longrunning.Operations.DeleteOperation
DATA_READ google.firestore.v1.MongoDBCompatible.Find
google.firestore.v1.MongoDBCompatible.Aggregate
google.firestore.v1.MongoDBCompatible.GetMore
google.firestore.v1.MongoDBCompatible.ListCollections
google.firestore.v1.MongoDBCompatible.Count
google.firestore.v1.MongoDBCompatible.Distinct
google.firestore.v1.MongoDBCompatible.CommitTransaction
google.firestore.v1.MongoDBCompatible.AbortTransaction
google.firestore.v1.MongoDBCompatible.EndSessions
google.firestore.v1.MongoDBCompatible.KillCursors
DATA_WRITE google.firestore.v1.MongoDBCompatible.Insert
google.firestore.v1.MongoDBCompatible.Update
google.firestore.v1.MongoDBCompatible.Delete
google.firestore.v1.MongoDBCompatible.FindAndModify
google.firestore.v1.MongoDBCompatible.CreateCollection

تحديد الجهات التي تستدعي الطلبات

تتضمّن إدخالات سجلّ التدقيق معلومات عن الهوية التي نفّذت العملية المسجَّلة. لتحديد الجهة التي تستدعي الطلب، راجِع الحقول التالية ضِمن عنصر AuditLog:

  • يتم الاحتفاظ بهوية المتصل في الـ AuthenticationInfo حقل. ويمكن أن يتضمّن ذلك principalEmail الخاص بالمستخدم. يتم أحيانًا إخفاء هذه المعلومات .

  • يتضمّن الحقل callerIp ضِمن العنصر requestMetadata في إدخال AuditLog عنوان IP الخاص بالجهة التي تستدعي الطلب.