This page explains some of the behaviors that you might see when using metrics collected by your Google Cloud projects.
Gaps in chart data
Charts occasionally exhibit gaps in the data. For example, the following
screenshot illustrates this behavior for the metric
loadbalancing.googleapis.com/https/total_latencies
:
Gaps in the data can occur when data is written very infrequently. Cloud Monitoring collects metrics by sampling, and with very sparse data, there might not be any data available when a sample is collected. For example, gaps in load-balancer metrics might occur when the request count is 0.05 queries per second (QPS) or less. When the query rate increases, the gaps disappear.
Alert chart doesn't display any data
A dashboard contains an alert chart, but it doesn't display any data.
To resolve this situation, try the following:
View the configuration of the alert chart and ensure an alerting policy is selected. If no alerting policy is displayed, then associate the alert chart with an alerting policy or delete the alert chart from the dashboard.
If an alert chart is added to a dashboard and then the referenced alerting policy is deleted, then the alert chart stops displaying data. Deleting an alerting policy doesn't delete alert charts that reference that policy.
View the details of the alerting policy and verify that it contains a single condition.
If an alert chart is added to a dashboard and then the referenced alerting policy is modified to contain multiple conditions, then the alert chart stops displaying data. To resolve this condition, associate the alert chart with a single-condition alerting policy or delete the alert chart from the dashboard.
Increase the period of time range. The time-range selector must be set to a value longer than the sampling period of the data. While most metrics are sampled every 60 seconds, some metrics are sampled infrequently. For example, the serviceruntime.googleapis.com/quota/limit metric is sampled every 86,400 seconds (1 day).
Chart with multiple metrics displays an error message
You are configuring a chart to display multiple metrics and the chart displays the following error message:
The units for queries using the same Y-axis must be the same for the chart to render correctly.
This error message indicates that a chart has at least two metrics mapped to the same Y-axis, but the units of those time series are different. For example, a chart is configured to display a metric that is reported as a percentage and a metric that reports a count.
To resolve this error, do the following:
If your chart contains metrics with more than two unit types, then remove metrics until you have only two unit types.
Assign all metrics with one unit type to the left Y-axis and all metrics with the other unit type to the right Y-axis.
Chart with multiple metrics displays unexpected data
A chart is configured to display multiple metrics, and filters were added to show only specific time series. However, the chart shows time series that don't satisfy the filters.
To resolve this situation, ensure that you apply filters to each metric that is charted.
For example, the following screenshot shows the configuration pane of Metrics Explorer for a chart that displays the number of bytes read, and written, by virtual machine (VM) instances:
In the screenshot, there are two headings labeled Time series, one heading is for each metric that is displayed by the chart.
For the example, if you want the chart to display time series only for
VMs that are in the us-central1-a
zone, then do the following:
- Click expand_more Show more on the Time series heading
for the metric
Disk read bytes
, and then add the filterzone = us-central1-a
. - Click expand_more Show more on the Time series heading
for the metric
Disk write bytes
, and then add the filterzone = us-central1-a
.
Logs panel reports invalid query
You see an error message "Error: Invalid query", and the logs panel doesn't show any log entries.
To resolve this issue, reduce the number of projects whose logs the logs panel is configured to display.
For more information about this failure condition, see Query returns an error.
Logs panel reports no entries found
You see the error message "No entries found matching current filter" in a logs panel. There are multiple reasons why you might see this message. Check the following:
For the each project whose log entries you want to view, ensure that one of the following is true:
- You have the
Logs Viewer
(
roles/logging.viewer
) role. For custom roles, you have the following permissions:
logging.logs.list
logging.logServiceIndexes.list
logging.logServices.list
- You have the
Logs Viewer
(
Ensure that the clauses in the query editor don't conflict with the settings shown in the logs panel.
For example, when the Query Editor field contains
severity=NOTICE
, the logs panel retrieves all logs that have a severity level of exactlyNOTICE
. If the logs panel Severity menu is set to "Warning", then the logs panel displays "No entries found matching current filter". The message is shown because none of the retrieved log entries have a severity level of at least "Warning".In contrast, when the Query Editor field contains
severity=WARNING
and the logs panel Severity menu is set to "Notice", you might see log entries. With this configuration, the logs panel retrieves logs whose severity level isWARNING
. Next, that list of logs is filtered to display only those whose severity is at least "Notice", and all of the retrieved logs have at least that severity level.
Logs panel indicates it displays partial data
You see a warning indicator and the message "Showing partial results" on a logs panel.
When you don't have permission to view logs for a Google Cloud project whose logs you've selected to display, this indicator is shown. To remove the warning indicator, do one of the following:
Contact your system administrator and ask them to do one of the following for each Google Cloud project whose logs you want to view::
- Grant you the role of
Logs Viewer
(
roles/logging.viewer
). For custom roles, grant you the following permissions:
logging.logs.list
logging.logServiceIndexes.list
logging.logServices.list
- Grant you the role of
Logs Viewer
(
Change the configuration of the logs panel to show logs only for Google Cloud projects where you have permission to view log entries.
API call to create dashboard with a logs panel fails
There are multiple reasons why you might see an error message when you create a dashboard with a logs panel:
When the logs panel doesn't meet the minimum height or width requirements, the following error is shown:
Unable to save dashboard: Field mosaicLayout.tiles[0] has an invalid value: LogsPanel must have a minimum width of 3 and height of 3.
To resolve this condition, in the dashboard JSON representation, ensure the
height
andwidth
fields of the logs panel widget meet the minimum requirements.When the
logsPanel.filter
field exceeds 2,000 characters, the following error is shown:Unable to save dashboard: filter cannot be greater than 2000 characters.
To resolve this condition, shorten the filter.
When the
resourceNames
field is missing, you see the following error message:Unable to save dashboard: Dashboard is missing required field mosaicLayout.tiles[0].widget.logsPanel.resourceNames.
To resolve this condition, add a
resourceNames
field to the dashboard JSON.When the syntax for the
resourceNames
is incorrect, the following error is similar to the following:Unable to save dashboard: Field mosaicLayout.tiles[0].widget.logsPanelWidget.resourceNames has an invalid value of "a-project": resource name must have the format `projects/{project}`."
To resolve this condition, replace
a-project
withprojects/a-project
in the dashboard JSON.For information about how to resolve syntax errors in the
filter
field, see Troubleshooting: syntax issues.
For an example of a correctly formatted JSON file, see
Dashboard with a LogsPanel
widget.