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
6 changes: 6 additions & 0 deletions entity-types/infra-elasticsearchcluster/definition.stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ synthesis:
value: "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver"
- attribute: elasticsearch.cluster.name
present: true
- attribute: elasticsearch.node.name
present: false
tags:
otel.library.name:
entityTagName: instrumentation.name
Expand All @@ -42,6 +44,8 @@ synthesis:
value: "otelcol/elasticsearchreceiver"
- attribute: elasticsearch.cluster.name
present: true
- attribute: elasticsearch.node.name
present: false
tags:
otel.library.name:
entityTagName: instrumentation.name
Expand All @@ -60,6 +64,8 @@ synthesis:
value: 'api.logs.otlp'
- attribute: elasticsearch.cluster.name
present: true
- attribute: elasticsearch.node.name
present: false
tags:
instrumentation.provider:
entityTagName: instrumentation.name
Expand Down
20 changes: 12 additions & 8 deletions entity-types/infra-elasticsearchcluster/golden_metrics.stg.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
clusterHealth:
title: Cluster Health
displayAsValue: true
queries:
opentelemetry:
select: latest(status)
select: latest(elasticsearch.cluster.health)
from: Metric
where: metricName = 'elasticsearch.cluster.health'
facet: status
eventId: entity.guid
eventName: entity.name
newRelic:
Expand All @@ -18,6 +19,7 @@ clusterDataNode:
opentelemetry:
select: average(elasticsearch.cluster.data_nodes)
from: Metric
where: metricName = 'elasticsearch.cluster.data_nodes'
eventId: entity.guid
eventName: entity.name
newRelic:
Expand All @@ -31,6 +33,7 @@ clusterNode:
opentelemetry:
select: average(elasticsearch.cluster.nodes)
from: Metric
where: metricName = 'elasticsearch.cluster.nodes'
eventId: entity.guid
eventName: entity.name
newRelic:
Expand All @@ -44,7 +47,7 @@ clusterActiveShard:
opentelemetry:
select: average(elasticsearch.cluster.shards)
from: Metric
where: state='active'
where: metricName = 'elasticsearch.cluster.shards' AND state='active'
eventId: entity.guid
eventName: entity.name
clusterInitializingShard:
Expand All @@ -53,7 +56,7 @@ clusterInitializingShard:
opentelemetry:
select: average(elasticsearch.cluster.shards)
from: Metric
where: state='initializing'
where: metricName = 'elasticsearch.cluster.shards' AND state='initializing'
eventId: entity.guid
eventName: entity.name
clusterPrimaryActiveShard:
Expand All @@ -62,7 +65,7 @@ clusterPrimaryActiveShard:
opentelemetry:
select: average(elasticsearch.cluster.shards)
from: Metric
where: state='active_primary'
where: metricName = 'elasticsearch.cluster.shards' AND state='active_primary'
eventId: entity.guid
eventName: entity.name
clusterRelocatingShard:
Expand All @@ -71,7 +74,7 @@ clusterRelocatingShard:
opentelemetry:
select: average(elasticsearch.cluster.shards)
from: Metric
where: state='relocating'
where: metricName = 'elasticsearch.cluster.shards' AND state='relocating'
eventId: entity.guid
eventName: entity.name
clusterUnassignedShard:
Expand All @@ -80,7 +83,7 @@ clusterUnassignedShard:
opentelemetry:
select: average(elasticsearch.cluster.shards)
from: Metric
where: state='unassigned'
where: metricName = 'elasticsearch.cluster.shards' AND state='unassigned'
eventId: entity.guid
eventName: entity.name
newRelic:
Expand All @@ -89,10 +92,11 @@ clusterUnassignedShard:
eventId: entityGuid
eventName: entityName
clusterPendingTask:
title: Cluster Pending Task
title: Cluster Pending Tasks
queries:
opentelemetry:
select: latest(elasticsearch.cluster.pending_tasks)
from: Metric
where: metricName = 'elasticsearch.cluster.pending_tasks'
eventId: entity.guid
eventName: entity.name
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"description": null,
"widgets": [
{
"title": "Cluster Status",
"title": "Data Nodes",
"layout": {
"column": 1,
"row": 1,
"width": 4,
"height": 3
"width": 3,
"height": 1
},
"visualization": {
"id": "viz.billboard"
Expand All @@ -21,96 +21,116 @@
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT latest(status)"
"query": "FROM Metric SELECT latest(elasticsearch.cluster.data_nodes) AS 'Data Nodes'"
}
]
}
},
{
"title": "Node Count",
"title": "Total Nodes",
"layout": {
"column": 5,
"column": 4,
"row": 1,
"width": 4,
"height": 3
"width": 3,
"height": 1
},
"visualization": {
"id": "viz.table"
"id": "viz.billboard"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT \n latest(elasticsearch.cluster.nodes) AS 'Total Nodes', \n latest(elasticsearch.cluster.data_nodes) AS 'Data Nodes' \nFROM Metric"
"query": "FROM Metric SELECT latest(elasticsearch.cluster.nodes) AS 'Total Nodes'"
}
]
}
},
{
"title": "Pending Task",
"title": "In-Flight Fetches",
"layout": {
"column": 9,
"column": 7,
"row": 1,
"width": 4,
"height": 3
"width": 3,
"height": 1
},
"visualization": {
"id": "viz.line"
"id": "viz.billboard"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT latest(elasticsearch.cluster.pending_tasks) \nFROM Metric\nTIMESERIES"
"query": "FROM Metric SELECT latest(elasticsearch.cluster.in_flight_fetch) AS 'In-Flight Fetches'"
}
]
}
},
{
"title": "Shards",
"title": "Pending Tasks",
"layout": {
"column": 10,
"row": 1,
"width": 3,
"height": 1
},
"visualization": {
"id": "viz.billboard"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT latest(elasticsearch.cluster.pending_tasks) AS 'Pending Tasks'"
}
]
}
},
{
"title": "Cluster Health",
"layout": {
"column": 1,
"row": 4,
"row": 2,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.pie"
"id": "viz.billboard"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT latest(elasticsearch.cluster.shards) \nFROM Metric\nFACET state"
"query": "FROM Metric SELECT \n IF(latest(status) = 'green', '🟢 GREEN',\n IF(latest(status) = 'yellow', '🟡 YELLOW',\n '🔴 RED'\n)) AS 'Cluster Health'"
}
]
}
},
{
"title": "Document count",
"title": "Shards",
"layout": {
"column": 5,
"row": 4,
"row": 2,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
"id": "viz.pie"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT latest(elasticsearch.index.documents) AS 'Total Documents in cluster'\nFROM Metric \nWHERE elasticsearch.index.name = '_all' AND aggregation = 'primary_shards' TIMESERIES "
"query": "SELECT latest(elasticsearch.cluster.shards) \nFROM Metric\nFACET state"
}
]
}
},
{
"title": "Indexing & Search Rate(op/sec)",
"title": "Document count",
"layout": {
"column": 9,
"row": 4,
"row": 2,
"width": 4,
"height": 3
},
Expand All @@ -121,67 +141,83 @@
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT rate(sum(elasticsearch.node.operations.completed), 1 second) FROM Metric WHERE operation IN ('index', 'query') FACET operation TIMESERIES 1 minute SLIDE BY 5 minute"
"query": "SELECT latest(elasticsearch.index.documents) AS 'Total Documents in cluster'\nFROM Metric \nWHERE elasticsearch.index.name = '_all' AND aggregation = 'primary_shards' TIMESERIES AUTO"
}
]
}
},
{
"title": "Total Size on Disk (GB)",
"title": "Pending Tasks",
"layout": {
"column": 1,
"row": 7,
"row": 5,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.billboard"
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT sum(elasticsearch.node.shards.size) / 1073741824 as 'Disk Used(GB)' FROM Metric"
"query": "SELECT latest(elasticsearch.cluster.pending_tasks) \nFROM Metric\nTIMESERIES AUTO"
}
]
}
},
{
"title": "Avg OS CPU Used (%)",
"title": "Cluster State Update Time",
"layout": {
"column": 5,
"row": 7,
"row": 5,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.billboard"
"id": "viz.line"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT average(elasticsearch.os.cpu.usage) as 'Avg OS CPU Used (%)' FROM Metric"
"query": "SELECT rate(sum(elasticsearch.cluster.state_update.time), 1 minute) / 1000 AS 'Cluster State Update Time (s/min)' FROM Metric TIMESERIES AUTO"
}
]
}
},
{
"title": "Total JVM Heap Used (GB)",
"title": "Cluster Health Status",
"layout": {
"column": 9,
"row": 7,
"row": 5,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.billboard"
"id": "viz.line"
},
"rawConfiguration": {
"colors": {
"seriesOverrides": [
{
"color": "#FF0000",
"seriesName": "red"
},
{
"color": "#008000",
"seriesName": "green"
},
{
"color": "#FFFF00",
"seriesName": "yellow"
}
]
},
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT sum(jvm.memory.heap.used) / 1073741824 as 'Total JVM Heap Used (GB)' FROM Metric"
"query": "FROM Metric SELECT latest(elasticsearch.cluster.health) FACET status TIMESERIES AUTO"
}
]
}
Expand Down
Loading