Why do some alerts created from log based metrics allow you to click on the alert and then "View Logs", see screenshot below of such and example:
While some alerts don't allow you to view the logs and then you end up having to find the log based metric used in the alert and need to lookup that log based metric and under log based metrics need to click on "View Logs".
See screenshot where there is no option for "View Logs"?
I've never understood why is this. Most of my alerts created from log based metrics are created in the same way.
Hi @timogoosen,
Welcome to Google Cloud Community!
The way you configure the alert can play a role as to why ‘view logs’ is not visible on the option. To Configure notifications for log-based metrics, kindly follow steps provided on this document where explains that:
An alerting policy describes a set of conditions that you want to monitor. When you create an alerting policy, you must also specify its conditions: what is monitored and when to send notifications. Notifications include information about the incident, and they include buttons that let you view relevant logs and incident details:
If you plan to create an alerting policy to monitor a log-based metric, then ensure sure that you understand the limitations of this approach. In particular, review Troubleshoot: Metric is missing logs data.
Other references:
I hope the above information is helpful.
Thanks I looked at everything you posted.
I can't seem to find the step when setting up notification to include an option to click and "view logs" for a given alert based on a log based metric.
How would you do it from an existing (log based metric) alert by clicking edit on the alert policy?
Thanks for your help and my apologies for my late reply.