Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No data in Cloud Monitoring from user-defined metrics in Cloud Logging

I have created 2 user-defined metrics in the Cloud Logging UI. Those metrics show up in Cloud Monitoring, but their graphs are perpetually showing "no graph data found". Are there any steps to troubleshoot this or are there other requirements to have the data from user-defined log metrics be visible in Cloud Monitoring?

like image 850
MDrollette Avatar asked Mar 18 '16 19:03

MDrollette


People also ask

What is cloud logging and monitoring?

Cloud Logging is a fully managed service that performs at scale and can ingest application and platform log data, as well as custom log data from GKE environments, VMs, and other services inside and outside of Google Cloud.

How do I enable cloud monitoring in GCP?

Enabling the API You can check the status and enable the API if necessary by using either the the Google Cloud console or Google Cloud CLI. Click the Enable APIs and Service button. Search for "Monitoring". In the search results, click through to "Stackdriver Monitoring API".

What kind of logs based metrics can you use in cloud monitoring to create charts and alerting policies?

You can use both system and user-defined log-based metrics in Cloud Monitoring to create charts and alerting policies.

What is log data in cloud computing?

Cloud Logging is a fully managed service that allows you to store, search, analyze, monitor, and alert on logging data and events from Google Cloud and Amazon Web Services. You can collect logging data from over 150 common application components, on-premises systems, and hybrid cloud systems.


1 Answers

Were there matching log entries after you created the metric? The logs-based metrics start counting matching entries only after metric creation time.

If there were matching log entries after metric creation, did you wait a few minutes to see if there was data in your graphs? It takes a few minutes to update the logs-based metrics in Cloud Monitoring, so you may see log entries in Cloud Logging that are not yet counted in Cloud Monitoring.

If you did wait at a few minutes, was there any delay on your log ingestion? For this it would be good to know where the logs were coming from. If a log entry arrives late to Cloud Logging, it will appear in the Logs Viewer but will not be counted in the logs-based metrics. A log entry is considered late if it arrives more than two minutes after the timestamp included in the log entry. The number of late-arriving entries is recorded for each log in the system metric, logging.googleapis.com/dropped_log_entry_count.

Some of these steps are documented here: https://cloud.google.com/logging/docs/view/logs_based_metrics#troubleshooting

like image 62
Summit Raj Avatar answered Sep 22 '22 11:09

Summit Raj