Is it possible to trigger notification (e.g.- for HTTP 500) from Stackdriver log/monitoring?

隐身守侯 提交于 2019-12-11 17:35:28

问题


I have set up Stackdriver logging agents on Google Compute Engine VMs, and collecting logs from apache and some other sources. Is it possible to trigger a notification when a http 500 log is produced?

If parsing textPayload for notification is not an option, can it be done by modifying the fluentid configs to send in a specific label when it uploads a matching log?


回答1:


I think that a logging metric is your best bet. https://cloud.google.com/logging/docs/logs-based-metrics/charts-and-alerts#creating_a_simple_alerting_policy_on_a_counter_metric



来源:https://stackoverflow.com/questions/47080801/is-it-possible-to-trigger-notification-e-g-for-http-500-from-stackdriver-log

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!