| { |
| "annotations": { |
| "list": [ |
| { |
| "builtIn": 1, |
| "datasource": "-- Grafana --", |
| "enable": true, |
| "hide": true, |
| "iconColor": "rgba(0, 211, 255, 1)", |
| "name": "Annotations & Alerts", |
| "type": "dashboard" |
| } |
| ] |
| }, |
| "editable": true, |
| "gnetId": null, |
| "graphTooltip": 0, |
| "id": 5, |
| "links": [], |
| "panels": [ |
| { |
| "alert": { |
| "conditions": [ |
| { |
| "evaluator": { |
| "params": [ |
| 480 |
| ], |
| "type": "gt" |
| }, |
| "operator": { |
| "type": "and" |
| }, |
| "query": { |
| "params": [ |
| "A", |
| "5m", |
| "now" |
| ] |
| }, |
| "reducer": { |
| "params": [], |
| "type": "max" |
| }, |
| "type": "query" |
| } |
| ], |
| "executionErrorState": "alerting", |
| "frequency": "5m", |
| "handler": 1, |
| "name": "Source Data Freshness alert", |
| "noDataState": "alerting", |
| "notifications": [] |
| }, |
| "aliasColors": {}, |
| "bars": true, |
| "dashLength": 10, |
| "dashes": false, |
| "datasource": "BeamPSQL", |
| "description": "Data freshness for each metrics input source. Used for health monitoring for other dashboards.", |
| "fill": 1, |
| "gridPos": { |
| "h": 12, |
| "w": 6, |
| "x": 0, |
| "y": 0 |
| }, |
| "id": 2, |
| "legend": { |
| "alignAsTable": false, |
| "avg": false, |
| "current": true, |
| "max": false, |
| "min": false, |
| "rightSide": false, |
| "show": true, |
| "total": false, |
| "values": true |
| }, |
| "lines": false, |
| "linewidth": 1, |
| "links": [], |
| "nullPointMode": "null", |
| "percentage": false, |
| "pointradius": 5, |
| "points": false, |
| "renderer": "flot", |
| "seriesOverrides": [], |
| "spaceLength": 10, |
| "stack": false, |
| "steppedLine": false, |
| "targets": [ |
| { |
| "format": "time_series", |
| "group": [ |
| { |
| "params": [ |
| "$__interval", |
| "none" |
| ], |
| "type": "time" |
| } |
| ], |
| "hide": false, |
| "metricColumn": "build_result", |
| "rawQuery": true, |
| "rawSql": "WITH sources AS (\n SELECT\n 'Jenkins' as source,\n MAX(build_timestamp + make_interval(secs:= timing_executingtimemillis / 1000.0)) AS last_sync\n FROM jenkins_builds\n UNION SELECT\n 'JIRA' as source,\n lastsynctime AS last_sync\n FROM jira_issues_metadata\n UNION SELECT\n 'GitHub' as source,\n timestamp AS last_sync\n FROM gh_sync_metadata\n)\nSELECT\n current_timestamp AS time,\n source,\n EXTRACT(EPOCH FROM age(current_timestamp, last_sync)) / (60) AS value\nFROM sources", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "build_duration" |
| ], |
| "type": "column" |
| }, |
| { |
| "params": [ |
| "max" |
| ], |
| "type": "aggregate" |
| }, |
| { |
| "params": [ |
| "build_duration" |
| ], |
| "type": "alias" |
| } |
| ] |
| ], |
| "table": "jenkins_builds", |
| "timeColumn": "build_timestamp", |
| "timeColumnType": "timestamp", |
| "where": [] |
| } |
| ], |
| "thresholds": [ |
| { |
| "colorMode": "critical", |
| "fill": true, |
| "line": true, |
| "op": "gt", |
| "value": 480 |
| } |
| ], |
| "timeFrom": null, |
| "timeRegions": [], |
| "timeShift": null, |
| "title": "Source Data Freshness", |
| "tooltip": { |
| "shared": false, |
| "sort": 1, |
| "value_type": "individual" |
| }, |
| "type": "graph", |
| "xaxis": { |
| "buckets": null, |
| "mode": "series", |
| "name": null, |
| "show": false, |
| "values": [ |
| "current" |
| ] |
| }, |
| "yaxes": [ |
| { |
| "decimals": 0, |
| "format": "m", |
| "label": "Staleness", |
| "logBase": 1, |
| "max": "60", |
| "min": "0", |
| "show": true |
| }, |
| { |
| "format": "short", |
| "label": null, |
| "logBase": 1, |
| "max": null, |
| "min": null, |
| "show": false |
| } |
| ], |
| "yaxis": { |
| "align": false, |
| "alignLevel": null |
| } |
| } |
| ], |
| "schemaVersion": 18, |
| "style": "dark", |
| "tags": [], |
| "templating": { |
| "list": [] |
| }, |
| "time": { |
| "from": "now-30d", |
| "to": "now" |
| }, |
| "timepicker": { |
| "refresh_intervals": [ |
| "5s", |
| "10s", |
| "30s", |
| "1m", |
| "5m", |
| "15m", |
| "30m", |
| "1h", |
| "2h", |
| "1d" |
| ], |
| "time_options": [ |
| "5m", |
| "15m", |
| "1h", |
| "6h", |
| "12h", |
| "24h", |
| "2d", |
| "7d", |
| "30d" |
| ] |
| }, |
| "timezone": "", |
| "title": "Source Data Freshness", |
| "uid": "data-freshness", |
| "version": 8 |
| } |