Skip to content

Commit

Permalink
Fprats new golden metrics (#64)
Browse files Browse the repository at this point in the history
* Adding goldenmetrics

* Adding goldenmetrics for gcpstorabebucket

* Adding goldenmetrics for gcpspannerinstance

* golden metrics for gcphttploadbalancer

* golden metrics for gcpcloudfunction

* goldenmetrics definition & summary for gcpstoragebucket

* definition for goldenmetrics for gcpspannerinstance

* goldenmetrics definition and summary metrics for gcpinternalloadbalancer

* fix golden_metrics file for gcpstoragebucket

* goldenmetrics ¡& summaryMetric changes for gcpbigquerytable

* goldenmetrics &summary metrics changes for gcpbigquerydataset

* goldenmetrics added for gcpappengineservice

* added sessions to goldenmetrics in gcpspannerinstance

* fix goldenmetrics for gcphttploadbalancer

* fix goldenmetrics for gcpappengineservice

* added instances to summary_metrics of gcpappengineservice

* fix definitions for gcpbigquerydataset

* fix definition for gcpappengineservice

* fix definition for gcpbigquerytable

* fix definition for gcpcloudfunction

* fix definition gcpappengineservice

* fix definition gcpbigquerydataset

* fix definition gcpbigquerytable

* fix definition gcpcloudfunction

* fix definition for gcpinternalloadbalancer

* fix definition gcpspannerinstance

* fix definition gcpstoragebucket

* fix definition gcpstoragebucket

* fix definition for gcpspannerinstance

* fix definition gcpinternalloadbalancer

* fix definition for gcphttploadbalancer

* fix definition for gcpcloudsql

* fix definition gcphttploadbalancer

* fix definition gcpcloudfunction

* fix definition gcpbigquerytable

* fix definition gcpbigquerydataset

* fix definition gcpappengineservice

* fix definition gcpspannerdatabase

* fix goldenmetrics gcpspannerinstance

* fix defnition for gcpspannerdatabase

Co-authored-by: fprats <fprats.newrelic.com>
  • Loading branch information
fprats authored Feb 11, 2021
1 parent 7b8bfb3 commit 01b2776
Show file tree
Hide file tree
Showing 24 changed files with 277 additions and 12 deletions.
5 changes: 5 additions & 0 deletions definitions/infra-gcpappengineservice/definition.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
domain: INFRA
type: GCPAPPENGINESERVICE
goldenTags:
- gcp.projectId
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
goldenMetrics:
- golden_metrics.yml
28 changes: 28 additions & 0 deletions definitions/infra-gcpappengineservice/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Instances:
title: Number of instances
query:
select: max(`system.Instances`)
from: GcpAppEngineServiceSample
facet: entityName
eventId: entityGuid
Responses:
title: Number of http responses
query:
select: sum(`server.Responses`)
from: GcpAppEngineServiceSample
facet: entityName
eventId: entityGuid
ErrorRate:
title: Error rate
query:
select: filter(sum(`server.Responses`), WHERE response_code NOT LIKE '2%') * 100
from: GcpAppEngineServiceSample
facet: entityName
eventId: entityGuid
latency:
title: Latency
query:
select: (average(`server.ResponseLatenciesMilliseconds`)) / 1000
from: GcpAppEngineServiceSample
facet: entityName
eventId: entityGuid
7 changes: 7 additions & 0 deletions definitions/infra-gcpappengineservice/summary_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ providerAccountName:
key: providerAccountName
title: GCP Account
unit: STRING
Instances:
query:
eventId: entityGuid
select: max(`system.Instances`)
from: GcpAppEngineServiceSample
unit: COUNT
title: Number of instances
Service responses:
query:
eventId: entityGuid
Expand Down
6 changes: 6 additions & 0 deletions definitions/infra-gcpbigquerydataset/definition.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
domain: INFRA
type: GCPBIGQUERYDATASET
goldenTags:
- gcp.projectId
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
goldenMetrics:
- golden_metrics.yml

14 changes: 14 additions & 0 deletions definitions/infra-gcpbigquerydataset/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
storedBytes:
title: Stored bytes
query:
select: sum(`storage.StoredBytes`)
from: GcpBigQueryDatasetSample
facet: entityName
eventId: entityGuid
tables:
title: Number of Tables
query:
select: sum(`storage.Tables`)
from: GcpBigQueryDatasetSample
facet: entityName
eventId: entityGuid
15 changes: 15 additions & 0 deletions definitions/infra-gcpbigquerydataset/summary_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,18 @@ zone:
tag:
key: zone
title: Zone
storedBytes:
query:
eventId: entityGuid
select: sum(`storage.StoredBytes`)
from: GcpBigQueryDatasetSample
unit: BYTES
title: storedBytes
tables:
query:
eventId: entityGuid
select: sum(`storage.Tables`)
from: GcpBigQueryDatasetSample
unit: COUNT
title: tables

5 changes: 5 additions & 0 deletions definitions/infra-gcpbigquerytable/definition.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
domain: INFRA
type: GCPBIGQUERYTABLE
goldenTags:
- gcp.projectId
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
goldenMetrics:
- golden_metrics.yml
14 changes: 14 additions & 0 deletions definitions/infra-gcpbigquerytable/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uploadedBytes:
title: Uploaded bytes
query:
select: sum(`storage.UploadedBytes`)
from: GcpBigQueryTableSample
facet: entityName
eventId: entityGuid
uploadedRows:
title: Uploaded Rows
query:
select: sum(`storage.UploadedRowCount`)
from: GcpBigQueryTableSample
facet: entityName
eventId: entityGuid
14 changes: 14 additions & 0 deletions definitions/infra-gcpbigquerytable/summary_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@ zone:
tag:
key: zone
title: Zone
uploadedBytes:
query:
eventId: entityGuid
select: sum(`storage.UploadedBytes`)
from: GcpBigQueryTableSample
unit: BYTES
title: uploadedBytes
uploadedRows:
query:
eventId: entityGuid
select: sum(`storage.UploadedRowCount`)
from: GcpBigQueryTableSample
unit: COUNT
title: uploadedRows
10 changes: 7 additions & 3 deletions definitions/infra-gcpcloudfunction/definition.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
domain: INFRA
type: GCPCLOUDFUNCTION

goldenTags:
- gcp.projectId
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
summaryMetrics:
- summary_metrics.yml
goldenMetrics:
- golden_metrics.yml
21 changes: 21 additions & 0 deletions definitions/infra-gcpcloudfunction/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Executions:
title: Number of function executions
query:
select: sum(`api.Requests`)
from: GcpCloudFunctionSample
facet: entityName
eventId: entityGuid
ErrorRate:
title: Error rate
query:
select: filter(sum(`function.Executions`), WHERE status != 'ok') * 100 / sum(`function.Executions`)
from: GcpCloudFunctionSample
facet: entityName
eventId: entityGuid
latency:
title: Latency
query:
select: (average(`function.ExecutionTimeNanos`)) / 1000000000
from: GcpCloudFunctionSample
facet: entityName
eventId: entityGuid
8 changes: 8 additions & 0 deletions definitions/infra-gcpcloudfunction/summary_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ errorRate:
from: GcpCloudFunctionSample
unit: PERCENTAGE
title: Error rate
latency:
query:
eventId: entityGuid
select: (average(`function.ExecutionTimeNanos`)) / 1000000000
from: GcpCloudFunctionSample
unit: SECONDS
title: Latency

4 changes: 2 additions & 2 deletions definitions/infra-gcpcloudsql/definition.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
domain: INFRA
type: GCPCLOUDSQL
goldenTags:
- gcp.regionName
- gcp.subscriptionId
- gcp.projectId
- gcp.zone
compositeMetrics:
goldenMetrics:
- golden_metrics.yml
Expand Down
4 changes: 2 additions & 2 deletions definitions/infra-gcphttploadbalancer/definition.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
domain: INFRA
type: GCPHTTPLOADBALANCER
goldenTags:
- gcp.regionName
- gcp.subscriptionId
- gcp.projectId
- gcp.zone
compositeMetrics:
goldenMetrics:
- golden_metrics.yml
Expand Down
10 changes: 5 additions & 5 deletions definitions/infra-gcphttploadbalancer/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
requests:
title: Requests
requestsRate:
title: Requests per second
query:
select: sum(https.Requests)
select: (rate(sum(`https.Requests`), 1 minute)) / 60
from: GcpHttpLoadBalancerSample
facet: entityName
eventId: entityGuid
totalLatencyMs:
title: Total Latency (ms)
title: Total Latency
query:
select: average(https.TotalLatencies)
select: (average(`https.TotalLatencies`)) / 1000
from: GcpHttpLoadBalancerSample
facet: entityName
eventId: entityGuid
8 changes: 8 additions & 0 deletions definitions/infra-gcpinternalloadbalancer/definition.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
domain: INFRA
type: GCPINTERNALLOADBALANCER
goldenTags:
- gcp.projectId
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
goldenMetrics:
- golden_metrics.yml
21 changes: 21 additions & 0 deletions definitions/infra-gcpinternalloadbalancer/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Sent:
title: Sent bytes
query:
select: sum(`l3.internal.EgressBytes`)
from: GcpInternalLoadBalancerSample
facet: entityName
eventId: entityGuid
Received:
title: Received bytes
query:
select: sum(`l3.internal.IngressBytes`)
from: GcpInternalLoadBalancerSample
facet: entityName
eventId: entityGuid
latency:
title: Latency
query:
select: average(`l3.internal.RttLatencies`) / 1000
from: GcpInternalLoadBalancerSample
facet: entityName
eventId: entityGuid
26 changes: 26 additions & 0 deletions definitions/infra-gcpinternalloadbalancer/summary_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
providerAccountName:
tag:
key: providerAccountName
title: GCP Account
unit: STRING
sent:
query:
eventId: entityGuid
select: sum(`l3.internal.EgressBytes`)
from: GcpInternalLoadBalancerSample
unit: BYTES
title: Sent bytes
received:
query:
eventId: entityGuid
select: sum(`l3.internal.IngressBytes`)
from: GcpInternalLoadBalancerSample
unit: BYTES
title: Received bytes
latency:
query:
eventId: entityGuid
select: average(`l3.internal.RttLatencies`)/1000
from: GcpInternalLoadBalancerSample
unit: SECONDS
title: Latency
3 changes: 3 additions & 0 deletions definitions/infra-gcpspannerdatabase/definition.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
domain: INFRA
type: GCPSPANNERDATABASE
goldenTags:
- gcp.projectid
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
Expand Down
5 changes: 5 additions & 0 deletions definitions/infra-gcpspannerinstance/definition.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
domain: INFRA
type: GCPSPANNERINSTANCE
goldenTags:
- gcp.projectId
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
goldenMetrics:
- golden_metrics.yml
28 changes: 28 additions & 0 deletions definitions/infra-gcpspannerinstance/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Nodes:
title: Number of nodes
query:
select: latest(`instance.nodes`)
from: GcpSpannerInstanceSample
facet: entityName
eventId: entityGuid
cpuUtilization:
title: Average cpu utilization
query:
select: average(`instance.cpu.Utilization`)
from: GcpSpannerInstanceSample
facet: entityName
eventId: entityGuid
diskUsage:
title: Storage used in bytes
query:
select: average(`instance.storage.UsedBytes`)
from: GcpSpannerInstanceSample
facet: entityName
eventId: entityGuid
sessions:
title: Sessions in use
query:
select: latest(`instance.sessions`)
from: GcpSpannerInstanceSample
facet: entityName
eventId: entityGuide
5 changes: 5 additions & 0 deletions definitions/infra-gcpstoragebucket/definition.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
domain: INFRA
type: GCPSTORAGEBUCKET
goldenTags:
- gcp.projectId
- gcp.zone
compositeMetrics:
summaryMetrics:
- summary_metrics.yml
goldenMetrics:
- golden_metrics.yml
21 changes: 21 additions & 0 deletions definitions/infra-gcpstoragebucket/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
receivedBytes:
title: Received bytes
query:
select: sum(`network.ReceivedBytes`)
from: GcpStorageBucketSample
facet: entityName
eventId: entityGuid
sentBytes:
title: Sent bytes
query:
select: sum(`network.SentBytes`)
from: GcpStorageBucketSample
facet: entityName
eventId: entityGuid
apiRequests:
title: Number API calls
query:
select: sum(`api.Requests`)
from: GcpStorageBucketSample
facet: entityName
eventId: entityGuid
7 changes: 7 additions & 0 deletions definitions/infra-gcpstoragebucket/summary_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ sent:
from: GcpStorageBucketSample
unit: BYTES
title: Sent
apicalls:
query:
eventId: entityGuid
select: sum(`api.Requests`)
from: GcpStorageBucketSample
unit: COUNT
title: apiCalls

0 comments on commit 01b2776

Please sign in to comment.