Skip to content

Commit

Permalink
Merge branch 'develop' into translations-82fd8b70
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyzanchi committed Apr 29, 2024
2 parents 8f12f6d + 012ad54 commit ac111bd
Show file tree
Hide file tree
Showing 46 changed files with 5,016 additions and 106 deletions.
6 changes: 4 additions & 2 deletions src/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { css } from '@emotion/react';
import { NavItem } from '@newrelic/gatsby-theme-newrelic';
import { Flipped, Flipper } from 'react-flip-toolkit';

const slugify = require('../../scripts/utils/slugify');

const Navigation = ({ nav, className }) => {
const subNav = nav.url === '/docs/style-guide';
const [flipKey, setFlipKey] = useState();
Expand Down Expand Up @@ -86,8 +88,8 @@ const Navigation = ({ nav, className }) => {
const addFlipIds = (pages, parentKey = []) =>
pages?.map((page) => ({
...page,
flipId: [...parentKey, page.title],
pages: addFlipIds(page.pages, [...parentKey, page.title]),
flipId: [...parentKey, slugify(page.title)],
pages: addFlipIds(page.pages, [...parentKey, slugify(page.title)]),
}));

export default Navigation;
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ The following template maps the issue payload to the payload used by the classic
The following template maps the issue payload to the default payload used by the classic PagerDuty channel. You can use some or all of the dynamic variables, along with any custom variables, to define your own payload.
```handlbars
```handlebars
{
{{#if nrAccountId}}"account_id": {{nrAccountId}},{{/if}}
"account_name": {{json accumulations.tag.account.[0]}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ For some [types of conditions](#requirements), you can create a custom incident
* Define next steps
* Add metadata to downstream systems

The <DoNotTranslate>**Custom incident description**</DoNotTranslate> field allows you to use a general template structure that, when an incident is generated, [substitutes the generic sections with specific values](#substitution-format). For example, let's say you used this in a description:
The <DoNotTranslate>**Custom incident description**</DoNotTranslate> field allows you to use a general template structure that, when an incident is generated, substitutes the generic sections with specific values. For example, let's say you used this in a description:

```
```handlebars
This is my condition name : {{conditionName}}
The hostname is : {{tag.fullHostname}}
```
Expand Down Expand Up @@ -71,8 +71,8 @@ You can create a custom incident description using [the dedicated field for NRQL

Here's a custom incident description template example:

```
this is my condition name : {{conditionName}}
```handlebars
This is my condition name : {{conditionName}}
The hostname is : {{tag.fullHostname}}
Owning Team: {{tag.label.owning_team}}
Product: {{tag.label.product}}
Expand All @@ -96,20 +96,20 @@ The attributes you can use in a custom incident description are a subset of attr

* Incident event attributes: For any of the [standard attributes available for use in a custom incident description](/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/understand-technical-concepts/incident-event-attributes), use the format `{{AN_ATTRIBUTE}}`. For example:

```
```handlebars
The target name is : {{targetName}}
```
* Tag attributes: For tags, you would use the format `{{tag.TAG_NAME}}`. There are two types of tags:

* Entity-related tags: <DoNotTranslate>**For infrastructure conditions only.**</DoNotTranslate> You can find available [entity-related tags](/docs/new-relic-one/use-new-relic-one/core-concepts/tagging-use-tags-organize-group-what-you-monitor#) by going to the [entity explorer](/docs/new-relic-one/use-new-relic-one/ui-data/new-relic-one-entity-explorer-view-performance-across-apps-services-hosts) and looking under a service's <DoNotTranslate>**Metadata and tags**</DoNotTranslate>, or by viewing incident details. Here's an example of using tags in a custom incident description:

```
```handlebars
The AWS region is : {{tag.aws.awsRegion}}
Responsible team : {{tag.label.owning_team}}
```
* Facet clause tags: <DoNotTranslate>**For NRQL conditions only.**</DoNotTranslate> If a NRQL condition uses a `FACET` clause, you can use `tag` formatting to use those values in your custom incident description. For example, if the NRQL query included `FACET hostName, cluster`, you could then use this:

```
```handlebars
The host is : {{tag.hostName}}
The cluster is : {{tag.cluster}}
```
Expand All @@ -122,19 +122,27 @@ You can create a custom incident description on a NRQL alert condition through a

Here's an empty mutation template:

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

Here's an example mutation with a custom incident 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}}"}) {
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
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,14 @@ Here is an example of the API request format and JSON response.
>
Use this format for your API call:

```
```sh
curl -X PUT 'https://api.newrelic.com/v2/alerts_entity_conditions/12345.json' \
-H "X-Api-Key:<a href='/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key'>$API_KEY</a>" -i \
-H 'X-Api-Key:$API_KEY' -i \
-H 'Content-Type: application/json' \
-G -d 'entity_type=application&condition_id=234567'
```

* Replace `$API_KEY` with your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key).
</Collapser>

<Collapser
Expand All @@ -172,27 +174,27 @@ Here is an example of the API request format and JSON response.
>
The API returns the response as JSON.

```
```json
{
"condition": [
{
"id": 234567,
"type": "apm_app_metric",
"name": "demo",
"enabled": true,
"entities": [
12345
],
"metric": "apdex",
"condition_scope": "instance", <---<<< scope indicator
"violation_close_timer": 24,
"terms": [
"id": 234567,
"type": "apm_app_metric",
"name": "demo",
"enabled": true,
"entities": [
12345
],
"metric": "apdex",
"condition_scope": "instance", <---<<< scope indicator
"violation_close_timer": 24,
"terms": [
{
"duration": "5",
"operator": "above",
"priority": "critical",
"threshold": "1",
"time_function": "all"
"duration": "5",
"operator": "above",
"priority": "critical",
"threshold": "1",
"time_function": "all"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,24 @@ For [scripted browser monitors](#create-scripted-browser):
* RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. "100" is the only accepted value.
* SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.

For [step monitors](#create-step):

* RUNTIME_TYPE: The runtime type used by your monitor. "CHROME_BROWSER" is the only accepted value.
* RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. "100" is the only accepted value.
* SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.

For [certificate check monitors](#create-certificate-check):

* DAYS_UNTIL_EXPIRATION: Notifies you when you need to update your certificate. For example, if you wanted a notification 30 days before the certificate expires, you would input 30.
* RUNTIME_TYPE: The runtime type used by your monitor. "NODE_API" is the only accepted value.
* RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. The only accepted value is `16.10`.
* SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.

For [broken link monitors](#create-broken-links):

* RUNTIME_TYPE: The runtime type used by your monitor. "NODE_API" is the only accepted value.
* RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. The only accepted value is `16.10`.
* SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.

For all monitors:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ For applications deployed with the AWS Elastic Beanstalk Tomcat Platform:
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"
```sh
sudo find /var -name "newrelic.jar"
sudo find /usr -name "newrelic.jar"
```

To pass the `-javaagent` flag to the JVM:
Expand All @@ -47,7 +48,7 @@ For applications deployed with the AWS Elastic Beanstalk Tomcat Platform:
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:

```
```sh
-javaagent:/full/path/to/newrelic.jar
```
7. Select <DoNotTranslate>**Apply**</DoNotTranslate> to save.
Expand All @@ -64,7 +65,7 @@ For applications deployed with the AWS Elastic Beanstalk Java SE Platform:

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

```
```makefile
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.

0 comments on commit ac111bd

Please sign in to comment.