title: Stackdriver Alerting Policy - Need To Filter On JSON Payload
body: <p>I have a Python script set up under App Engine that runs through all of the projects within our organisation that collects data on:</p>
  
  <ul>
  <li>The disks not associated with snapshot policies</li>
  <li>The snapshot policies that do not have "daily" or "weekly" in their name (and are thus outside our naming convention)</li>
  </ul>
  
  <p>Taking the former as the example, the JSON payload within the Stackdriver log is like:</p>
  
  <pre><code>jsonPayload: {
    DiskWithoutPolicy: "True"   
    diskId: "1234567891234567891"   
    diskName: "server-disk3"   
    project: "projectID"   
  }
  </code></pre>
  
  <p>When I go to create the Alerting Policy, Metrics Explorer only allows me to filter on the log's resource labels (listed here: <a href="https://cloud.google.com/monitoring/api/resources" rel="nofollow noreferrer">https://cloud.google.com/monitoring/api/resources</a>):</p>
  
  <pre><code>resource: {
    labels: {
     module_id: "get_googlecloud_snapshotstatus"    
     project_id: "projectID"    
     version_id: ""    
     zone: "europe-west1-d"    
    }
  </code></pre>
  
  <p>Can Metrics Explorer filter on the JSON payload, so I can therefore see the 'diskId', 'diskName' and 'project'? </p>
  
  <p>If not, is there any other way of achieving what I need? </p>