Skip to content

Instantly share code, notes, and snippets.

@charlesbaer
Last active December 20, 2019 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlesbaer/d4f29e73684facc6c53d90ae9ba7f55f to your computer and use it in GitHub Desktop.
Save charlesbaer/d4f29e73684facc6c53d90ae9ba7f55f to your computer and use it in GitHub Desktop.
Stackdriver Dashboards API create JSON payload example
{
"displayName": "Data Processing Dashboard",
"gridLayout": {
"columns": "2",
"widgets": [
{
"title": "Dataflow (traffic)",
"xyChart": {
"dataSets": [
{
"timeSeriesQuery": {
"timeSeriesFilter": {
"filter": "metric.type=\"dataflow.googleapis.com/job/elements_produced_count\" resource.type=\"dataflow_job\"",
"aggregation": {
"perSeriesAligner": "ALIGN_RATE",
"crossSeriesReducer": "REDUCE_SUM",
"groupByFields": [
"resource.label.\"job_name\""
]
}
},
"unitOverride": "1"
},
"plotType": "LINE",
"minAlignmentPeriod": "60s"
}
],
"timeshiftDuration": "0s",
"yAxis": {
"label": "y1Axis",
"scale": "LINEAR"
},
"chartOptions": {
"mode": "COLOR"
}
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment