|
1 | 1 | { |
2 | 2 | "name": "Now Playing – Operational Dashboard", |
3 | | - "description": "Station scrapes, Spotify API latency, chart ops, cache health", |
4 | 3 | "permissions": "PUBLIC_READ_WRITE", |
5 | 4 | "pages": [ |
6 | 5 | { |
7 | 6 | "name": "Stations", |
8 | | - "description": "Live station scrape health and now-playing update counters", |
9 | 7 | "widgets": [ |
10 | 8 | { |
11 | 9 | "title": "Station Scrape Latency P95 (ms)", |
12 | 10 | "layout": { "column": 1, "row": 1, "width": 8, "height": 3 }, |
13 | 11 | "linkedEntityGuids": null, |
14 | 12 | "visualization": { "id": "viz.line" }, |
15 | 13 | "rawConfiguration": { |
16 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentile(durationMs, 95) FROM ServerMetric WHERE measurement = 'SourceScrape' FACET sourceId TIMESERIES AUTO LIMIT 50" }] |
| 14 | + "facet": { "showOtherSeries": false }, |
| 15 | + "legend": { "enabled": true }, |
| 16 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentile(durationMs, 95) FROM ServerMetric WHERE measurement = 'SourceScrape' FACET sourceId TIMESERIES AUTO LIMIT 50" }], |
| 17 | + "platformOptions": { "ignoreTimeRange": false } |
17 | 18 | } |
18 | 19 | }, |
19 | 20 | { |
|
22 | 23 | "linkedEntityGuids": null, |
23 | 24 | "visualization": { "id": "viz.bar" }, |
24 | 25 | "rawConfiguration": { |
25 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentage(count(*), WHERE success = 0) AS 'Error %' FROM ServerMetric WHERE measurement = 'SourceScrape' FACET sourceId SINCE 1 hour ago LIMIT 50" }] |
| 26 | + "facet": { "showOtherSeries": false }, |
| 27 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentage(count(*), WHERE success = 0) AS 'Error %' FROM ServerMetric WHERE measurement = 'SourceScrape' FACET sourceId SINCE 1 hour ago LIMIT 50" }], |
| 28 | + "platformOptions": { "ignoreTimeRange": false } |
26 | 29 | } |
27 | 30 | }, |
28 | 31 | { |
|
31 | 34 | "linkedEntityGuids": null, |
32 | 35 | "visualization": { "id": "viz.area" }, |
33 | 36 | "rawConfiguration": { |
34 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'StationTrackUpdated' FACET station TIMESERIES AUTO LIMIT 50" }] |
| 37 | + "facet": { "showOtherSeries": false }, |
| 38 | + "legend": { "enabled": true }, |
| 39 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'StationTrackUpdated' FACET station TIMESERIES AUTO LIMIT 50" }], |
| 40 | + "platformOptions": { "ignoreTimeRange": false } |
35 | 41 | } |
36 | 42 | }, |
37 | 43 | { |
|
40 | 46 | "linkedEntityGuids": null, |
41 | 47 | "visualization": { "id": "viz.line" }, |
42 | 48 | "rawConfiguration": { |
43 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) AS 'avg', max(durationMs) AS 'max' FROM ServerMetric WHERE measurement = 'StationCrawlCycle' TIMESERIES AUTO" }] |
| 49 | + "legend": { "enabled": true }, |
| 50 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) AS 'avg', max(durationMs) AS 'max' FROM ServerMetric WHERE measurement = 'StationCrawlCycle' TIMESERIES AUTO" }], |
| 51 | + "platformOptions": { "ignoreTimeRange": false } |
44 | 52 | } |
45 | 53 | }, |
46 | 54 | { |
|
49 | 57 | "linkedEntityGuids": null, |
50 | 58 | "visualization": { "id": "viz.area" }, |
51 | 59 | "rawConfiguration": { |
52 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(updatedCount) AS 'Updated', sum(errorCount) AS 'Errors' FROM ServerMetric WHERE measurement = 'StationCrawlCycle' TIMESERIES AUTO" }] |
| 60 | + "legend": { "enabled": true }, |
| 61 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(updatedCount) AS 'Updated', sum(errorCount) AS 'Errors' FROM ServerMetric WHERE measurement = 'StationCrawlCycle' TIMESERIES AUTO" }], |
| 62 | + "platformOptions": { "ignoreTimeRange": false } |
53 | 63 | } |
54 | 64 | }, |
55 | 65 | { |
56 | | - "title": "Scrape Retry Rate", |
| 66 | + "title": "Scrape Retry Rate (avg attempts)", |
57 | 67 | "layout": { "column": 7, "row": 7, "width": 6, "height": 3 }, |
58 | 68 | "linkedEntityGuids": null, |
59 | 69 | "visualization": { "id": "viz.line" }, |
60 | 70 | "rawConfiguration": { |
61 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(attempts) FROM ServerMetric WHERE measurement = 'SourceScrape' FACET sourceId TIMESERIES AUTO LIMIT 50" }] |
| 71 | + "facet": { "showOtherSeries": false }, |
| 72 | + "legend": { "enabled": true }, |
| 73 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(attempts) FROM ServerMetric WHERE measurement = 'SourceScrape' FACET sourceId TIMESERIES AUTO LIMIT 50" }], |
| 74 | + "platformOptions": { "ignoreTimeRange": false } |
62 | 75 | } |
63 | 76 | }, |
64 | 77 | { |
|
67 | 80 | "linkedEntityGuids": null, |
68 | 81 | "visualization": { "id": "viz.area" }, |
69 | 82 | "rawConfiguration": { |
70 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(newTrackCount) FROM ServerMetric WHERE measurement = 'HistoryChartNewTracks' FACET station TIMESERIES AUTO LIMIT 50" }] |
| 83 | + "facet": { "showOtherSeries": false }, |
| 84 | + "legend": { "enabled": true }, |
| 85 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(newTrackCount) FROM ServerMetric WHERE measurement = 'HistoryChartNewTracks' FACET station TIMESERIES AUTO LIMIT 50" }], |
| 86 | + "platformOptions": { "ignoreTimeRange": false } |
71 | 87 | } |
72 | 88 | } |
73 | 89 | ] |
74 | 90 | }, |
75 | 91 | { |
76 | 92 | "name": "Spotify API", |
77 | | - "description": "Latency and error rates per Spotify API method + search cache", |
78 | 93 | "widgets": [ |
79 | 94 | { |
80 | 95 | "title": "Spotify API Latency P95 per Method (ms)", |
81 | 96 | "layout": { "column": 1, "row": 1, "width": 8, "height": 3 }, |
82 | 97 | "linkedEntityGuids": null, |
83 | 98 | "visualization": { "id": "viz.line" }, |
84 | 99 | "rawConfiguration": { |
85 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentile(durationMs, 95) FROM ServerMetric WHERE measurement = 'SpotifyApiCall' FACET method TIMESERIES AUTO LIMIT 20" }] |
| 100 | + "facet": { "showOtherSeries": false }, |
| 101 | + "legend": { "enabled": true }, |
| 102 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentile(durationMs, 95) FROM ServerMetric WHERE measurement = 'SpotifyApiCall' FACET method TIMESERIES AUTO LIMIT 20" }], |
| 103 | + "platformOptions": { "ignoreTimeRange": false } |
86 | 104 | } |
87 | 105 | }, |
88 | 106 | { |
|
91 | 109 | "linkedEntityGuids": null, |
92 | 110 | "visualization": { "id": "viz.bar" }, |
93 | 111 | "rawConfiguration": { |
94 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentage(count(*), WHERE success = 0) AS 'Error %' FROM ServerMetric WHERE measurement = 'SpotifyApiCall' FACET method SINCE 1 hour ago LIMIT 20" }] |
| 112 | + "facet": { "showOtherSeries": false }, |
| 113 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentage(count(*), WHERE success = 0) AS 'Error %' FROM ServerMetric WHERE measurement = 'SpotifyApiCall' FACET method SINCE 1 hour ago LIMIT 20" }], |
| 114 | + "platformOptions": { "ignoreTimeRange": false } |
95 | 115 | } |
96 | 116 | }, |
97 | 117 | { |
|
100 | 120 | "linkedEntityGuids": null, |
101 | 121 | "visualization": { "id": "viz.area" }, |
102 | 122 | "rawConfiguration": { |
103 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'SpotifyApiCall' FACET method TIMESERIES AUTO LIMIT 20" }] |
| 123 | + "facet": { "showOtherSeries": false }, |
| 124 | + "legend": { "enabled": true }, |
| 125 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'SpotifyApiCall' FACET method TIMESERIES AUTO LIMIT 20" }], |
| 126 | + "platformOptions": { "ignoreTimeRange": false } |
104 | 127 | } |
105 | 128 | }, |
106 | 129 | { |
|
110 | 133 | "visualization": { "id": "viz.billboard" }, |
111 | 134 | "rawConfiguration": { |
112 | 135 | "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentage(count(*), WHERE hit = 1) AS 'Cache Hit %' FROM ServerMetric WHERE measurement = 'SpotifySearchCache' SINCE 1 hour ago" }], |
113 | | - "thresholds": [ |
114 | | - { "alertSeverity": "WARNING", "value": 50 }, |
115 | | - { "alertSeverity": "CRITICAL", "value": 20 } |
116 | | - ] |
| 136 | + "platformOptions": { "ignoreTimeRange": false } |
117 | 137 | } |
118 | 138 | }, |
119 | 139 | { |
|
122 | 142 | "linkedEntityGuids": null, |
123 | 143 | "visualization": { "id": "viz.pie" }, |
124 | 144 | "rawConfiguration": { |
125 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'SpotifySearchCache' FACET cases(WHERE hit = 1 AS 'Hit', WHERE hit = 0 AS 'Miss') SINCE 1 hour ago" }] |
| 145 | + "facet": { "showOtherSeries": false }, |
| 146 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'SpotifySearchCache' FACET cases(WHERE hit = 1 AS 'Hit', WHERE hit = 0 AS 'Miss') SINCE 1 hour ago" }], |
| 147 | + "platformOptions": { "ignoreTimeRange": false } |
126 | 148 | } |
127 | 149 | }, |
128 | 150 | { |
129 | | - "title": "Cache Lookup Latency (ms)", |
| 151 | + "title": "Cache Lookup Latency – Hit vs Miss (ms)", |
130 | 152 | "layout": { "column": 1, "row": 7, "width": 6, "height": 3 }, |
131 | 153 | "linkedEntityGuids": null, |
132 | 154 | "visualization": { "id": "viz.line" }, |
133 | 155 | "rawConfiguration": { |
134 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) FROM ServerMetric WHERE measurement = 'SpotifySearchCache' FACET cases(WHERE hit = 1 AS 'Hit', WHERE hit = 0 AS 'Miss') TIMESERIES AUTO" }] |
| 156 | + "facet": { "showOtherSeries": false }, |
| 157 | + "legend": { "enabled": true }, |
| 158 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) FROM ServerMetric WHERE measurement = 'SpotifySearchCache' FACET cases(WHERE hit = 1 AS 'Hit', WHERE hit = 0 AS 'Miss') TIMESERIES AUTO" }], |
| 159 | + "platformOptions": { "ignoreTimeRange": false } |
135 | 160 | } |
136 | 161 | }, |
137 | 162 | { |
138 | | - "title": "Spotify API Latency Distribution (ms)", |
| 163 | + "title": "Spotify API Avg Latency per Method (ms)", |
139 | 164 | "layout": { "column": 7, "row": 7, "width": 6, "height": 3 }, |
140 | 165 | "linkedEntityGuids": null, |
141 | | - "visualization": { "id": "viz.histogram" }, |
| 166 | + "visualization": { "id": "viz.bar" }, |
142 | 167 | "rawConfiguration": { |
143 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT histogram(durationMs, 50, 20) FROM ServerMetric WHERE measurement = 'SpotifyApiCall' SINCE 1 hour ago" }] |
| 168 | + "facet": { "showOtherSeries": false }, |
| 169 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) FROM ServerMetric WHERE measurement = 'SpotifyApiCall' FACET method SINCE 1 hour ago LIMIT 20" }], |
| 170 | + "platformOptions": { "ignoreTimeRange": false } |
144 | 171 | } |
145 | 172 | } |
146 | 173 | ] |
147 | 174 | }, |
148 | 175 | { |
149 | 176 | "name": "Charts", |
150 | | - "description": "Weekly chart collection and Spotify playlist sync health", |
151 | 177 | "widgets": [ |
152 | 178 | { |
153 | 179 | "title": "Chart Collection Latency (ms)", |
154 | 180 | "layout": { "column": 1, "row": 1, "width": 8, "height": 3 }, |
155 | 181 | "linkedEntityGuids": null, |
156 | 182 | "visualization": { "id": "viz.line" }, |
157 | 183 | "rawConfiguration": { |
158 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) FROM ServerMetric WHERE measurement = 'ChartCollection' FACET chartKey TIMESERIES AUTO LIMIT 30" }] |
| 184 | + "facet": { "showOtherSeries": false }, |
| 185 | + "legend": { "enabled": true }, |
| 186 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) FROM ServerMetric WHERE measurement = 'ChartCollection' FACET chartKey TIMESERIES AUTO LIMIT 30" }], |
| 187 | + "platformOptions": { "ignoreTimeRange": false } |
159 | 188 | } |
160 | 189 | }, |
161 | 190 | { |
|
164 | 193 | "linkedEntityGuids": null, |
165 | 194 | "visualization": { "id": "viz.bar" }, |
166 | 195 | "rawConfiguration": { |
167 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentage(count(*), WHERE success = 1) AS 'Success %' FROM ServerMetric WHERE measurement = 'ChartCollection' FACET chartKey SINCE 7 days ago LIMIT 30" }] |
| 196 | + "facet": { "showOtherSeries": false }, |
| 197 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT percentage(count(*), WHERE success = 1) AS 'Success %' FROM ServerMetric WHERE measurement = 'ChartCollection' FACET chartKey SINCE 7 days ago LIMIT 30" }], |
| 198 | + "platformOptions": { "ignoreTimeRange": false } |
168 | 199 | } |
169 | 200 | }, |
170 | 201 | { |
|
173 | 204 | "linkedEntityGuids": null, |
174 | 205 | "visualization": { "id": "viz.bar" }, |
175 | 206 | "rawConfiguration": { |
176 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(trackCount) AS 'Total Tracks', sum(spotifyResolvedCount) AS 'Spotify Resolved' FROM ServerMetric WHERE measurement = 'ChartCollection' FACET chartKey SINCE 30 days ago LIMIT 30" }] |
| 207 | + "facet": { "showOtherSeries": false }, |
| 208 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(trackCount) AS 'Total Tracks', sum(spotifyResolvedCount) AS 'Spotify Resolved' FROM ServerMetric WHERE measurement = 'ChartCollection' FACET chartKey SINCE 30 days ago LIMIT 30" }], |
| 209 | + "platformOptions": { "ignoreTimeRange": false } |
177 | 210 | } |
178 | 211 | }, |
179 | 212 | { |
|
182 | 215 | "linkedEntityGuids": null, |
183 | 216 | "visualization": { "id": "viz.bar" }, |
184 | 217 | "rawConfiguration": { |
185 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(spotifyResolvedCount) / sum(trackCount) * 100 AS 'Resolution %' FROM ServerMetric WHERE measurement = 'ChartCollection' AND trackCount > 0 FACET chartKey SINCE 30 days ago LIMIT 30" }] |
| 218 | + "facet": { "showOtherSeries": false }, |
| 219 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT sum(spotifyResolvedCount) / sum(trackCount) * 100 AS 'Resolution %' FROM ServerMetric WHERE measurement = 'ChartCollection' AND trackCount > 0 FACET chartKey SINCE 30 days ago LIMIT 30" }], |
| 220 | + "platformOptions": { "ignoreTimeRange": false } |
186 | 221 | } |
187 | 222 | }, |
188 | 223 | { |
|
191 | 226 | "linkedEntityGuids": null, |
192 | 227 | "visualization": { "id": "viz.line" }, |
193 | 228 | "rawConfiguration": { |
194 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) FROM ServerMetric WHERE measurement = 'ChartSpotifySync' FACET chartKey TIMESERIES AUTO LIMIT 30" }] |
| 229 | + "facet": { "showOtherSeries": false }, |
| 230 | + "legend": { "enabled": true }, |
| 231 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT average(durationMs) FROM ServerMetric WHERE measurement = 'ChartSpotifySync' FACET chartKey TIMESERIES AUTO LIMIT 30" }], |
| 232 | + "platformOptions": { "ignoreTimeRange": false } |
195 | 233 | } |
196 | 234 | }, |
197 | 235 | { |
|
200 | 238 | "linkedEntityGuids": null, |
201 | 239 | "visualization": { "id": "viz.bar" }, |
202 | 240 | "rawConfiguration": { |
203 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT latest(trackCount) AS 'Tracks Synced' FROM ServerMetric WHERE measurement = 'ChartSpotifySync' AND success = 1 FACET chartKey SINCE 7 days ago LIMIT 30" }] |
| 241 | + "facet": { "showOtherSeries": false }, |
| 242 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT latest(trackCount) AS 'Tracks Synced' FROM ServerMetric WHERE measurement = 'ChartSpotifySync' AND success = 1 FACET chartKey SINCE 7 days ago LIMIT 30" }], |
| 243 | + "platformOptions": { "ignoreTimeRange": false } |
204 | 244 | } |
205 | 245 | }, |
206 | 246 | { |
207 | | - "title": "Chart Collection Skipped (already exists for week)", |
| 247 | + "title": "Chart Collection Skipped (week exists)", |
208 | 248 | "layout": { "column": 1, "row": 10, "width": 6, "height": 3 }, |
209 | 249 | "linkedEntityGuids": null, |
210 | 250 | "visualization": { "id": "viz.area" }, |
211 | 251 | "rawConfiguration": { |
212 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'ChartCollectionSkipped' FACET chartKey TIMESERIES AUTO LIMIT 30" }] |
| 252 | + "facet": { "showOtherSeries": false }, |
| 253 | + "legend": { "enabled": true }, |
| 254 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'ChartCollectionSkipped' FACET chartKey TIMESERIES AUTO LIMIT 30" }], |
| 255 | + "platformOptions": { "ignoreTimeRange": false } |
213 | 256 | } |
214 | 257 | }, |
215 | 258 | { |
|
218 | 261 | "linkedEntityGuids": null, |
219 | 262 | "visualization": { "id": "viz.area" }, |
220 | 263 | "rawConfiguration": { |
221 | | - "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'ChartSpotifySync' AND success = 0 FACET chartKey TIMESERIES AUTO LIMIT 30" }] |
| 264 | + "facet": { "showOtherSeries": false }, |
| 265 | + "legend": { "enabled": true }, |
| 266 | + "nrqlQueries": [{ "accountIds": [0], "query": "SELECT count(*) FROM ServerMetric WHERE measurement = 'ChartSpotifySync' AND success = 0 FACET chartKey TIMESERIES AUTO LIMIT 30" }], |
| 267 | + "platformOptions": { "ignoreTimeRange": false } |
222 | 268 | } |
223 | 269 | } |
224 | 270 | ] |
|
0 commit comments