Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumen ini menjelaskan model data yang digunakan oleh Cloud Logging.
Model data menentukan format penyimpanan data log Anda. Hal ini juga menentukan dimensi yang dapat Anda gunakan untuk membuat kueri data log.
Model data
Di Cloud Logging, log adalah kumpulan entri individual yang diberi nama.
Anda dapat membuat kueri data berdasarkan nama log. Log terdiri dari
entri yang sesuai dengan struktur LogEntry.
Setiap entri log mencatat status atau menjelaskan peristiwa tertentu, seperti pembuatan instance virtual machine, dan minimal terdiri dari hal berikut:
Stempel waktu yang menunjukkan kapan peristiwa terjadi atau kapan peristiwa tersebut
diterima oleh Cloud Logging.
Informasi tentang sumber entri log. Sumber ini disebut
resource yang dipantau. Contoh resource yang dipantau mencakup setiap instance Compute Engine dan penampung Google Kubernetes Engine.
Untuk mengetahui daftar lengkap jenis resource yang dimonitor, lihat Resource dan layanan yang dimonitor.
Payload yang harus berupa salah satu dari berikut:
textPayload: Payload ini diformat sebagai satu string.
jsonPayload: Payload ini terstruktur, sehingga Anda dapat
mengirim kueri berdasarkan pasangan nilai kunci.
Sebaiknya aplikasi selalu menulis data log terstruktur.
protoPayload: Payload ini mengikuti format file proto dan
kolom diformat sebagai JSON.
Nama log tempat log tersebut berada. Nama log mencakup jalur lengkap resource tempat entri log berada, diikuti dengan ID. Berikut adalah contoh nama log:
Anda dapat menulis kueri yang hanya mengambil entri log dengan nilai kolom LogEntry yang cocok dengan beberapa kriteria. Misalnya, Anda hanya dapat menampilkan
entri log yang kolom severity-nya memiliki nilai ERROR.
Jenis entri log
Log audit dan Transparansi Akses memberikan informasi yang diperlukan untuk memenuhi peraturan kepatuhan.
Log audit memberikan informasi tentang aktivitas dan akses administrative dalam resource Google Cloud Anda.
Log Transparansi Akses mencatat tindakan yang dilakukan staf Google Cloud
saat mengakses konten Google Cloud Anda. Untuk mengetahui daftar layanan
yang didukung, lihat Google Cloud layanan dengan log audit
dan Google Cloud layanan dengan log Transparansi Akses.
Jenis entri log berikut disimpan di bucket log _Required di project, akun penagihan, folder, atau organisasi Google Cloud tempat entri log berasal:
Semua entri log lainnya yang berasal dari Google Cloud project, akun penagihan,
folder, atau organisasi disimpan di
bucket log _Default. Namun, Anda dapat mengubah entri log yang disimpan di bucket log ini.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-05 UTC."],[],[],null,["# Log entry data model\n\nThis document describes the data model used by Cloud Logging.\nThe data model specifies the format in which your log data is stored. It\nalso determines the dimensions over which you can query your log data.\n\nData model\n----------\n\nIn Cloud Logging, a *log* is a named collection of individual entries.\nYou can query your data by the name of the log. Logs are composed\nof entries that conform to the [`LogEntry`](/logging/docs/reference/v2/rest/v2/LogEntry) structure.\n\nEach log entry records status or describes a specific event, such as\nthe creation of a virtual machine instance, and minimally consists of the\nfollowing:\n\n- A timestamp that indicates either when the event took place or when it was received by Cloud Logging.\n- Information about the source of the log entry. This source is called the *monitored resource* . Examples of monitored resources include individual Compute Engine instances and Google Kubernetes Engine containers. For a complete listing of monitored resource types, see [Monitored resources and services](/logging/docs/api/v2/resource-list).\n- A payload which must be one of the following:\n\n - `textPayload`: These payloads are formatted as a single string.\n - `jsonPayload`: These payloads are [structured](/logging/docs/structured-logging), so you can query by key-value pairs. We recommend that applications always write structured log data.\n - `protoPayload`: These payloads follow the format of a proto file and the fields are formatted as JSON.\n- The name of the log to which it belongs. The name of a log includes the full\n path of the resource to which the log entries belong, followed by an\n identifier. The following are examples of log names:\n\n - `projects/my-project/logs/stdout`\n - `projects/my-project/compute.googleapis.com/activity`\n\nYou can write queries that retrieve only those log entries where the value of\na `LogEntry` field matches some criteria. For example, you can display only\nthose log entries whose `severity` field has the value of `ERROR`.\n\nLog entry types\n---------------\n\n[Audit logs](/logging/docs/audit) and [Access Transparency](/assured-workloads/access-transparency/docs/overview) provide\ninformation necessary to satisfy compliance regulations.\nAudit logs provide information about administrative activities\nand accesses within your Google Cloud resources.\nAccess Transparency logs record actions taken by Google Cloud\nstaff when accessing your Google Cloud content. For a list of supported\nservices, see [Google Cloud services with audit logs](/logging/docs/audit/services)\nand [Google Cloud services with Access Transparency logs](/assured-workloads/access-transparency/docs/supported-services).\n\nThe following type of log entries are stored in the\n[`_Required` log bucket](/logging/docs/store-log-entries#required-bucket) in the Google Cloud project,\nbilling account, folder, or organization in which they originate:\n\n- [Admin Activity audit logs](/logging/docs/audit#admin-activity)\n- [System Event audit logs](/logging/docs/audit#system-event)\n- Google Workspace Admin Audit logs\n- Enterprise Groups Audit logs\n- Login Audit logs\n\n\u003c!-- --\u003e\n\n- Access Transparency logs\n\nAll other log entries that originate in a Google Cloud project, billing account,\nfolder, or organization are stored in the\n[`_Default` log bucket](/logging/docs/store-log-entries#default-bucket). However, you can change which\nlog entries are stored in this log bucket.\n\nWhat's next\n-----------\n\n- [Store log data](/logging/docs/store-log-entries).\n- [Route log data](/logging/docs/routing/overview).\n- [Query and view logs overview](/logging/docs/log-analytics)."]]