2

I have some logs in Cloud Logging. I did not create metrics before the logs came in, so I do not have any metrics containing this data. I'd like to visualize this data in a chart. Is this possible?

I see from this answer (Can't display data with with log-based metric) and the docs:

The data for logs-based metrics comes from log entries received after the metrics are created. The metrics are not populated with data from log entries that are already in Logging.

that Metrics only contain log entries from after the Metric was created. Therefore, it seems impossible to chart historical data using a Metric that was created after the data.

The only ways I've found to create a chart are using Metrics Explorer and the Monitoring dashboard. Both of these ultimately require a Metric with the data, which I am not able to create. Are there any other ways to chart data that don't require a Metric? If not, does this mean it's impossible to chart historical data with Cloud Logging/Monitoring?

offlinemark
  • 181
  • 1
  • 9
  • `Both of these ultimately require a Metric with the data, which I am not able to create.` - why not? Monitoring + Metrics sounds like the proper solution for your use case. – yedpodtrzitko Apr 08 '20 at 07:38
  • 2
    I can't make a Metric *with the data* because the data is historical, and Metrics can only contain data from after the Metric was created. – offlinemark Apr 08 '20 at 17:19
  • maybe export the historical data to BigQuery and create the charts from there? – andreswebs Feb 02 '23 at 13:48

0 Answers0