Configuring responses in Cloud Logging and Yandex Cloud Functions
Monitoring specific log group metrics helps you spot potential issues early and prevent data loss.
Each log group includes predefined monitoring charts with the following information:
-
Records: Group of charts showing record processing:
- Records successfully ingested: Number of successfully ingested records.
- Records saved: Number of saved records.
- Records read: Number of read records.
- Records ingest errors: Number of record ingestion errors.
- Records save lag: Delay between ingesting and saving records.
- Records read errors: Number of record read errors.
-
Requests: Group of charts for data ingestion requests:
- Ingest requests: Number of data ingestion requests.
- Ingest requests errors: Number of data ingestion request errors.
- Ingest requests duration: Average duration of data ingestion requests.
To monitor log group metrics along with other relevant indicators, e.g., Audit Trails events, display all of them on a single Monitoring dashboard.
Add a chart for the group.service.ingested_records_per_second metric to the dashboard to display the actual rate of log ingestion into the log group. Comparing this value with the Maximum write speed quota helps determine whether the log stream is hitting its limit. Additional group.service.ingest_requests_per_second chart filtered by ERROR status enables detecting write errors promptly.
-
In the management console
, select Monitoring. -
Navigate to the Dashboards tab.
-
Next to the dashboard name, click
and select Edit. -
In the bottom section, click Graph.
-
Create a query to monitor storage usage:
- In the query editor, click
. - In the list of services (service=), select
Cloud Logging. - In the name= metric list, select
group.service.ingested_records_per_second. - In the label list, select the log group (group=).
- In the query editor, click
-
Click Add query and follow the same steps to create a query to display the maximum bucket size: in the name= metric list, select
group.ingest_requests_per_second, and in status=,ERROR. -
Click Execute query to check the chart display.
-
Name the chart and add a threshold:
- In the chart area, click
Settings. - In the panel that opens, expand General.
- In the Title field, specify a chart name, e.g.,
Bucket Used Space. - Expand Thresholds.
- Click Add threshold.
- Specify
Maximum write speed quotafor the threshold name and select a color. - Close the chart settings panel.
- In the chart area, click
-
Click Save at the top right.