Skip to content

Commit

Permalink
Merge branch 'main' into NR-293100-2
Browse files Browse the repository at this point in the history
  • Loading branch information
AravindKumar8520 authored Nov 25, 2024
2 parents 791811f + b8ac940 commit f63b938
Show file tree
Hide file tree
Showing 30 changed files with 551 additions and 44 deletions.
12 changes: 12 additions & 0 deletions docs/entities/synthesis.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ synthesis:

You can also change the name of the tag to another value, rather than using the name in the attribute. In general, we suggest not to use this configuration unless you are trying to use more standard namings, since sometimes it's difficult for the user to see the difference between entity tags and telemetry attributes, and changing the names could cause even more confusion.

This is the relevant syntax:
```yaml
synthesis:
rules:
- identifier: someIdAttribute
name: someNameAttribute
tags:
originalAttributeName:
entityTagNames: [desiredTagName1, desiredTagName2]
```
The above example will result in an entity having two tags, `desiredTagName1` and `desiredTagName2`, with the value present in the `originalAttributeName` attribute from the processed data point.

A good use case for this feature is `CONTAINER`: A container has different sources (docker, kubernetes, etc.), and we rename the tags to use a standard naming and a "per source" name.

```yaml
Expand Down
2 changes: 1 addition & 1 deletion entity-types/apm-application/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
responseTimeMs:
title: Response time (ms)
title: Response time
unit: MS
query:
select: average(apm.service.transaction.duration) * 1000 AS 'Response time (ms)'
Expand Down
6 changes: 6 additions & 0 deletions entity-types/autoflows-workflow/definition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
domain: AUTOFLOWS
type: WORKFLOW

configuration:
entityExpirationTime: MANUAL
alertable: true
2 changes: 0 additions & 2 deletions entity-types/ext-nvidia_jetson/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ synthesis:
conditions:
- attribute: eventType
value: jetsonTegrastats
- attribute: metricName
value: "ram_used"
tags:
agentVersion:
entityTagName: newrelic.agentVersion
Expand Down
6 changes: 3 additions & 3 deletions entity-types/ext-service/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
throughput:
title: Throughput (rpm)
title: Throughput
unit: REQUESTS_PER_MINUTE
queries:
opentelemetry:
Expand All @@ -19,7 +19,7 @@ throughput:
select: rate(count(http.server.duration), 1 minute)
from: Metric
errorRate:
title: Error rate (%)
title: Error rate
unit: PERCENTAGE
queries:
opentelemetry:
Expand All @@ -39,7 +39,7 @@ errorRate:
select: (filter(count(http.server.duration), where numeric(http.status_code) >= 400 AND numeric(http.status_code) != 404) * 100) / count(http.server.duration)
from: Metric
responseTimeMs:
title: Response time (ms)
title: Response time
unit: MS
queries:
opentelemetry:
Expand Down
29 changes: 29 additions & 0 deletions entity-types/infra-awsalb/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,32 @@ goldenTags:
configuration:
entityExpirationTime: DAILY
alertable: true

synthesis:
rules:
# Legacy API Polling entities not using the ARN to compute the entity.guid, but directly providing the entityId
- identifier: entityId
name: aws.alb.loadBalancer
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: entityId
present: true
tags:
aws.Arn:
# Metrics Streams and API Polling entities using the ARN to compute the entity.guid
- identifier: aws.Arn
name: aws.alb.loadBalancer
encodeIdentifierInGUID: true
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: entityId
present: false
tags:
aws.Arn:
35 changes: 35 additions & 0 deletions entity-types/infra-awscloudfrontdistribution/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,38 @@ goldenTags:
configuration:
entityExpirationTime: DAILY
alertable: true

synthesis:
rules:
# Legacy API Polling entities not using the ARN to compute the entity.guid, but directly providing the entityId
- identifier: entityId
name: aws.cloudfront.DistributionId
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: aws.cloudfront.DistributionId
present: true
- attribute: entityId
present: true
tags:
aws.Arn:
aws.cloudfront.DistributionId:
# Metrics Streams and API Polling entities using the ARN to compute the entity.guid
- identifier: aws.Arn
name: aws.cloudfront.DistributionId
encodeIdentifierInGUID: true
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: aws.cloudfront.DistributionId
present: true
- attribute: entityId
present: false
tags:
aws.Arn:
aws.cloudfront.DistributionId:
33 changes: 33 additions & 0 deletions entity-types/infra-awselb/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,36 @@ goldenTags:
configuration:
entityExpirationTime: DAILY
alertable: true

synthesis:
rules:
# Legacy API Polling entities not using the ARN to compute the entity.guid, but directly providing the entityId
- identifier: entityId
name: aws.elb.loadBalancer
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: entityId
present: true
tags:
aws.Arn:
aws.elb.loadBalancer:
entityTagNames: [ aws.elb.LoadBalancerName ]
# Metrics Streams and API Polling entities using the ARN to compute the entity.guid
- identifier: aws.Arn
name: aws.elb.loadBalancer
encodeIdentifierInGUID: true
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: entityId
present: false
tags:
aws.Arn:
aws.elb.loadBalancer:
entityTagNames: [ aws.elb.LoadBalancerName ]
37 changes: 37 additions & 0 deletions entity-types/infra-awslambdafunction/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,40 @@ goldenTags:
configuration:
entityExpirationTime: DAILY
alertable: true

synthesis:
rules:
# Legacy API Polling entities not using the ARN to compute the entity.guid, but directly providing the entityId
- identifier: entityId
name: aws.lambda.FunctionName
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: aws.lambda.FunctionName
present: true
- attribute: entityId
present: true
tags:
aws.Arn:
# Used in AWSLAMBDAFUNCTION.yml for entity relationship candidates
aws.lambda.FunctionName:
# Metrics Streams and API Polling entities using the ARN to compute the entity.guid
- identifier: aws.Arn
name: aws.lambda.FunctionName
encodeIdentifierInGUID: true
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: aws.lambda.FunctionName
present: true
- attribute: entityId
present: false
tags:
aws.Arn:
# Used in AWSLAMBDAFUNCTION.yml for entity relationship candidates
aws.lambda.FunctionName:
20 changes: 10 additions & 10 deletions entity-types/infra-awsmemorydbcluster/golden_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bytesUsedForMemoryDb:
unit: BYTES
queries:
aws:
select: latest(aws.memorydb.BytesUsedForMemoryDB)
select: average(aws.memorydb.BytesUsedForMemoryDB)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -12,7 +12,7 @@ networkPacketsPerSecondAllowanceExceeded:
unit: COUNT
queries:
aws:
select: latest(aws.memorydb.NetworkPacketsPerSecondAllowanceExceeded)
select: average(aws.memorydb.NetworkPacketsPerSecondAllowanceExceeded)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -21,7 +21,7 @@ networkBandwidthOutAllowanceExceeded:
unit: COUNT
queries:
aws:
select: latest(aws.memorydb.NetworkBandwidthOutAllowanceExceeded)
select: average(aws.memorydb.NetworkBandwidthOutAllowanceExceeded)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -30,7 +30,7 @@ engineCpuUtilization:
unit: PERCENTAGE
queries:
aws:
select: latest(aws.memorydb.EngineCPUUtilization)
select: average(aws.memorydb.EngineCPUUtilization)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -39,7 +39,7 @@ replicationBytes:
unit: BYTES
queries:
aws:
select: latest(aws.memorydb.ReplicationBytes)
select: average(aws.memorydb.ReplicationBytes)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -48,7 +48,7 @@ networkConntrackAllowanceExceeded:
unit: COUNT
queries:
aws:
select: latest(aws.memorydb.NetworkConntrackAllowanceExceeded)
select: average(aws.memorydb.NetworkConntrackAllowanceExceeded)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -57,7 +57,7 @@ replicationLag:
unit: SECONDS
queries:
aws:
select: latest(aws.memorydb.ReplicationLag)
select: average(aws.memorydb.ReplicationLag)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -66,7 +66,7 @@ networkBytesIn:
unit: BYTES
queries:
aws:
select: latest(aws.memorydb.NetworkBytesIn)
select: average(aws.memorydb.NetworkBytesIn)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -75,7 +75,7 @@ replicationDelayedWriteCommands:
unit: COUNT
queries:
aws:
select: latest(aws.memorydb.ReplicationDelayedWriteCommands)
select: average(aws.memorydb.ReplicationDelayedWriteCommands)
from: Metric
eventId: entity.guid
eventName: entity.name
Expand All @@ -84,7 +84,7 @@ databaseMemoryUsagePercentage:
unit: PERCENTAGE
queries:
aws:
select: latest(aws.memorydb.DatabaseMemoryUsagePercentage)
select: average(aws.memorydb.DatabaseMemoryUsagePercentage)
from: Metric
eventId: entity.guid
eventName: entity.name
29 changes: 29 additions & 0 deletions entity-types/infra-awsnlb/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,32 @@ goldenTags:
configuration:
entityExpirationTime: DAILY
alertable: true

synthesis:
rules:
# Legacy API Polling entities not using the ARN to compute the entity.guid, but directly providing the entityId
- identifier: entityId
name: aws.nlb.loadBalancer
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: entityId
present: true
tags:
aws.Arn:
# Metrics Streams and API Polling entities using the ARN to compute the entity.guid
- identifier: aws.Arn
name: aws.nlb.loadBalancer
encodeIdentifierInGUID: true
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: entityId
present: false
tags:
aws.Arn:
35 changes: 35 additions & 0 deletions entity-types/infra-awsrdsdbinstance/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,38 @@ goldenTags:
configuration:
entityExpirationTime: DAILY
alertable: true

synthesis:
rules:
# Legacy API Polling entities not using the ARN to compute the entity.guid, but directly providing the entityId
- identifier: entityId
name: aws.rds.DBInstanceIdentifier
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.rds.DBInstanceIdentifier
present: true
- attribute: aws.Arn
present: true
- attribute: entityId
present: true
tags:
aws.Arn:
aws.rds.DBInstanceIdentifier:
# Metrics Streams and API Polling entities using the ARN to compute the entity.guid
- identifier: aws.Arn
name: aws.rds.DBInstanceIdentifier
encodeIdentifierInGUID: true
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: aws.rds.DBInstanceIdentifier
present: true
- attribute: entityId
present: false
tags:
aws.Arn:
aws.rds.DBInstanceIdentifier:
Loading

0 comments on commit f63b938

Please sign in to comment.