diff --git a/definitions/ext-cdn_generic/dashboard.json b/definitions/ext-cdn_generic/dashboard.json new file mode 100644 index 000000000..931a4a983 --- /dev/null +++ b/definitions/ext-cdn_generic/dashboard.json @@ -0,0 +1,139 @@ +{ + "name": "CDN Health Metrics", + "description": null, + "pages": [ + { + "name": "CDN Health Metrics", + "description": null, + "widgets": [ + { + "visualization": { + "id": "viz.billboard" + }, + "layout": { + "column": 1, + "row": 1, + "height": 2, + "width": 12 + }, + "title": "Summary Metrics", + "rawConfiguration": { + "dataFormatters": [], + "nrqlQueries": [ + { + "accountId": 0, + "query": "FROM CDN SELECT average((responseBodySize+responseHeaderSize)/duration) as 'kB/s', percentage(count(*), where responseCode = 200 AND duration < 3000 ), average(duration), max(duration), percentile(duration,95) where URL like '%cdn%' SINCE 1 day ago LIMIT 1000" + } + ], + "thresholds": [] + } + }, + { + "visualization": { + "id": "viz.bar" + }, + "layout": { + "column": 1, + "row": 3, + "height": 8, + "width": 3 + }, + "title": "Worst Performing (95th percentile)", + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountId": 0, + "query": "FROM CDN SELECT percentile(duration,95) where URL like '%cdn.%' SINCE 1 week ago LIMIT 1000 facet domain " + } + ] + } + }, + { + "visualization": { + "id": "viz.line" + }, + "layout": { + "column": 4, + "row": 3, + "height": 3, + "width": 9 + }, + "title": "Latency (KB/s) by Domain", + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "legend": { + "enabled": true + }, + "nrqlQueries": [ + { + "accountId": 0, + "query": "FROM CDN SELECT average((responseBodySize+responseHeaderSize)/duration) as 'kB/s' where URL like '%cdn%' SINCE 1 day ago LIMIT 1000 TIMESERIES facet domain " + } + ], + "yAxisLeft": { + "zero": true + } + } + }, + { + "visualization": { + "id": "viz.line" + }, + "layout": { + "column": 4, + "row": 6, + "height": 5, + "width": 9 + }, + "title": "Success % Trend", + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "legend": { + "enabled": true + }, + "nrqlQueries": [ + { + "accountId": 0, + "query": "FROM CDN SELECT percentage(count(*), where responseCode = 200 AND duration < 3000 ) where URL like '%cdn%' and domain !='newrelic.com' SINCE 1 week ago LIMIT 25 TIMESERIES facet domain " + } + ], + "yAxisLeft": { + "zero": false + } + } + }, + { + "visualization": { + "id": "viz.table" + }, + "layout": { + "column": 1, + "row": 11, + "height": 4, + "width": 12 + }, + "title": "Synthetic CDN Summary Metrics", + "rawConfiguration": { + "dataFormatters": [], + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountId": 0, + "query": "FROM CDN SELECT percentage(count(*), where responseCode = 200 AND duration < 3000 ), average((responseBodySize+responseHeaderSize)/duration) as 'kB/s',average(duration), max(duration), percentile(duration,95), uniqueCount(tuple(monitorName,domain)) as 'urls' where URL like '%cdn%' SINCE 1 day ago LIMIT 100 facet domain " + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/definitions/ext-cdn_generic/definition.yml b/definitions/ext-cdn_generic/definition.yml new file mode 100644 index 000000000..65af71c0e --- /dev/null +++ b/definitions/ext-cdn_generic/definition.yml @@ -0,0 +1,35 @@ +# This file creates new CDN entities based upon SyntheticRequest URL's +# that contain the string 'cdn'. Please see the instructions in the +# following script to generate the events to create these entities: +# https://github.com/jake-codes/CDN_EntitySynthesis + +domain: EXT +type: CDN_GENERIC + +synthesis: + identifier: cdn_url + name: cdn_url + encodeIdentifierInGUID: true + conditions: + - attribute: eventType + value: "CDN" + + tags: + cdn_url: + multiValue: false + domain: + multiValue: false + host: + multiValue: false + monitorName: + multiValue: false + +dashboardTemplates: + newRelic: + template: dashboard.json + +compositeMetrics: + goldenMetrics: + - golden_metrics.yml + summaryMetrics: + - summary_metrics.yml diff --git a/definitions/ext-cdn_generic/golden_metrics.yml b/definitions/ext-cdn_generic/golden_metrics.yml new file mode 100644 index 000000000..75ff5206f --- /dev/null +++ b/definitions/ext-cdn_generic/golden_metrics.yml @@ -0,0 +1,16 @@ +# Determine metrics for generic cdn + + +latency: + title: CDN Latency + displayAsValue: true + query: + select: average(duration) + from: CDN + +availability: + title: CDN Availability + query: + select: percentage(count(*), where responseCode < 300) + from: CDN + where: responseCode is NOT NULL diff --git a/definitions/ext-cdn_generic/summary_metrics.yml b/definitions/ext-cdn_generic/summary_metrics.yml new file mode 100644 index 000000000..ca7ae9198 --- /dev/null +++ b/definitions/ext-cdn_generic/summary_metrics.yml @@ -0,0 +1,17 @@ + +latency: + title: CDN Latency + unit: SECONDS + query: + select: average(duration) + from: CDN + eventId: entity.guid + +availability: + title: CDN Availability + unit: COUNT + query: + select: percentage(count(*), where responseCode < 300) + from: CDN + where: responseCode is NOT NULL + eventId: entity.guid