Search code examples
google-cloud-pubsubgoogle-cloud-stackdriver

Unacknowledged messages alert creation in google stack driver


Does stackdriver have alert mechanism? like if i see more than 1000 unacknowledged messages then alert need to be placed.


Solution

  • Yes, this can be done with Stackdriver. In the Monitoring Alerting page, click on Create Policy:

    Create Policy

    Then, click on "Add Condition" on the next page. To create the correct condition, select "Cloud Pub/Sub Subscription" as the resource:

    Subscription

    For metric, choose "Unacked messages":

    Metric

    Under "Configuration" you can then set the threshold to 1000:

    Threshold

    Once you click "Add," you can now configure the rest of the parts of the alert as you could any other Stackdriver alert by choosing who should be notified and the documentation and name of the alert.