Skip to content

Commit

Permalink
Merge branch 'main' into NR-293100-3
Browse files Browse the repository at this point in the history
  • Loading branch information
AravindKumar8520 authored Dec 11, 2024
2 parents fac6cb8 + ea40f7c commit 972f541
Show file tree
Hide file tree
Showing 48 changed files with 992 additions and 46 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
137 changes: 137 additions & 0 deletions entity-types/ext-fluentbit/dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"name": "Kubernetes Fluent Bit monitoring",
"description": null,
"pages": [
{
"name": "Overview",
"description": null,
"widgets": [
{
"title": "",
"layout": {
"column": 1,
"row": 1,
"width": 6,
"height": 6
},
"visualization": {
"id": "viz.markdown"
},
"rawConfiguration": {
"text": "# README\n\n## About this page\nThis page represents most of [Fluent Bit's internal metrics](https://docs.fluentbit.io/manual/administration/monitoring#for-v2-metrics). The metric representations are grouped by categories and faceted by each plugin instance where appropriate.\n\n## How to filter\n1. Select the Kubernetes cluster you want to troubleshoot in the \"Cluster Name\" variable above.\n2. [OPTIONAL] You can use any of the values in the `Node name` and `Pod name` columns on the \"Fluent Bit version\" table to further filter the metrics displayed in the graphs below. To do so, you need to enable [facet filtering](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/filter-new-relic-one-dashboards-facets/) on that table by clicking on the \"Edit\" submenu and select \"Filter the current dashboard\" under \"Facet Linking\". \n\n## Legend\n### Metric dimensions\n- **name**: the name of the Fluent Bit plugin. Version 1.21.0 of our Helm chart names them according to the plugin names described in the following section.\n- **pod_name**: the `newrelic-logging` pod (Fluent Bit instance) that emitted this metric.\n- **node_name**: physical Kubernetes node where the `newrelic-logging` pod is running.\n\n### Plugin names\n- **pod-logs-tailer**: `tail` *INPUT* plugin normally reading from `/var/log/containers/*.log`\n- **kubernetes-enricher**: `kubernetes` *FILTER* plugin that queries the Kubernetes API to enrich the logs with pod/container metadata.\n- **node-attributes-enricher**: `record_modifier` *FILTER* plugin that enriches logs with `cluster_name`.\n- **kubernetes-attribute-lifter** (only when in low data mode): `nest` *FILTER* plugin that lifts all the keys under `kubernetes`. This plugin is transparent to the final shape of the log.\n- **node-attributes-enricher-filter** (only when in low data mode): same as node-attributes-enricher`, but it also removes attributes that are not strictly necessary for correct platform functioning.\n- **newrelic-logs-forwarder**: `newrelic` *OUTPUT* plugin that sends logs to the New Relic Logs API"
}
},
{
"title": "Fluent Bit version",
"layout": {
"column": 7,
"row": 1,
"width": 6,
"height": 3
},
"visualization": {
"id": "viz.table"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT latest(os) as 'OS', latest(version) as 'FB version', latest(cluster_name) FROM Metric where metricName = 'fluentbit_build_info' AND cluster_name IN ({{cluster_name}}) since 1 hour ago facet pod_name, node_name limit max"
}
],
"platformOptions": {
"ignoreTimeRange": false
}
}
}, {
"title": "Fluent Bit uptime",
"layout": {
"column": 7,
"row": 4,
"width": 6,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT latest(fluentbit_uptime) FROM Metric where cluster_name IN ({{cluster_name}}) facet pod_name timeseries"
}
],
"platformOptions": {
"ignoreTimeRange": false
},
"yAxisLeft": {
"zero": true
},
"yAxisRight": {
"zero": true
}
}
},
{
"title": "",
"layout": {
"column": 1,
"row": 7,
"width": 12,
"height": 1
},
"visualization": {
"id": "viz.markdown"
},
"rawConfiguration": {
"text": "# INPUTS"
}
},
{
"title": "Input byte rate (bytes/minute)",
"layout": {
"column": 1,
"row": 8,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.line"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "SELECT rate(sum(fluentbit_input_bytes_total), 1 minute) as 'bytes/minute' FROM Metric where name != 'fb-metrics-collector' and cluster_name IN ({{cluster_name}}) timeseries max facet name, pod_name"
}
],
"platformOptions": {
"ignoreTimeRange": false
},
"yAxisLeft": {
"zero": true
},
"yAxisRight": {
"zero": true
}
}
}
]
}
]
}
16 changes: 16 additions & 0 deletions entity-types/ext-fluentbit/definition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
domain: EXT
type: FLUENTBIT
synthesis:
rules:
- compositeIdentifier:
separator: "/"
attributes:
- namespace
- helm_release_name
name: helm_release_name
encodeIdentifierInGUID: true
conditions:
- attribute: eventType
value: Metric
- attribute: metricName
prefix: fluentbit_
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
5 changes: 5 additions & 0 deletions entity-types/ext-onboarding_application/definition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
domain: EXT
type: ONBOARDING_APPLICATION

configuration:
entityExpirationTime: FOUR_HOURS
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
33 changes: 33 additions & 0 deletions entity-types/infra-awsalb/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,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.alb.loadBalancer
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: aws.alb.loadBalancer
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: aws.alb.loadBalancer
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:
37 changes: 37 additions & 0 deletions entity-types/infra-awselb/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,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.elb.loadBalancer
encodeIdentifierInGUID: false
conditions:
- attribute: eventType
prefix: Log
- attribute: aws.Arn
present: true
- attribute: aws.elb.loadBalancer
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: aws.elb.loadBalancer
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:
Loading

0 comments on commit 972f541

Please sign in to comment.