Skip to content

Commit a04113b

Browse files
committed
fix(gcprouternatgateway): correct metric prefix gcp.compute.nat → gcp.router.nat
gcp-polling-v2 polls NAT metrics under router.googleapis.com (see gcp-entity-definitions.yml: monitored_resource_type nat_gateway maps to metric_prefix router.googleapis.com), so NR emits them as gcp.router.nat.*, not gcp.compute.nat.*. Golden metrics + dashboard were querying the wrong prefix and returning zero rows. - golden_metrics.yml: 3 metrics - dashboard.json: 9 widget queries (open_connections, sent_bytes_count, dropped_sent_packets_count, allocated_ports, received_bytes_count, new_connections_count, port_usage)
1 parent e54f673 commit a04113b

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

entity-types/infra-gcprouternatgateway/dashboard.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"nrqlQueries": [
2828
{
2929
"accountId": 0,
30-
"query": "SELECT sum(`gcp.compute.nat.open_connections`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
30+
"query": "SELECT sum(`gcp.router.nat.open_connections`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
3131
}
3232
],
3333
"yAxisLeft": {
@@ -56,7 +56,7 @@
5656
"nrqlQueries": [
5757
{
5858
"accountId": 0,
59-
"query": "SELECT sum(`gcp.compute.nat.sent_bytes_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
59+
"query": "SELECT sum(`gcp.router.nat.sent_bytes_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
6060
}
6161
],
6262
"yAxisLeft": {
@@ -85,7 +85,7 @@
8585
"nrqlQueries": [
8686
{
8787
"accountId": 0,
88-
"query": "SELECT sum(`gcp.compute.nat.dropped_sent_packets_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
88+
"query": "SELECT sum(`gcp.router.nat.dropped_sent_packets_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
8989
}
9090
],
9191
"yAxisLeft": {
@@ -114,7 +114,7 @@
114114
"nrqlQueries": [
115115
{
116116
"accountId": 0,
117-
"query": "SELECT sum(`gcp.compute.nat.allocated_ports`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.nat_ip` TIMESERIES auto"
117+
"query": "SELECT sum(`gcp.router.nat.allocated_ports`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.nat_ip` TIMESERIES auto"
118118
}
119119
],
120120
"yAxisLeft": {
@@ -143,7 +143,7 @@
143143
"nrqlQueries": [
144144
{
145145
"accountId": 0,
146-
"query": "SELECT sum(`gcp.compute.nat.open_connections`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.ip_protocol` TIMESERIES auto"
146+
"query": "SELECT sum(`gcp.router.nat.open_connections`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.ip_protocol` TIMESERIES auto"
147147
}
148148
],
149149
"yAxisLeft": {
@@ -172,7 +172,7 @@
172172
"nrqlQueries": [
173173
{
174174
"accountId": 0,
175-
"query": "SELECT sum(`gcp.compute.nat.dropped_sent_packets_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.reason` TIMESERIES auto"
175+
"query": "SELECT sum(`gcp.router.nat.dropped_sent_packets_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.reason` TIMESERIES auto"
176176
}
177177
],
178178
"yAxisLeft": {
@@ -201,7 +201,7 @@
201201
"nrqlQueries": [
202202
{
203203
"accountId": 0,
204-
"query": "SELECT sum(`gcp.compute.nat.received_bytes_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
204+
"query": "SELECT sum(`gcp.router.nat.received_bytes_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' TIMESERIES auto"
205205
}
206206
],
207207
"yAxisLeft": {
@@ -230,7 +230,7 @@
230230
"nrqlQueries": [
231231
{
232232
"accountId": 0,
233-
"query": "SELECT sum(`gcp.compute.nat.new_connections_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.ip_protocol` TIMESERIES auto"
233+
"query": "SELECT sum(`gcp.router.nat.new_connections_count`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.ip_protocol` TIMESERIES auto"
234234
}
235235
],
236236
"yAxisLeft": {
@@ -259,7 +259,7 @@
259259
"nrqlQueries": [
260260
{
261261
"accountId": 0,
262-
"query": "SELECT max(`gcp.compute.nat.port_usage`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.ip_protocol` TIMESERIES auto"
262+
"query": "SELECT max(`gcp.router.nat.port_usage`) FROM Metric WHERE entity.guid = '{{entity.id}}' FACET `metric.ip_protocol` TIMESERIES auto"
263263
}
264264
],
265265
"yAxisLeft": {

entity-types/infra-gcprouternatgateway/golden_metrics.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ openConnections:
33
unit: COUNT
44
queries:
55
gcp:
6-
select: sum(`gcp.compute.nat.open_connections`)
6+
select: sum(`gcp.router.nat.open_connections`)
77
from: Metric
88
eventId: entity.guid
99
eventName: entity.name
@@ -12,7 +12,7 @@ sentBytesCount:
1212
unit: BYTES
1313
queries:
1414
gcp:
15-
select: sum(`gcp.compute.nat.sent_bytes_count`)
15+
select: sum(`gcp.router.nat.sent_bytes_count`)
1616
from: Metric
1717
eventId: entity.guid
1818
eventName: entity.name
@@ -21,7 +21,7 @@ droppedSentPacketsCount:
2121
unit: COUNT
2222
queries:
2323
gcp:
24-
select: sum(`gcp.compute.nat.dropped_sent_packets_count`)
24+
select: sum(`gcp.router.nat.dropped_sent_packets_count`)
2525
from: Metric
2626
eventId: entity.guid
2727
eventName: entity.name

0 commit comments

Comments
 (0)