<p>I have a stackdriver log based metric tracking GKE pod restarts. </p>

<p>I'd like to alert via email if the number of alerts breaches a predefined threshold. </p>

<p>I'm unsure as what thresholds I need to set inroder to trigger the alert via stackdriver. I have three pods via deployed service.</p>

<p>GKE is already sending to Stackdriver a metric called: <code>container/restart_count</code>. You just need to create an alert policy as described on <a href="https://cloud.google.com/monitoring/alerts/using-alerting-ui" rel="nofollow noreferrer">Managing alerting policies</a>. As per the <a href="https://cloud.google.com/monitoring/api/metrics_kubernetes" rel="nofollow noreferrer">official doc</a>, this metric expose: </p>

<blockquote>
  <p>Number of times the container has restarted. Sampled every 60 seconds.</p>
</blockquote>
