Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions entity-types/infra-kafkacluster/dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"name": "GCP Managed Kafka Cluster",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this dashboard.json is referenced? generally dashboard.json should reference in definition.yml. And always we should first make changes in stg.yml files and get them merged and test properly on staging. .yml files are for production. If stg files doesn't exist then .yml will be for all.

"description": null,
"pages": [
{
"name": "GCP Managed Kafka Cluster",
"description": null,
"widgets": [
{
"title": "CPU Core Usage (vCPU/s)",
"layout": {
"column": 1,
"row": 1,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT rate(sum(`gcp.managedkafka.cpu.core_usage_time`), 1 minute) AS 'CPU (vCPU/s)' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
},
{
"title": "Offline Partitions",
"layout": {
"column": 5,
"row": 1,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT average(`gcp.managedkafka.offline_partitions`) AS 'Offline Partitions' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
},
{
"title": "Request Latency p99 (ms)",
"layout": {
"column": 9,
"row": 1,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT average(`gcp.managedkafka.request_latencies`) AS 'p99 (ms)' WHERE `entity.guid` = '{{entity.guid}}' AND `metric.percentile` = '99' TIMESERIES AUTO"
}
]
}
},
{
"title": "Messages In",
"layout": {
"column": 1,
"row": 4,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT sum(`gcp.managedkafka.cluster_message_in_count`) AS 'Messages In' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
},
{
"title": "Bytes In/Out",
"layout": {
"column": 5,
"row": 4,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT sum(`gcp.managedkafka.cluster_byte_in_count`) AS 'Bytes In', sum(`gcp.managedkafka.cluster_byte_out_count`) AS 'Bytes Out' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
},
{
"title": "Memory Usage",
"layout": {
"column": 9,
"row": 4,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT average(`gcp.managedkafka.memory.usage`) AS 'Memory (bytes)' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
}
]
}
]
}
33 changes: 32 additions & 1 deletion entity-types/infra-kafkacluster/golden_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ partitionCount:
from: Metric
where: metricName='kafka.cluster.partition.count' and getField(kafka.cluster.partition.count , 'latest') > 0
eventId: entity.guid
gcp:
select: latest(gcp.managedkafka.partitions)
from: Metric
eventId: entity.guid
eventName: entity.name

offlinePartitions:
title: Offline partitions
Expand All @@ -56,4 +61,30 @@ offlinePartitions:
select: max(kafka.partition.offline)
from: Metric
where: metricName='kafka.partition.offline'
eventId: entity.guid
eventId: entity.guid
gcp:
select: max(gcp.managedkafka.offline_partitions)
from: Metric
eventId: entity.guid
eventName: entity.name

gcpCpuUsage:
title: CPU Usage (vCPU/s)
unit: COUNT
queries:
gcp:
select: rate(sum(gcp.managedkafka.cpu.core_usage_time), 1 minute)
from: Metric
eventId: entity.guid
eventName: entity.name

gcpRequestLatency:
title: Request Latency p99 (ms)
unit: MS
queries:
gcp:
select: average(gcp.managedkafka.request_latencies)
from: Metric
where: "metric.percentile = '99'"
eventId: entity.guid
eventName: entity.name
30 changes: 26 additions & 4 deletions entity-types/infra-kafkacluster/summary_metrics.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
providerAccountName:
tag:
key: providerAccountName
title: GCP account
unit: STRING

gcpProjectId:
tag:
key: gcp.projectId
title: GCP Project ID
unit: STRING

brokers:
goldenMetric: brokerCount
unit: COUNT
title: Brokers

topicCount:
title: Topics
unit: COUNT
goldenMetric: TopicCount
unit: COUNT
title: Topics

partitionCount:
goldenMetric: partitionCount
unit: COUNT
title: Partitions count
title: Partitions

offlinePartitions:
goldenMetric: offlinePartitions
unit: COUNT
title: Offline partitions
title: Offline Partitions

gcpCpuUsage:
goldenMetric: gcpCpuUsage
unit: COUNT
title: CPU Usage (vCPU/s)

gcpRequestLatency:
goldenMetric: gcpRequestLatency
unit: MS
title: Request Latency p99 (ms)
112 changes: 112 additions & 0 deletions entity-types/infra-kafkatopic/dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"name": "GCP Managed Kafka Topic",
"description": null,
"pages": [
{
"name": "GCP Managed Kafka Topic",
"description": null,
"widgets": [
{
"title": "Messages In",
"layout": {
"column": 1,
"row": 1,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT sum(`gcp.managedkafka.message_in_count`) AS 'Messages In' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to keep entity.guid filter in entity platform dashboard files.

}
]
}
},
{
"title": "Bytes In",
"layout": {
"column": 5,
"row": 1,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT sum(`gcp.managedkafka.byte_in_count`) AS 'Bytes In' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
},
{
"title": "Bytes Out",
"layout": {
"column": 9,
"row": 1,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT sum(`gcp.managedkafka.byte_out_count`) AS 'Bytes Out' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
},
{
"title": "Topic Errors",
"layout": {
"column": 1,
"row": 4,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT sum(`gcp.managedkafka.topic_error_count`) AS 'Errors' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
},
{
"title": "Request Count",
"layout": {
"column": 5,
"row": 4,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT sum(`gcp.managedkafka.topic_request_count`) AS 'Requests' WHERE `entity.guid` = '{{entity.guid}}' TIMESERIES AUTO"
}
]
}
}
]
}
]
}
Loading