Skip to content

Commit

Permalink
Merge pull request #16727 from newrelic/daily-release/Mar-29-2024-2_16
Browse files Browse the repository at this point in the history
Daily release/mar 29 2024 2 16
  • Loading branch information
jeff-colucci authored Mar 29, 2024
2 parents fce88de + ba85105 commit 37c505f
Show file tree
Hide file tree
Showing 64 changed files with 2,690 additions and 1,665 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ You can manage alerts conditions using our NerdGraph API.
See the [NerdGraph introduction](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph) for help getting started with NerdGraph and the NerdGraph explorer.
</Callout>

This document covers the following:

* [Steps to create a NRQL condition](#steps)
* [NRQL static condition](#static-condition)
* [NRQL baseline condition](#baseline-condition)
* [Update a condition](#update-condition)
* [Update mutations](#update-mutations)
* [List and filter NRQL conditions](#filtering)
* [Singular NRQL condition queries](#singular-condition)
* [Create a description](#description)
* [Delete conditions](#delete-conditions)

## Steps to create a NRQL condition [#steps]

Follow these steps:
Expand Down Expand Up @@ -383,116 +371,116 @@ This will walk you through the procedure to create a [description](/docs/alerts/

1. Get all the conditions for a policy:

```graphql
{
actor {
account(id: YOUR_ACCOUNT_ID) {
alerts {
nrqlConditionsSearch(searchCriteria: {policyId: YOUR_POLICY_ID}) {
nrqlConditions {
id
name
description
enabled
nrql {
query
}
signal {
aggregationWindow
aggregationMethod
aggregationDelay
aggregationTimer
}
policyId
runbookUrl
terms {
operator
thresholdDuration
threshold
priority
thresholdOccurrences
```graphql
{
actor {
account(id: YOUR_ACCOUNT_ID) {
alerts {
nrqlConditionsSearch(searchCriteria: {policyId: YOUR_POLICY_ID}) {
nrqlConditions {
id
name
description
enabled
nrql {
query
}
signal {
aggregationWindow
aggregationMethod
aggregationDelay
aggregationTimer
}
policyId
runbookUrl
terms {
operator
thresholdDuration
threshold
priority
thresholdOccurrences
}
type
violationTimeLimitSeconds
}
}
type
violationTimeLimitSeconds
}
}
}
}
}
}
```
```

2. Get the details for a single condition:

```graphql
{
actor {
account(id: YOUR_ACCOUNT_ID) {
alerts {
nrqlCondition(id: "YOUR_CONDITION_ID") {
description
id
enabled
name
nrql {
query
}
signal {
aggregationWindow
aggregationMethod
aggregationDelay
aggregationTimer
}
policyId
runbookUrl
terms {
operator
priority
threshold
thresholdDuration
thresholdOccurrences
```graphql
{
actor {
account(id: YOUR_ACCOUNT_ID) {
alerts {
nrqlCondition(id: "YOUR_CONDITION_ID") {
description
id
enabled
name
nrql {
query
}
signal {
aggregationWindow
aggregationMethod
aggregationDelay
aggregationTimer
}
policyId
runbookUrl
terms {
operator
priority
threshold
thresholdDuration
thresholdOccurrences
}
type
violationTimeLimitSeconds
}
}
type
violationTimeLimitSeconds
}
}
}
}
}
```
```

3. Create a mutation with the description.

Here's an empty mutation template:

```graphql
mutation {
alertsNrqlConditionStaticUpdate(
accountId: YOUR_ACCOUNT_ID,
id: "YOUR_CONDITION_ID",
condition: { description: "" }
) {
description
}
}
```

Here's an example mutation with an included example description:

```graphql
mutation {
alertsNrqlConditionStaticUpdate(
accountId: 123456
id: "123456"
condition: {
description: "timestamp : {{timestamp}} \n accountId : {{accountId}} \n type : {{type}} \n event : {{event}} \n description : {{description}} \n policyId : {{policyId}} \n policyName: {{policyName}} \n conditionName : {{conditionName}} \n conditionId : {{conditionId}} \n product : {{product}} \n conditionType : {{conditionType}} \n RunbookUrl : {{runbookUrl}} \n nrqlQuery : {{nrqlQuery}} \n nrqlEventType : {{nrqlEventType}} \n targetID : {{targetId}} \n targetName : {{targetName}} \n commandLine : {{tag.commandLine}} \n entityGuid : {{tag.entityGuid}} \n entityName : {{tag.entityName}} \n fullHostname : {{tag.fullHostname}} \n instanceType : {{tag.instanceType}} \n processDisplayName : {{tag.processDisplayName}}"
Here's an empty mutation template:

```graphql
mutation {
alertsNrqlConditionStaticUpdate(
accountId: YOUR_ACCOUNT_ID,
id: "YOUR_CONDITION_ID",
condition: { description: "" }
) {
description
}
}
```

Here's an example mutation with an included example description:

```graphql
mutation {
alertsNrqlConditionStaticUpdate(
accountId: 123456
id: "123456"
condition: {
description: "timestamp : {{timestamp}} \n accountId : {{accountId}} \n type : {{type}} \n event : {{event}} \n description : {{description}} \n policyId : {{policyId}} \n policyName: {{policyName}} \n conditionName : {{conditionName}} \n conditionId : {{conditionId}} \n product : {{product}} \n conditionType : {{conditionType}} \n RunbookUrl : {{runbookUrl}} \n nrqlQuery : {{nrqlQuery}} \n nrqlEventType : {{nrqlEventType}} \n targetID : {{targetId}} \n targetName : {{targetName}} \n commandLine : {{tag.commandLine}} \n entityGuid : {{tag.entityGuid}} \n entityName : {{tag.entityName}} \n fullHostname : {{tag.fullHostname}} \n instanceType : {{tag.instanceType}} \n processDisplayName : {{tag.processDisplayName}}"
}
) {
description
}
}
) {
description
}
}

```

```

## Delete conditions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@ The `queryBuilder` argument is useful to construct simple queries. It allows you
1. Go to the NerdGraph [GraphiQL explorer](https://api.newrelic.com/graphiql).
2. Run a basic query to find entities that match your search criteria. For example:

```graphql
{
actor {
entitySearch(queryBuilder: {domain: APM, type: APPLICATION}) {
query
results {
entities {
name
entityType
guid
```graphql
{
actor {
entitySearch(queryBuilder: {domain: APM, type: APPLICATION}) {
query
results {
entities {
name
entityType
guid
}
}
}
}
}
}
}
```
```

### Search with freeform `query` [#search-query]

Expand All @@ -98,22 +98,22 @@ This is useful to craft more complex queries.
1. Go to the NerdGraph [GraphiQL explorer](https://api.newrelic.com/graphiql).
2. Run a basic query to find entities that match your search criteria. For example:

```graphql
query($query: String!) {
actor {
entitySearch(query: $query) {
count
results {
entities {
name
entityType
guid
```graphql
query($query: String!) {
actor {
entitySearch(query: $query) {
count
results {
entities {
name
entityType
guid
}
}
}
}
}
}
}
```
```

3. Add the following [variables](https://graphql.org/learn/queries/#variables) to the <DoNotTranslate>**Query variables**</DoNotTranslate> section in NerdGraph:

Expand Down
22 changes: 11 additions & 11 deletions src/content/docs/apm/agents/c-sdk/get-started/otel_cpp_example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ Open a terminal in the C++ container and run the following commands:
3. `cd build`
4. `rm -rf *`

```bash
cmake -DCMAKE_BUILD_TYPE=Debug \
-DWITH_METRICS_PREVIEW=ON \
-DWITH_LOGS_PREVIEW=ON \
-DCMAKE_CXX_FLAGS="-Wno-error=deprecated-declarations" \
-DWITH_OTLP=ON \
..
```
```bash
cmake -DCMAKE_BUILD_TYPE=Debug \
-DWITH_METRICS_PREVIEW=ON \
-DWITH_LOGS_PREVIEW=ON \
-DCMAKE_CXX_FLAGS="-Wno-error=deprecated-declarations" \
-DWITH_OTLP=ON \
..
```
5. `cd examples`
6. `make`
7. `cd otlp`
Expand All @@ -59,9 +59,9 @@ Verify data has arrived by querying your New Relic account data:

1. To see span data: Go to <DoNotTranslate>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Query your data**</DoNotTranslate> and enter this query:

```sql
FROM Span SELECT * where telemetry.sdk.name = 'opentelemetry'
```
```sql
FROM Span SELECT * where telemetry.sdk.name = 'opentelemetry'
```

2. View the [OpenTelemetry service](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/opentelemetry-view-your-data#explorer) by searching for `unknown_service` for more details.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ Before completing the configuration, you must first:

To complete Java agent installation on AWS Elastic Beanstalk, follow the steps for your platform:

## Tomcat Platform
## Tomcat platform

For applications deployed with the AWS Elastic Beanstalk Tomcat Platform:

1. In your WAR file, add the `newrelic.jar` and `newrelic.yml` files to `WEB-INF/lib/`.
2. Repackage and deploy your new WAR file as a new application or an update to a previous application.
3. Locate and connect to the underlaying EC2 instance. Once connected, find the path to `newrelic.jar` file using this command - ensure you search one directory at a time. Use either `/var` or `/usr` as appropriate.

```
sudo find </var | /usr> -name "newrelic.jar"
```

To pass the `-javaagent` flag to the JVM:
```
sudo find </var | /usr> -name "newrelic.jar"
```
To pass the `-javaagent` flag to the JVM:

4. In the AWS console, open the Elastic Beanstalk.
5. Select the relevant region.
Expand All @@ -47,9 +47,9 @@ To pass the `-javaagent` flag to the JVM:
8. Scroll to <DoNotTranslate>**Updates, monitoring, and logging**</DoNotTranslate> and select <DoNotTranslate>**Edit**</DoNotTranslate> in the upper right corner.
9. Scroll to <DoNotTranslate>**Platform Software**</DoNotTranslate> and add the following line to the <DoNotTranslate>**JVM Options**</DoNotTranslate> field:

```
-javaagent:/full/path/to/newrelic.jar
```
```
-javaagent:/full/path/to/newrelic.jar
```
7. Select <DoNotTranslate>**Apply**</DoNotTranslate> to save.

Your Elastic Beanstalk will then update your environment.
Expand All @@ -62,9 +62,9 @@ For applications deployed with the AWS Elastic Beanstalk Java SE Platform:

2. To use custom JVM arguments with your Java SE application, we recommend that you include a `Procfile` at the root of the source bundle of your application. See [Java SE documentation](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-platform.html) for details.

Pass the `-javaagent` flag as a JVM argument in the `Procfile`:
Pass the `-javaagent` flag as a JVM argument in the `Procfile`:

```
web:java -javaagent:path/from/bundle/root/to/newrelic.jar -jar <your-application>.jar
```
```
web:java -javaagent:path/from/bundle/root/to/newrelic.jar -jar <your-application>.jar
```
3. Repackage and deploy the source bundle to your Elastic Beanstalk.
Loading

0 comments on commit 37c505f

Please sign in to comment.