Reputation: 63
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?
Upvotes: 0
Views: 1127
Reputation: 727
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
Upvotes: 1