component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). ApplicationSizeCompanyTeamCommit; { ({ item }) => ( {item.name}{item.value}{item.company}{item.team}{item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company}{item.team}{item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 163.73067,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "Add tables to your New Relic One application",
+ "sections": "Add tables to your New Relic One application",
+ "info": "Add a table to your New Relic One app.",
+ "tags": "table in app",
+ "body": " as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo"
+ },
+ "id": "5efa989ee7b9d2ad567bab51"
+ },
{
"image": "",
- "url": "https://developer.newrelic.com/automate-workflows/",
+ "url": "https://developer.newrelic.com/build-apps/",
"sections": [
- "Automate workflows",
- "Guides to automate workflows",
- "Quickly tag resources",
- "Set up New Relic using Helm charts",
- "Automatically tag a simple \"Hello World\" Demo across the entire stack",
- "Automate common tasks",
- "Set up New Relic using the Kubernetes operator",
- "Set up New Relic using Terraform"
+ "Build apps",
+ "Guides to build apps",
+ "Create a \"Hello, World!\" application",
+ "Permissions for managing applications",
+ "Set up your development environment",
+ "Add, query, and mutate data using NerdStorage",
+ "Add the NerdGraphQuery component to an application",
+ "Add a time picker to your app",
+ "Add a table to your app",
+ "Create a custom map view",
+ "Publish and deploy apps"
],
- "published_at": "2020-09-21T01:47:52Z",
- "title": "Automate workflows",
- "updated_at": "2020-09-21T01:47:51Z",
+ "published_at": "2020-09-22T01:47:25Z",
+ "title": "Build apps",
+ "updated_at": "2020-09-22T01:47:24Z",
"type": "developer",
- "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871",
+ "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d",
"document_type": "page",
"popularity": 1,
- "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform",
+ "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build",
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 828.4131,
+ "_score": 157.16318,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "sections": "Set up NewRelic using Helm charts",
- "body": " CloudFormation, and a command-line interface. These tools enable you to integrate NewRelic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation"
+ "title": "Build apps",
+ "sections": "Add a timepicker to your app",
+ "body": " app Add a timepicker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build"
},
- "id": "5efa999c196a67dfb4766445"
+ "id": "5efa999d64441fc0f75f7e21"
},
{
"image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png",
@@ -496,437 +500,151 @@
"New Relic developer champions",
"New Relic Podcasts"
],
- "published_at": "2020-09-21T01:45:24Z",
+ "published_at": "2020-09-22T01:47:25Z",
"title": "New Relic Developers",
- "updated_at": "2020-09-21T01:36:40Z",
+ "updated_at": "2020-09-22T01:36:38Z",
"type": "developer",
"external_id": "214583cf664ff2645436a1810be3da7a5ab76fab",
"document_type": "page",
"popularity": 1,
- "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 22 Days : 14 Hours : 58 Minutes : 30 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
+ "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 21 Days : 14 Hours : 59 Minutes : 10 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 827.89703,
+ "_score": 157.06892,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelic Developers",
- "sections": "NewRelic developer champions",
- "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the NewRelicCLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add"
+ "sections": "Add a timepicker to your app",
+ "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a timepicker to your app Add a timepicker to a sample application Add"
},
"id": "5d6fe49a64441f8d6100a50f"
},
{
"sections": [
- "New Relic One CLI reference",
- "Installing the New Relic One CLI",
- "Tip",
- "New Relic One CLI Commands",
- "Get started",
- "Configure your CLI preferences",
- "Set up your Nerdpacks",
- "Manage your Nerdpack subscriptions",
- "Install and manage plugins",
- "Manage catalog information"
+ "Intro to New Relic One API components",
+ "Components of the SDK",
+ "UI components",
+ "Chart components",
+ "Query and storage components",
+ "Platform APIs"
],
- "title": "New Relic One CLI reference",
+ "title": "Intro to New Relic One API components",
"type": "developer",
"tags": [
- "New Relic One app",
- "nerdpack commands"
+ "SDK components",
+ "New Relic One apps",
+ "UI components",
+ "chart components",
+ "query and storage components",
+ "Platform APIs"
],
- "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
- "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
- "url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:51:10Z",
+ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2",
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/",
+ "published_at": "2020-09-22T01:49:59Z",
+ "updated_at": "2020-08-14T01:47:12Z",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.",
- "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
+ "info": "Intro to New Relic One API components",
+ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 827.3667,
+ "_score": 129.60579,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelic One CLI reference",
- "sections": "NewRelic One CLI reference",
- "info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
- "tags": "NewRelic One app",
- "body": "NewRelic One CLI reference To build a NewRelic One app, you must install the NewRelic One CLI. The CLI helps you build, publish, and manage your NewRelic app. We provide a variety of tools for building apps, including the NewRelic One CLI (command line interface). This page explains how to use"
+ "tags": "New Relic One apps",
+ "body": ". They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the timepicker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet"
},
- "id": "5efa989e28ccbc535a307dd0"
+ "id": "5efa989e28ccbc4071307de5"
},
{
- "nodeid": 34966,
+ "image": "",
+ "url": "https://developer.newrelic.com/components/platform-state-context/",
"sections": [
- "New Relic solutions",
- "Measure DevOps success",
- "Plan your cloud adoption",
- "Optimize your cloud native environment",
- "Automate instrumentation",
- "Prerequisite",
- "1. Make instrumentation part of every build",
- "2. Take advantage of integrations and existing tools",
- "3. Leverage the power of APIs",
- "For more help"
+ "PlatformStateContext",
+ "Usage",
+ "Props"
],
- "title": "Automate instrumentation",
- "type": "docs",
- "external_id": "91b25e8572d235c7f95963650848fc6ab6cf4b39",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/NRCLItool.png",
- "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/automate-instrumentation",
- "published_at": "2020-09-20T17:44:28Z",
- "updated_at": "2020-09-10T08:41:00Z",
- "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success",
- "document_type": "page",
- "popularity": 1,
- "info": "Capture tangible, measurable metrics from before and after deployments to optimize your DevOps team. ",
- "body": "Replacing manual instrumentation with automated setup benefits you in many ways. Automation can make you faster, and it helps to eliminate fat-finger errors—and more importantly, it improves observability. You'll spend less time instrumenting systems, and reduce toil as your development ecosystem grows. Prerequisite Before starting this tutorial, be sure to complete the Measure code pipeline tutorial. 1. Make instrumentation part of every build Rolling instrumentation into your standard build process makes visibility the default, instead of being viewed as yet another burden on your developers. Modern build tools like Gradle can do almost anything; you can take advantage of that power to instrument your code quickly and efficiently. Read this Best Practices post for more information about automating instrumentation in your pipeline 2. Take advantage of integrations and existing tools It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced New Relic CLI (command line interface) tool to automate a variety of tasks, such as managing New Relic Synthetics monitors; creating, editing, and deleting New Relic Alerts policies and conditions; and managing user accounts. Use IBM's New Relic CLI tool to manage your Synthetics monitors, alert policies, and user accounts. 3. Leverage the power of APIs Now that you've instrumented your services, you can take advantage of New Relic's REST API to harvest information from your instrumentation and to manage your monitoring process. The New Relic API Explorer can help you to determine the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls. The New Relic documentation includes a wealth of additional information on APIs that you can use to automate a number of important tasks, including: APIs to set up alert conditions APIs to define synthetic monitors APIs to create dashboards For more help",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 654.17883,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "sections": "NewRelic solutions",
- "body": " It’s always worth taking a little extra time to look for time-saving integrations and tools that can help to achieve your automation goals. For example, you can use IBM’s open-sourced NewRelicCLI (command line interface) tool to automate a variety of tasks, such as managing NewRelic Synthetics",
- "breadcrumb": "Contents / NewRelic solutions / NewRelic solutions / Measure DevOps success"
- },
- "id": "5f5e0c14196a67e25fce6a8a"
- },
- {
- "image": "",
- "url": "https://developer.newrelic.com/nerd-days/",
- "sections": [
- "Nerd Days is a free 1-day event focused on building more perfect software",
- "Register for Nerd Days 1.0",
- "Save the date & join us online",
- "Additional Nerd Days Events",
- "Tracks",
- "Observability",
- "Cloud migration",
- "Open source",
- "Devops journey",
- "Fundamentals",
- "Nerd Days AMER Agenda",
- "DevOps journey",
- "Keynote",
- "Instrumenting your service using agents",
- "Increased Maturity with Full Stack Observability",
- "Deploying an app on Kubernetes",
- "Delivering SRE as a Service",
- "Building applications on New Relic One",
- "Exploring your data using NRQL",
- "New Relic AI",
- "Going Serverless: Chipping at the monolith",
- "Logging for Modern Organizations",
- "Grafana and Prometheus with TDP",
- "Lunch Break",
- "Custom Instrumentation",
- "Exploring Data with NerdGraph",
- "Tool Consolidation",
- "Flex Integration - Build Your First Linux Configuration",
- "Open Source powers the New Relic One Catalog",
- "Alerts Best Practices",
- "The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data",
- "Kubernetes Observability",
- "Measuring code pipelines",
- "New Relic CLI Wizardry/ Reducing toil with Terraform",
- "True availability using Synthetics",
- "How Observability-Driven Development accelerates DevOps transformations",
- "CFP Customer Session: Cloud fundamentals",
- "Testing in Production",
- "NerdStorageVault: ThirdParty Secrets",
- "Closing + Swag",
- "Engage with the developer community"
- ],
- "published_at": "2020-09-21T01:46:19Z",
- "title": "New Relic Developers",
- "updated_at": "2020-09-17T01:38:36Z",
+ "published_at": "2020-09-22T01:54:16Z",
+ "title": "PlatformStateContext",
+ "updated_at": "2020-08-01T01:47:08Z",
"type": "developer",
- "external_id": "0b8374051901a77e242ce296c00eeb3c760439d1",
+ "external_id": "aa6b86b3dc0dcd7cd758b20655318b108875cce7",
"document_type": "page",
"popularity": 1,
- "body": "Nerd Days is a free 1-day event focused on building more perfect software Register for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region) Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. Save the date & join us online Choose the sessions you're interested in add Nerd Days to your calendar. You’ll hear from fellow engineers who built New Relic solutions and New Relic users from various industries. Whether you’re new or a data nerd, there’s an interactive session for you. Date: October 13, 2020 Time: 9AM PST - 3PM PST We look forward to building with you during Nerd Days! If you have any questions about Nerd Days please emails deco@newrelic.com. Additional Nerd Days Events EMEA RegistrationNov 10, 2020 APJ RegistrationOct 22, 2020 REGISTER FOR NERD DAYS | AMERICAS Tracks Tracks will vary by region. All sessions will be recorded and distributed after the event. Observability Cloud migration Open source Devops journey Fundamentals Nerd Days AMER Agenda We’ve got a packed schedule with thought-leaders of their respective industries Fundamentals Observability Cloud migration DevOps journey Open source 9:00 AM Keynote Lew Cirne 10:00 AM Instrumenting your service using agents Increased Maturity with Full Stack Observability Deploying an app on Kubernetes Delivering SRE as a Service Building applications on New Relic One 11:00 AM Exploring your data using NRQL New Relic AI Going Serverless: Chipping at the monolith Logging for Modern Organizations Grafana and Prometheus with TDP 12:00 PM Lunch Break Distant Disco 1:00 PM Custom Instrumentation Exploring Data with NerdGraph Tool Consolidation Flex Integration - Build Your First Linux Configuration Open Source powers the New Relic One Catalog 2:00 PM Alerts Best Practices The Art & Science of Deciphering Perceived Performance: A look at how user behavior affects your data Kubernetes Observability Measuring code pipelines New Relic CLI Wizardry/ Reducing toil with Terraform 3:00 PM True availability using Synthetics How Observability-Driven Development accelerates DevOps transformations CFP Customer Session: Cloud fundamentals Testing in Production NerdStorageVault: ThirdParty Secrets 4:00 PM Closing + Swag Jemiah Sius and Team Engage with the developer community @newrelic New Relic Forum Developers Hopin logo Event powered by Hopin",
- "info": "",
+ "info": "A PlatformStateContext component!",
+ "body": "PlatformStateContext Usage Copy Props There are no props for this component.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 545.73737,
+ "_score": 100.85446,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelic Developers",
- "sections": "NewRelicCLI Wizardry/ Reducing toil with Terraform",
- "body": " pipelines NewRelicCLI Wizardry/ Reducing toil with Terraform 3:00 PM True availability using Synthetics How Observability-Driven Development accelerates DevOps transformations CFP Customer Session: Cloud fundamentals Testing in Production NerdStorageVault: ThirdParty Secrets 4:00 PM Closing + Swag Jemiah Sius and Team Engage with the developer community @newrelic NewRelic Forum Developers Hopin logo Event powered by Hopin"
+ "title": "PlatformStateContext",
+ "sections": "PlatformStateContext",
+ "info": "A PlatformStateContext component!",
+ "body": "PlatformStateContext Usage Copy Props There are no props for this component."
},
- "id": "5f3dd5bf28ccbc2349f56e4e"
+ "id": "5efa997128ccbccc6f307dc0"
}
],
- "/explore-docs/nr1-common": [
+ "/build-apps/howto-use-nrone-table-components": [
{
+ "image": "",
+ "url": "https://developer.newrelic.com/components/table-header-cell/",
"sections": [
- "New Relic One CLI reference",
- "Installing the New Relic One CLI",
- "Tip",
- "New Relic One CLI Commands",
- "Get started",
- "Configure your CLI preferences",
- "Set up your Nerdpacks",
- "Manage your Nerdpack subscriptions",
- "Install and manage plugins",
- "Manage catalog information"
+ "TableHeaderCell",
+ "Usage",
+ "Props"
],
- "title": "New Relic One CLI reference",
+ "published_at": "2020-09-22T01:55:37Z",
+ "title": "TableHeaderCell",
+ "updated_at": "2020-08-03T04:46:36Z",
"type": "developer",
- "tags": [
- "New Relic One app",
- "nerdpack commands"
- ],
- "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
- "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
- "url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:51:10Z",
+ "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.",
- "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
+ "info": "A TableHeaderCell component!",
+ "body": "TableHeaderCell Usage Copy Props There are no props for this component.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 287.04892,
+ "_score": 534.5654,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI reference",
- "sections": "NewRelicOneCLICommands",
- "info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
- "tags": "NewRelicOne app",
- "body": " extension to build your apps. NewRelicOneCLICommands This table provides descriptions for the NewRelicOnecommands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions"
+ "title": "TableHeaderCell",
+ "sections": "TableHeaderCell",
+ "info": "A TableHeaderCellcomponent!",
+ "body": "TableHeaderCell Usage Copy Props There are no props for this component."
},
- "id": "5efa989e28ccbc535a307dd0"
+ "id": "5efa9906196a67523e76646e"
},
{
"image": "",
- "url": "https://developer.newrelic.com/automate-workflows/",
+ "url": "https://developer.newrelic.com/components/table-row/",
"sections": [
- "Automate workflows",
- "Guides to automate workflows",
- "Quickly tag resources",
- "Set up New Relic using Helm charts",
- "Automatically tag a simple \"Hello World\" Demo across the entire stack",
- "Automate common tasks",
- "Set up New Relic using the Kubernetes operator",
- "Set up New Relic using Terraform"
+ "TableRow",
+ "Usage",
+ "Props"
],
- "published_at": "2020-09-21T01:47:52Z",
- "title": "Automate workflows",
- "updated_at": "2020-09-21T01:47:51Z",
+ "published_at": "2020-09-22T01:55:36Z",
+ "title": "TableRow",
+ "updated_at": "2020-08-03T04:45:42Z",
"type": "developer",
- "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871",
+ "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d",
"document_type": "page",
"popularity": 1,
- "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform",
- "info": "",
+ "info": "A TableRow component!",
+ "body": "TableRow Usage Copy Props There are no props for this component.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 167.19043,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "sections": "Set up NewRelic using Helm charts",
- "body": " CloudFormation, and a command-line interface. These tools enable you to integrate NewRelic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation"
- },
- "id": "5efa999c196a67dfb4766445"
- },
- {
- "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png",
- "url": "https://developer.newrelic.com/",
- "sections": [
- "Mark your calendar for Nerd Days 1.0",
- "Get coding",
- "Create custom events",
- "Add tags to apps",
- "Build a Hello, World! app",
- "Get inspired",
- "Add a table to your app",
- "Collect data - any source",
- "Automate common tasks",
- "Create a custom map view",
- "Add a time picker to your app",
- "Add custom attributes",
- "New Relic developer champions",
- "New Relic Podcasts"
- ],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic Developers",
- "updated_at": "2020-09-21T01:36:40Z",
- "type": "developer",
- "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab",
- "document_type": "page",
- "popularity": 1,
- "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 22 Days : 14 Hours : 58 Minutes : 30 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
- "info": "",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 151.57886,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NewRelic Developers",
- "sections": "NewRelic developer champions",
- "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the NewRelicCLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add"
- },
- "id": "5d6fe49a64441f8d6100a50f"
- },
- {
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
- "sections": [
- "New Relic One CLI Nerdpack commands",
- "Command details",
- "nr1 nerdpack:build",
- "Builds a Nerdpack",
- "Usage",
- "Options",
- "nr1 nerdpack:clone",
- "Clone an existing Nerdpack",
- "nr1 nerdpack:serve",
- "Serve your Nerdpack locally",
- "nr1 nerdpack:uuid",
- "Get your Nerdpack's UUID",
- "nr1 nerdpack:publish",
- "Publish your Nerdpack",
- "nr1 nerdpack:deploy",
- "Deploy your Nerdpack to a channel",
- "nr1 nerdpack:undeploy",
- "Undeploy your Nerdpack",
- "nr1 nerdpack:clean",
- "Removes all built artifacts",
- "nr1 nerdpack:validate",
- "Validates artifacts inside your Nerdpack",
- "nr1 nerdpack:Info",
- "Shows the state of your Nerdpack in the New Relic's registry"
- ],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic One CLI Nerdpack commands",
- "updated_at": "2020-09-17T01:49:55Z",
- "type": "developer",
- "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
- "document_type": "page",
- "popularity": 1,
- "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
- "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 151.09546,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NewRelicOneCLI Nerdpack commands",
- "sections": "NewRelicOneCLI Nerdpack commands",
- "info": "An overview of the CLIcommands you can use to set up your NewRelicOne Nerdpacks.",
- "body": "NewRelicOneCLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
- },
- "id": "5f28bd6a64441f9817b11a38"
- },
- {
- "sections": [
- "New Relic CLI Reference",
- "New Relic CLI commands",
- "Options",
- "Commands"
- ],
- "title": "New Relic CLI Reference",
- "type": "developer",
- "tags": "new relic cli",
- "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888",
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/",
- "published_at": "2020-09-21T01:52:19Z",
- "updated_at": "2020-08-14T01:47:12Z",
- "document_type": "page",
- "popularity": 1,
- "info": "The command line tools for performing tasks against New Relic APIs",
- "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 140.52164,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NewRelicCLI Reference",
- "sections": "NewRelicCLIcommands",
- "info": "The command line tools for performing tasks against NewRelic APIs",
- "tags": "newreliccli",
- "body": "NewRelicCLI Reference The NewRelicCLI enables the integration of NewRelic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding NewRelic into your CI/CD pipeline. NewRelicCLIcommands Find details for the NewRelicCLIcommand docs"
- },
- "id": "5efa989ee7b9d2024b7bab97"
- }
- ],
- "/build-apps/howto-use-nrone-table-components": [
- {
- "image": "",
- "url": "https://developer.newrelic.com/components/table-header-cell/",
- "sections": [
- "TableHeaderCell",
- "Usage",
- "Props"
- ],
- "published_at": "2020-09-21T01:47:51Z",
- "title": "TableHeaderCell",
- "updated_at": "2020-08-03T04:46:36Z",
- "type": "developer",
- "external_id": "2a4be1419d1a6e501a8eed915b8acf7c9798259d",
- "document_type": "page",
- "popularity": 1,
- "info": "A TableHeaderCell component!",
- "body": "TableHeaderCell Usage Copy Props There are no props for this component.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 549.41394,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "TableHeaderCell",
- "sections": "TableHeaderCell",
- "info": "A TableHeaderCellcomponent!",
- "body": "TableHeaderCell Usage Copy Props There are no props for this component."
- },
- "id": "5efa9906196a67523e76646e"
- },
- {
- "image": "",
- "url": "https://developer.newrelic.com/components/table-row/",
- "sections": [
- "TableRow",
- "Usage",
- "Props"
- ],
- "published_at": "2020-09-21T01:52:18Z",
- "title": "TableRow",
- "updated_at": "2020-08-03T04:45:42Z",
- "type": "developer",
- "external_id": "b9ca0d4e07a506dd961eb2194c5344bfa9ab770d",
- "document_type": "page",
- "popularity": 1,
- "info": "A TableRow component!",
- "body": "TableRow Usage Copy Props There are no props for this component.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 452.77527,
+ "_score": 441.41687,
"_version": null,
"_explanation": null,
"sort": null,
@@ -944,35 +662,35 @@
"sections": [
"Build apps",
"Guides to build apps",
- "Permissions for managing applications",
"Create a \"Hello, World!\" application",
+ "Permissions for managing applications",
"Set up your development environment",
"Add, query, and mutate data using NerdStorage",
"Add the NerdGraphQuery component to an application",
"Add a time picker to your app",
"Add a table to your app",
- "Publish and deploy apps",
- "Create a custom map view"
+ "Create a custom map view",
+ "Publish and deploy apps"
],
- "published_at": "2020-09-21T01:47:51Z",
+ "published_at": "2020-09-22T01:47:25Z",
"title": "Build apps",
- "updated_at": "2020-09-21T01:47:51Z",
+ "updated_at": "2020-09-22T01:47:24Z",
"type": "developer",
"external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d",
"document_type": "page",
"popularity": 1,
- "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps Permissions for managing applications Learn about permissions for subscribing to apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Publish and deploy apps Start sharing the apps you build 30 min Create a custom map view Build an app to show page view data on a map",
+ "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build",
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 426.58286,
+ "_score": 420.9027,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
"title": "Build apps",
"sections": "Add the NerdGraphQuery component to an application",
- "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Publish and deploy apps Start sharing the apps you build 30 min Create a custom map view Build an app to show page view data on a map"
+ "body": " app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build"
},
"id": "5efa999d64441fc0f75f7e21"
},
@@ -1017,7 +735,7 @@
"external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb",
"image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png",
"url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:47:24Z",
"updated_at": "2020-09-17T01:48:42Z",
"document_type": "page",
"popularity": 1,
@@ -1025,7 +743,7 @@
"body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return
Hello, pageview-app-nerdlet Nerdlet!
; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.",
+ "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ",
+ "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 157.6396,
+ "_score": 110.90054,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "Nerdpack file structure",
- "sections": "Nerdpack file structure",
- "info": "An overview of the Nerdpack File Structure",
- "tags": "NewRelicOneCLI",
- "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the NewRelicOneCLIcommand nr1 create and select Nerdpack to create"
+ "title": "Data requirements and limits for custom event data",
+ "sections": "Additional EventAPI requirements",
+ "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ",
+ "category_1": "Event data sources",
+ "category_2": "Custom events",
+ "body": "You can report custom events to New Relic in several ways, including the New Relic EventAPI, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements",
+ "breadcrumb": "Contents / Insights / Event data sources / Custom events"
},
- "id": "5efa989e196a671300766404"
- }
- ],
- "/explore-docs/nr1-config": [
+ "id": "59f4354f4bb81c2ea8b80d0a"
+ },
{
+ "category_2": "Get started",
+ "nodeid": 36051,
"sections": [
- "New Relic One CLI reference",
- "Installing the New Relic One CLI",
- "Tip",
- "New Relic One CLI Commands",
+ "Ingest and manage data",
"Get started",
- "Configure your CLI preferences",
- "Set up your Nerdpacks",
- "Manage your Nerdpack subscriptions",
- "Install and manage plugins",
- "Manage catalog information"
- ],
- "title": "New Relic One CLI reference",
- "type": "developer",
- "tags": [
- "New Relic One app",
- "nerdpack commands"
+ "Understand data",
+ "Manage data",
+ "Ingest APIs",
+ "Get data into New Relic",
+ "New Relic-built agents and integrations",
+ "Agent APIs",
+ "Telemetry SDKs",
+ "APIs for sending metrics, traces, logs, and events",
+ "New Relic One applications",
+ "For more help"
],
- "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
- "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
- "url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:51:10Z",
+ "title": "Get data into New Relic",
+ "category_0": "Telemetry Data Platform",
+ "type": "docs",
+ "category_1": "Ingest and manage data",
+ "external_id": "7a413b4d7e5bd81088a08507ae4bad64c7e24b2d",
+ "image": "",
+ "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data-new-relic/getting-started/introduction-new-relic-data-ingest-apis-sdks",
+ "published_at": "2020-09-20T18:07:16Z",
+ "updated_at": "2020-08-10T23:16:39Z",
+ "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.",
- "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
+ "info": "An introduction to how to get data into New Relic. ",
+ "body": "There are many ways to get data into your New Relic account. Any New Relic user can use any of our data ingest methods to report data to our Telemetry Data Platform. New Relic-built agents and integrations When you enable New Relic solutions like APM, browser monitoring, mobile monitoring, infrastructure monitoring, or any of our wide array of integrations, by default you'll receive data from your monitored applications, hosts, services, or other entities. To browse all New Relic-built tools and solutions, see New Relic integrations. Agent APIs Some of our monitoring solutions come with APIs and/or SDKs that allow you to customize the data reported and how it reports. For more information, see the relevant product: APM agent APIs Browser API Mobile API Infrastructure monitoring: the Flex integration tool Telemetry SDKs If our more curated solutions don't work for you, our open source Telemetry SDKs let you build your own solution. These SDKs are language wrappers for our data-ingest APIs (below) that let you send telemetry data to New Relic without requiring install of an agent. APIs for sending metrics, traces, logs, and events If our more curated solutions don't work for you, we also have data-ingest APIs: Trace API Event API Metric API Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open source New Relic One apps, or share your own with the open source community. For details, see New Relic One applications. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 337.67365,
+ "_score": 102.42745,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI reference",
- "sections": "NewRelicOneCLICommands",
- "info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
- "tags": "NewRelicOne app",
- "body": " extension to build your apps. NewRelicOneCLICommands This table provides descriptions for the NewRelicOnecommands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions"
+ "sections": "APIs for sending metrics, traces, logs, and events",
+ "category_0": "Telemetry Data Platform",
+ "body": " also have data-ingest APIs: TraceAPIEventAPIMetricAPI Log API To learn about the differences between these data types, see Data types. New Relic One applications You can build entirely custom applications that reside in New Relic One and make use of any data you want. You can use existing open",
+ "breadcrumb": "Contents / Telemetry Data Platform / Ingest and manage data / Get started"
},
- "id": "5efa989e28ccbc535a307dd0"
+ "id": "5f24aa60196a67ede394f5f3"
},
{
+ "category_2": "Custom events",
+ "nodeid": 13806,
"sections": [
- "New Relic CLI Reference",
- "New Relic CLI commands",
- "Options",
- "Commands"
+ "Event data sources",
+ "Default events",
+ "Custom events",
+ "Report custom event data",
+ "Overview of reporting custom events and attributes",
+ "Send custom events and attributes",
+ "Extend data retention",
+ "For more help"
],
- "title": "New Relic CLI Reference",
- "type": "developer",
- "tags": "new relic cli",
- "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888",
+ "title": "Report custom event data",
+ "category_0": "Insights",
+ "type": "docs",
+ "category_1": "Event data sources",
+ "external_id": "afb5f5a81ae06b22935d98c470ed9cabd7c9da6b",
"image": "",
- "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/",
- "published_at": "2020-09-21T01:52:19Z",
- "updated_at": "2020-08-14T01:47:12Z",
+ "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/report-custom-event-data",
+ "published_at": "2020-09-20T15:43:08Z",
+ "updated_at": "2020-07-26T05:52:23Z",
+ "breadcrumb": "Contents / Insights / Event data sources / Custom events",
"document_type": "page",
"popularity": 1,
- "info": "The command line tools for performing tasks against New Relic APIs",
- "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads",
+ "info": "An overview of the options for sending custom event data to New Relic. ",
+ "body": "New Relic products report a variety of default event data to your account. This document will explain how to report your own custom events and attributes. Overview of reporting custom events and attributes Event data is one of the fundamental New Relic data types. Events are reported by most New Relic products, and we give you several options for reporting your own custom events. Reporting custom events allows you to create more useful and customized queries and charts of your data, and is a key part of optimizing how New Relic works for you. Before beginning, it's important to know that reporting a large number of custom events and/or attributes can cause degraded query performance, or cause you to approach or pass data collection rate limits. For optimal performance, first think about what data you want to analyze, and then create only the events and/or attributes necessary to meet these specific goals. Be aware of the following data and subscription requirements for inserting and accessing custom data: Ensure you follow limits and requirements around event/attribute data types, naming syntax, and size. The amount of data you have access to over time depends on your data retention policy. Send custom events and attributes Methods for sending custom events and attributes include: Source How to send custom data APM agent Use APM agent APIs to report custom events and custom attributes. Browser agent Add custom attributes to the PageView event via the Browser API call addCustomAttribute. Send PageAction event and attributes via Browser API. Forward APM agent custom attributes to PageView event. Event API To report custom events not associated with other New Relic products, use the Event API. Infrastructure Add custom attributes to default Infrastructure events. Use the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agent API to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: Metric API Logs Trace API Extend data retention To learn about how to extend how long events are retained in your account, see Event data retention. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 164.10503,
+ "_score": 101.2084,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicCLI Reference",
- "sections": "NewRelicCLIcommands",
- "info": "The command line tools for performing tasks against NewRelic APIs",
- "tags": "newreliccli",
- "body": "NewRelicCLI Reference The NewRelicCLI enables the integration of NewRelic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding NewRelic into your CI/CD pipeline. NewRelicCLIcommands Find details for the NewRelicCLIcommand docs"
+ "title": "Report custom event data",
+ "sections": "Event data sources",
+ "info": "An overview of the options for sending custom event data to New Relic. ",
+ "category_1": "Event data sources",
+ "category_2": "Custom events",
+ "body": " the Flex integration tool to report your own custom event data. Mobile agent Use the mobile agentAPI to send custom events and attributes. Synthetics Add custom attributes to the SyntheticCheck event via the $util.insights tools. For ways to report other types of custom data, see: MetricAPI Logs Trace",
+ "breadcrumb": "Contents / Insights / Event data sources / Custom events"
},
- "id": "5efa989ee7b9d2024b7bab97"
+ "id": "5e8e7f9de7b9d2aa122cf0f6"
},
{
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
+ "category_2": "Java agent release notes",
+ "nodeid": 36271,
"sections": [
- "New Relic One CLI Nerdpack commands",
- "Command details",
- "nr1 nerdpack:build",
- "Builds a Nerdpack",
- "Usage",
- "Options",
- "nr1 nerdpack:clone",
- "Clone an existing Nerdpack",
- "nr1 nerdpack:serve",
- "Serve your Nerdpack locally",
- "nr1 nerdpack:uuid",
- "Get your Nerdpack's UUID",
- "nr1 nerdpack:publish",
- "Publish your Nerdpack",
- "nr1 nerdpack:deploy",
- "Deploy your Nerdpack to a channel",
- "nr1 nerdpack:undeploy",
- "Undeploy your Nerdpack",
- "nr1 nerdpack:clean",
- "Removes all built artifacts",
- "nr1 nerdpack:validate",
- "Validates artifacts inside your Nerdpack",
- "nr1 nerdpack:Info",
- "Shows the state of your Nerdpack in the New Relic's registry"
+ "APM agent release notes",
+ "Go agent release notes",
+ "Java agent release notes",
+ ".NET agent release notes",
+ "Node.js agent release notes",
+ "PHP agent release notes",
+ "Python agent release notes",
+ "Ruby agent release notes",
+ "C SDK release notes",
+ "Java Agent 5.8.0",
+ "New features",
+ "New OSS SDK",
+ "Fixes"
],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic One CLI Nerdpack commands",
- "updated_at": "2020-09-17T01:49:55Z",
+ "title": "Java Agent 5.8.0",
+ "category_0": "Release notes",
+ "type": "docs",
+ "category_1": "APM agent release notes",
+ "external_id": "bc3a41e5e576ff66be3ecfe7085f2d3c8bbd796d",
+ "image": "",
+ "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-580",
+ "published_at": "2020-09-20T19:36:46Z",
+ "updated_at": "2019-10-31T15:19:35Z",
+ "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes",
+ "document_type": "release_notes",
+ "popularity": -2,
+ "body": "[RSS] Released on: Tuesday, October 29, 2019 - 12:00 Download New features gRPC gRPC error reporting is now configurable Response codes, component type, and method type are now recorded as attributes. The agent now reports the gRPC status code rather than \"translating\" to HTTP status codes. Vert.x The Java agent now provides visibility into your applications built using the Vert.x 3.8. The agent instruments Vert.x Web, Vert.x Core, and Vert.x HTTP client. With this instrumentation, the agent will identify and name your transactions based on Vert.x web routing paths. The agent will also time web handlers, track async handlers, and external calls made with Vert.x HTTP client. XML custom instrumentation The custom XML instrumentation XSD has been enhanced to support now include support for specifying leaf tracers. Class Histogram A new Class Histogram extension is now available to report heap memory details as events. Jedis Added support for Jedis 3.0.0 and higher. You can now see your Jedis calls in breakdowns in the overview chart, entries in the Databases tab, and segments in transaction traces. Lettuce Instrumentation modules for Lettuce 4 and 5 are now available via the Java agent incubator. New OSS SDK We now have an open source Telemetry SDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the Metric API and spans to the Trace API. Fixes The Solr 7 instrumentation would not report Update JMX metrics. HttpURLConnection instrumentation produced External metrics only when network methods (getInputStream, getResponseCode) are called. MongoDB instrumentation would report duplicate metrics when applications invoked MongoClientOptions.build() more than once.",
+ "info": "",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 73.85164,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "Java Agent 5.8.0",
+ "sections": "APM agent release notes",
+ "category_1": "APM agent release notes",
+ "category_2": "Java agent release notes",
+ "body": " agent incubator. New OSS SDK We now have an open source TelemetrySDK for Java for sending telemetry data to New Relic. The current SDK supports sending dimensional metrics to the MetricAPI and spans to the TraceAPI. Fixes The Solr 7 instrumentation would not report Update JMX metrics",
+ "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes"
+ },
+ "id": "5dbafb88196a67d9b59aa23d"
+ }
+ ],
+ "/build-apps/map-pageviews-by-region": [
+ {
+ "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png",
+ "url": "https://developer.newrelic.com/",
+ "sections": [
+ "Mark your calendar for Nerd Days 1.0",
+ "Get coding",
+ "Create custom events",
+ "Add tags to apps",
+ "Build a Hello, World! app",
+ "Get inspired",
+ "Add a table to your app",
+ "Collect data - any source",
+ "Automate common tasks",
+ "Create a custom map view",
+ "Add a time picker to your app",
+ "Add custom attributes",
+ "New Relic developer champions",
+ "New Relic Podcasts"
+ ],
+ "published_at": "2020-09-22T01:47:25Z",
+ "title": "New Relic Developers",
+ "updated_at": "2020-09-22T01:36:38Z",
"type": "developer",
- "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
+ "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
- "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
+ "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 21 Days : 14 Hours : 59 Minutes : 10 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
+ "info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 151.09546,
+ "_score": 162.59659,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI Nerdpack commands",
- "sections": "NewRelicOneCLI Nerdpack commands",
- "info": "An overview of the CLIcommands you can use to set up your NewRelicOne Nerdpacks.",
- "body": "NewRelicOneCLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
+ "sections": "Create a custommapview",
+ "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custommapview Build an app to show pageview data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add"
},
- "id": "5f28bd6a64441f9817b11a38"
+ "id": "5d6fe49a64441f8d6100a50f"
+ },
+ {
+ "sections": [
+ "Set up your development environment",
+ "Before you begin",
+ "A note on support",
+ "Tip",
+ "Prepare to build or modify apps",
+ "Start building",
+ "Contribute to developer.newrelic.com"
+ ],
+ "title": "Set up your development environment",
+ "type": "developer",
+ "tags": [
+ "developer account",
+ "API key",
+ "New Relic One CLI"
+ ],
+ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a",
+ "image": "",
+ "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/",
+ "published_at": "2020-09-22T01:48:41Z",
+ "updated_at": "2020-08-26T01:47:20Z",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "Prepare to build apps and contribute to this site",
+ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 121.39979,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "sections": "Prepare to build or modify apps",
+ "info": "Prepare to build apps and contribute to this site",
+ "body": ", publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute"
+ },
+ "id": "5efa9973e7b9d242237bab39"
+ },
+ {
+ "sections": [
+ "Intro to NerdStorage",
+ "Use NerdStorage in your apps",
+ "Data model",
+ "Limits",
+ "Data access",
+ "Permissions for working with NerdStorage"
+ ],
+ "title": "Intro to NerdStorage",
+ "type": "developer",
+ "tags": [
+ "nerdstorage",
+ "nerdstorage components",
+ "new relic one apps",
+ "data access"
+ ],
+ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62",
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/nerdstorage/",
+ "published_at": "2020-09-22T01:49:58Z",
+ "updated_at": "2020-09-08T01:50:19Z",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "Intro to NerdStorage on New Relic One",
+ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 107.52684,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "sections": "Use NerdStorage in your apps",
+ "tags": "new relic one apps",
+ "body": " as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{"lastNumber": 42, "another": [1]}', 'document-2-of-collection-1': '"userToken"', // ... }, 'another-collection': { 'fruits': '["pear", "apple"
+ },
+ "id": "5efa989ee7b9d2048e7bab92"
},
{
"category_2": "Installation",
@@ -1663,689 +1602,956 @@
"body": "With secrets management, you can configure on-host integrations with New Relic's infrastructure agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. Currently, Hashicorp Vault, AWS KMS, and CyberArk are supported. Define secrets To use secrets in an integration configuration YAML file: Define a variables section, where each entry is a name for a secret object. In each entry, include the source of the secret and the proper configuration to retrieve those secrets. In the integration configuration section, set ${variable.property} placeholders that will be automatically replaced by the properties of the secret object. If the secrets retrieval fails, the integration won't be executed, as the infrastructure agent does not have all the data it requires to execute. For example, the following configuration will retrieve an object named creds from Vault. (You can define the object's name for the secret.) Let's assume that the stored object is a JSON with a property named user and another property named password. We want to use them to set the basic HTTP credentials of the status_url property from an Nginx on-host integration: integration_name: com.newrelic.nginx variables: creds: vault: http: url: http://my.vault.host/v1/newengine/data/secret headers: X-Vault-Token: my-vault-token instances: - name: nginx-server-metrics command: metrics arguments: status_url: http://${creds.user}:${creds.password}@example.com/status status_module: discover remote_monitoring: true labels: env: production role: load_balancer Secrets variables Define secrets in each integration configuration under a variables section. Each entry is a user-defined secret name that will store the properties of the retrieved secrets. Each variable can contain the following properties: YAML key Description ttl Type: String Amount of time before a secret is refreshed. This can be a number followed by a time unit (s, m or h). Examples: 30s, 10m, 1h Default: 1h aws-kms Type: YAML properties AWS KMS secret retrieval configuration vault Type: Vault Vault secret retrieval configuration cyberark-cli Type: YAML properties CyberArk command line interface configuration cyberark-api Type: YAML properties CyberArk REST API configuration AWS KMS secrets To retrieve your secrets from Amazon KMS, you can set the following properties in your aws-kms section. Not all fields are required. For example, you will need either data, file, or http to provide the encoded KMS string. YAML key Description data Type: String Base64 encoded KMS string to decrypt file Type: String Path to file containing Base64 encoded KMS string to decrypt http Type: YAML properties HTTP configuration to use to request Base64 encoded KMS string to decrypt. For more information, see Vault http. credential_file Type: String Path to AWS credentials file config_file Type: String Path to AWS config file region Type: String AWS KMS region type Type: String (plain, equal, or json) Secret value format: plain: a raw string to be stored directly into the destination variable. equal: a key=property one-line string to be stored as object properties into the destination variable. json: a JSON object to be stored as properties into the destination variable. Secrets of type plain or json use dot notation; for example, ${mysecret.nestedkey}. The following example will allow retrieving a plain password string from AWS KMS. It must be decrypted from the provided data encoded string. variables: myPassword: aws-kms: data: T0hBSStGTEVY region: ap-southeast-2 credential_file: \"./my-aws-credentials-file\" config_file: \"./my-aws-config-file\" type: plain Vault secrets Vault must enable an http field containing the HTTP configuration used to connect to Vault. The http entry can contain the following entries: YAML key Description url Type: String URL to request data from tls_config Type: YAML properties Use the TLS configuration properties headers Type: YAML map Request headers tls_config properties Secrets must use dot notation, for example, ${mysecret.nestedkey}. YAML key Description enable Type: Boolean Enable TLS Default: false insecure_skip_verify Type: Boolean Skip verifying server’s certificate chain and host Default: false min_version Type: UInt16 The minimum SSL/TLS version that is acceptable Default: 0 (which uses TLS version 1.0) max_version Type: UInt16 The maximum SSL/TLS version that is acceptable Default: 0 (which uses TLS version 1.3) ca Type: String TLS certificate \"\" The following example will retrieve a secret using a Vault token from a secured server, and skip the server certificates verification: variables: mydata: vault: http: url: https://my.vault.host/v1/newengine/data/secret headers: X-Vault-Token: my-vault-token tls_config: insecure_skip_verify: true CyberArk command line interface To retrieve secrets from the CyberArk command line interface (CLI) use the following configuration, all keys are required YAML Key Description cli Type: string Full path to the CyberArk CLI executable Default: \"\" app-id Type: string Application id of the secret holder Default: \"\" safe Type: string Safe containing the secret Default: \"\" folder Type: string Folder containing the secret Default: \"\" object Type: string The object the secret is associated with Default: \"\" The following example will retrieve a CyberArk secret using the command line interface: variables: credentials: cyberark-cli: cli: /full/path/to/clipasswordsdk app-id: my-appid safe: my-safe folder: my-folder object: my-object CyberArk REST API To retrieve secrets using the CyberArk REST API there must be a http key containing the HTTP configuration. The http key contains these sub-keys, only url is required: YAML key Description url Type: String URL to request data from, this key is required Default: none tls_config Type: YAML properties Use the TLS configuration properties headers Type: YAML map Request headers The following example will retrieve a secret using the CyberArk REST API, skipping server certificate verification: variables: credentials: cyberark-api: http: url: https://hostname/AIMWebService/api/Accounts?AppID=myAppID&Query=Safe=mySafe;Object=myObject tls_config: insecure_skip_verify: true For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 133.25934,
+ "_score": 101.195076,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "sections": "CyberArk command line interface",
- "info": "Use secrets variables in your NewRelic infrastructure integration configuration to inject sensitive data that you don’t want in your configuration files.",
- "body": "With secrets management, you can configure on-host integrations with NewRelic's infrastructure agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. Currently, Hashicorp Vault, AWS KMS, and CyberArk are supported"
+ "body": ": YAML properties HTTP configuration to use to request Base64 encoded KMS string to decrypt. For more information, see Vault http. credential_file Type: String Path to AWS credentials file config_file Type: String Path to AWS config file region Type: String AWS KMS region type Type: String (plain"
},
"id": "5dc2d677e7b9d2d311e4648c"
},
{
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-common/",
"sections": [
- "New Relic One CLI common commands",
- "Command details",
- "nr1 help",
- "See commands and get details",
- "Usage",
- "Arguments",
- "Examples",
- "nr1 update",
- "Update your CLI",
- "nr1 create",
- "Create a new component",
- "Options",
- "nr1 profiles",
- "Manage your profiles keychain",
- "Commands",
- "nr1 autocomplete",
- "See autocomplete installation instructions",
- "nr1 nrql",
- "Query using NRQL"
+ "Serve, publish, and deploy your New Relic One app",
+ "Before you begin",
+ "Serve your app locally",
+ "Add images and metadata to your apps",
+ "screenshots folder",
+ "documentation.md",
+ "additionalInfo.md",
+ "config.json",
+ "Publish your app",
+ "Tip",
+ "Deploy your app",
+ "Subscribe or unsubsribe apps",
+ "Handle duplicate applications"
],
- "published_at": "2020-09-21T01:46:19Z",
- "title": "New Relic One CLI common commands",
- "updated_at": "2020-08-14T01:48:10Z",
+ "title": "Serve, publish, and deploy your New Relic One app",
"type": "developer",
- "external_id": "503e515e1095418f8d19329517344ab209d143a4",
+ "tags": [
+ "publish apps",
+ "deploy apps",
+ "subscribe apps",
+ "add metadata apps"
+ ],
+ "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c",
+ "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png",
+ "url": "https://developer.newrelic.com/build-apps/publish-deploy/",
+ "published_at": "2020-09-22T01:51:29Z",
+ "updated_at": "2020-09-02T02:05:55Z",
"document_type": "page",
"popularity": 1,
- "info": "An overview of common commands you can use with the New Relic One CLI.",
- "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.",
+ "info": "Start sharing and using the custom New Relic One apps you build",
+ "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 128.83325,
+ "_score": 99.52199,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI common commands",
- "sections": "NewRelicOneCLI common commands",
- "info": "An overview of common commands you can use with the NewRelicOneCLI.",
- "body": "NewRelicOneCLI common commands Here's a list of common commands to get you started with the NewRelicOneCLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1"
+ "title": "Serve, publish, and deploy your New Relic One app",
+ "sections": "Serve, publish, and deploy your New Relic One app",
+ "info": "Start sharing and using the custom New Relic One apps you build",
+ "tags": "publish apps",
+ "body": " that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageViewMap, which uses Browser events to chart performance across geographies. Your apps in the catalog are created"
},
- "id": "5f28bd6ae7b9d267996ade94"
+ "id": "5efa999de7b9d283e67bab8f"
}
],
- "/collect-data/custom-attributes": [
+ "/explore-docs/nr1-cli": [
{
"image": "",
- "url": "https://developer.newrelic.com/collect-data/",
+ "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
"sections": [
- "Collect data",
- "Guides to collect data",
- "Add custom attributes",
- "Collect data - any source",
- "Create custom events",
- "Build queries with NerdGraph",
- "Query data with NRQL"
- ],
- "published_at": "2020-09-21T01:49:04Z",
- "title": "Collect data",
- "updated_at": "2020-09-20T13:43:48Z",
- "type": "developer",
- "external_id": "fb5d6f75b61858b09e3e8c63f3b2af97813f47b6",
+ "New Relic One CLI Nerdpack commands",
+ "Command details",
+ "nr1 nerdpack:build",
+ "Builds a Nerdpack",
+ "Usage",
+ "Options",
+ "nr1 nerdpack:clone",
+ "Clone an existing Nerdpack",
+ "nr1 nerdpack:serve",
+ "Serve your Nerdpack locally",
+ "nr1 nerdpack:uuid",
+ "Get your Nerdpack's UUID",
+ "nr1 nerdpack:publish",
+ "Publish your Nerdpack",
+ "nr1 nerdpack:deploy",
+ "Deploy your Nerdpack to a channel",
+ "nr1 nerdpack:undeploy",
+ "Undeploy your Nerdpack",
+ "nr1 nerdpack:clean",
+ "Removes all built artifacts",
+ "nr1 nerdpack:validate",
+ "Validates artifacts inside your Nerdpack",
+ "nr1 nerdpack:Info",
+ "Shows the state of your Nerdpack in the New Relic's registry"
+ ],
+ "published_at": "2020-09-22T01:47:24Z",
+ "title": "New Relic One CLI Nerdpack commands",
+ "updated_at": "2020-09-17T01:49:55Z",
+ "type": "developer",
+ "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
"document_type": "page",
"popularity": 1,
- "body": "Collect data Through our opensource agents or APIs, New Relic makes it easy to collect data from any source. The guides in this section provide strategies for collecting and querying data for use in your existing implementation, or in apps you build. The opportunities are endless. Guides to collect data Add custom attributes Use custom attributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes",
- "info": "",
+ "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
+ "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 145.26768,
+ "_score": 149.75664,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "sections": "Add customattributes",
- "body": " data Add customattributes Use customattributes for deeper analysis 15 min Collect data - any source APIs, agents, OS emitters - get any data 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events 25 min Build queries with NerdGraph Try NerdGraph and build the queries you need 10 min Query data with NRQL Query default data, custom events, and attributes"
+ "title": "NewRelicOne CLI Nerdpackcommands",
+ "sections": "NewRelicOne CLI Nerdpackcommands",
+ "info": "An overview of the CLI commands you can use to set up your NewRelicOneNerdpacks.",
+ "body": "NewRelicOne CLI Nerdpackcommands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
},
- "id": "5efa997328ccbc768c307de2"
+ "id": "5f28bd6a64441f9817b11a38"
},
{
- "category_2": "Custom events",
- "nodeid": 13661,
"sections": [
- "Event data sources",
- "Default events",
- "Custom events",
- "Data requirements and limits for custom event data",
- "General requirements",
- "Reserved words",
- "Additional Browser PageAction requirements",
- "Additional Event API requirements",
- "Event type limits",
- "For more help"
+ "Intro to NerdStorage",
+ "Use NerdStorage in your apps",
+ "Data model",
+ "Limits",
+ "Data access",
+ "Permissions for working with NerdStorage"
],
- "title": "Data requirements and limits for custom event data",
- "category_0": "Insights",
- "type": "docs",
- "category_1": "Event data sources",
- "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits",
- "external_id": "f5beef0d09bb5918be3f8a1a3ece98c09947cd1e",
+ "title": "Intro to NerdStorage",
+ "type": "developer",
+ "tags": [
+ "nerdstorage",
+ "nerdstorage components",
+ "new relic one apps",
+ "data access"
+ ],
+ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62",
"image": "",
- "url": "https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits",
- "published_at": "2020-09-20T19:39:10Z",
- "updated_at": "2020-09-20T19:39:10Z",
- "breadcrumb": "Contents / Insights / Event data sources / Custom events",
+ "url": "https://developer.newrelic.com/explore-docs/nerdstorage/",
+ "published_at": "2020-09-22T01:49:58Z",
+ "updated_at": "2020-09-08T01:50:19Z",
"document_type": "page",
"popularity": 1,
- "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ",
- "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
+ "info": "Intro to NerdStorage on New Relic One",
+ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 106.41948,
+ "_score": 114.382904,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "Data requirements and limits for custom event data",
- "sections": "Custom events",
- "info": "For New Relic, general limits and requirements for reporting custom events and attributes. ",
- "category_2": "Custom events",
- "translation_ja_url": "https://docs.newrelic.co.jp/docs/insights/insights-data-sources/custom-data/insights-custom-data-requirements-limits",
- "body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements",
- "breadcrumb": "Contents / Insights / Event data sources / Custom events"
+ "sections": "Use NerdStorage in your apps",
+ "info": "Intro to NerdStorage on NewRelicOne",
+ "tags": "newreliconeapps",
+ "body": "Intro to NerdStorage 30 min To help you build a NewRelicOne application, we provide you with the NewRelicOne SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users"
},
- "id": "59f4354f4bb81c2ea8b80d0a"
+ "id": "5efa989ee7b9d2048e7bab92"
},
{
- "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png",
- "url": "https://developer.newrelic.com/",
"sections": [
- "Mark your calendar for Nerd Days 1.0",
- "Get coding",
- "Create custom events",
- "Add tags to apps",
- "Build a Hello, World! app",
- "Get inspired",
- "Add a table to your app",
- "Collect data - any source",
- "Automate common tasks",
- "Create a custom map view",
- "Add a time picker to your app",
- "Add custom attributes",
- "New Relic developer champions",
- "New Relic Podcasts"
+ "Intro to New Relic One API components",
+ "Components of the SDK",
+ "UI components",
+ "Chart components",
+ "Query and storage components",
+ "Platform APIs"
],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic Developers",
- "updated_at": "2020-09-21T01:36:40Z",
+ "title": "Intro to New Relic One API components",
"type": "developer",
- "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab",
+ "tags": [
+ "SDK components",
+ "New Relic One apps",
+ "UI components",
+ "chart components",
+ "query and storage components",
+ "Platform APIs"
+ ],
+ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2",
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/",
+ "published_at": "2020-09-22T01:49:59Z",
+ "updated_at": "2020-08-14T01:47:12Z",
"document_type": "page",
"popularity": 1,
- "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 22 Days : 14 Hours : 58 Minutes : 30 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
- "info": "",
+ "info": "Intro to New Relic One API components",
+ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 95.49095,
+ "_score": 69.63768,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "sections": "Add customattributes",
- "body": " customattributes Use customattributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin"
+ "title": "Intro to NewRelicOne API components",
+ "sections": "Intro to NewRelicOne API components",
+ "info": "Intro to NewRelicOne API components",
+ "tags": "NewRelicOneapps",
+ "body": "Intro to NewRelicOne API components To help you build NewRelicOne applications, we provide you with the NewRelicOne SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations"
},
- "id": "5d6fe49a64441f8d6100a50f"
+ "id": "5efa989e28ccbc4071307de5"
},
{
- "nodeid": 32796,
"sections": [
- "New Relic solutions",
- "Measure DevOps success",
- "Plan your cloud adoption",
- "Optimize your cloud native environment",
- "Customer experience improvement: Track experience indicators",
- "1. Use custom attributes to associate performance data",
- "2. Create dashboards with performance and business metrics",
- "3. Share dashboards across departments",
- "4. Use data to separate performance by cohort and debug issues at the customer level",
- "For more help"
+ "Set up your development environment",
+ "Before you begin",
+ "A note on support",
+ "Tip",
+ "Prepare to build or modify apps",
+ "Start building",
+ "Contribute to developer.newrelic.com"
],
- "title": "Customer experience improvement: Track experience indicators",
- "type": "docs",
- "external_id": "4e6a6333e185fe1886b02fa3e5b98a819d9e0f99",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png",
- "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/optimize-your-cloud-native-environment/customer-experience-improvement-track-experience-indicators",
- "published_at": "2020-09-20T20:05:59Z",
- "updated_at": "2020-09-11T00:14:45Z",
- "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Optimize your cloud native environment",
+ "title": "Set up your development environment",
+ "type": "developer",
+ "tags": [
+ "developer account",
+ "API key",
+ "New Relic One CLI"
+ ],
+ "external_id": "c45638a9cd548d1ffffc9f1c7708f115a92ae04a",
+ "image": "",
+ "url": "https://developer.newrelic.com/build-apps/set-up-dev-env/",
+ "published_at": "2020-09-22T01:48:41Z",
+ "updated_at": "2020-08-26T01:47:20Z",
"document_type": "page",
"popularity": 1,
- "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.",
- "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effects of application and infrastructure performance on your business. A clear understanding of what creates a successful customer experience can help modern software teams become more efficient and boost productivity. An efficient, well-functioning IT culture helps organizations make rapid, frequent releases and product changes. A strong culture also democratizes data beyond the typical backend users, making it available to groups such as customer service, support, sales, and marketing. However, this information enablement is useful only if it serves to optimize customer experience. The four steps outlined here are designed to help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the frontend and backend transactions responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both the frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Establish objectives and baselines tutorials, consider what service-level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the ones listed above to measure the impact of your changes and optimizations at a customer level—rather than just measuring pure performance. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could the product team make more informed roadmap decisions? Customer success: Can this data be used to make customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Use data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help",
+ "info": "Prepare to build apps and contribute to this site",
+ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The New Relic One command line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app, you might have some additional setup and configuration. This guide covers: Downloading the New Relic One CLI to build or modify apps Contribute content to this website Before you begin You must have: A github account account - While not strictly necessary for building apps, a GitHub account enables you to download and customize our open source apps, and contribute an open source project. A New Relic developer account - if you don't already have one, you can get a free trial account for developing New Relic applications. npm - If you've installed Node.js, then you already have npm, which is used to share, reuse, and update JavaScript code, and is necessary for working with React components that are the framework for New Relic apps and this website. A note on support Building a New Relic One application is the same as building any JavaScript/React application. We offer support to help with our building tools (our CLI and SDK library). However, we don't offer support for basic JavaScript or React coding questions or issues. For common questions and answers about building, see the Explorers Hub page on building on New Relic One. Tip Use the New Relic One VSCode extension to build your apps. Prepare to build or modify apps Step 1 of 1 Download the CLI and API key. On the Build New Relic One applications page, complete the Quick start steps. These six Quick start steps get you an API key for use with developing apps, and the New Relic One CLI, for building and deploying apps. At the end of the Quick start, you have a project consisting of the following: A Nerdpack - The package containing all the files required by your application. It contains two types of files that you customize to build your app: Nerdlets, and the launcher. One or more Nerdlet files - A specific UI view or window. A Nerdlet is a React JavaScript package that includes an index.js file, a stylesheet, and a JSON-format config file. It can contain any JS functionality (charts, interactive fields, tooltips, etc.). A launcher file: This is the basis for the launcher, which is used to open your application from New Relic One after you publish your app. Start building Step 1 of 1 If you're ready to code, cd to your Nerdpack and get started. If you want to learn more about building applications, try these step-by-step guides: Build a \"Hello, World!\" application shows how to create a little application, publish it to New Relic One, and share it with others by subscribing accounts to it. Map pageviews by region takes you through the steps to create one of our popular open source apps. You learn to add a custom query to an app and view it in a table, then add that data to a map. Contribute to developer.newrelic.com This site is open source, and we want your input. Create a pull request if you see a mistake you know how to fix. Drop us a GitHub issue if you see some content gaps you want us to work on. Or write up a whole new guide if you have one you'd like to share. Read on to learn how. Step 1 of 3 Fork the developer-website GithHub repo. Forking the repo enables you to work on your own copy of the developer.newrelic.com files, and build the site locally. It also enables us to more easily manage incomimg pull requests. On the developer-website page in GitHub, select the Fork button on the top right of the page, choose the account you want to fork to, and wait a few seconds while the fork is created. Sync regularly to keep your fork up to date with changes and additions to the main branch upstream. Step 2 of 3 Make a feature or documentation request. On any page, select the GitHub button at the top of the page, and then select the kind of change you want, and fill out the GitHub form. Step 3 of 3 Contribute a new guide. Check out our contributors guidelines, which will walk you through the process.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 84.87949,
+ "_score": 54.315395,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "Customer experience improvement: Track experience indicators",
- "sections": "1. Use customattributes to associate performance data",
- "info": "The four steps help you leverage the data you collect to make the greatest possible improvements in your organization’s digital customer experience.",
- "body": " with customattributes. If you plan to collect this information in both the frontend and backend, be sure to forward customattributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase"
+ "sections": "Prepare to build or modify apps",
+ "info": "Prepare to build apps and contribute to this site",
+ "tags": "NewRelicOne CLI",
+ "body": "Set up your development environment 20 min If you've decided to build a custom app or modify one of our open source apps, you need a few essential tools: The NewRelicOnecommand line interface (CLI) An API key, which you get when you download the CLI Depending on what you want to do with your app"
},
- "id": "5f5ac17528ccbce4f0532733"
+ "id": "5efa9973e7b9d242237bab39"
},
{
- "nodeid": 16556,
"sections": [
- "New Relic solutions",
- "Measure DevOps success",
- "Plan your cloud adoption",
- "Optimize your cloud native environment",
- "Customer experience improvement: track experience indicators",
- "Prerequisites",
- "1. Use custom attributes to associate performance data",
- "2. Create dashboards with performance and business metrics",
- "3. Share dashboards across departments",
- "4. Utilize data to separate performance by cohort and debug issues at the customer level",
- "For more help"
+ "Nerdpack file structure",
+ "Generate Nerdpack components",
+ "Nerdlet file structure",
+ "index.js",
+ "nr1.json",
+ "styles.scss",
+ "icon.png",
+ "Launcher file structure"
],
- "title": "Customer experience improvement: track experience indicators",
- "type": "docs",
- "external_id": "f9dd5a60c37a9ce8e30b061f42dd92b77c97829c",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Insights-catalyst-dashbaord-1.png",
- "url": "https://docs.newrelic.com/docs/new-relic-solutions/new-relic-solutions/measure-devops-success/customer-experience-improvement-track-experience-indicators",
- "published_at": "2020-09-21T03:57:05Z",
- "updated_at": "2020-09-10T10:42:56Z",
- "breadcrumb": "Contents / New Relic solutions / New Relic solutions / Measure DevOps success",
+ "title": "Nerdpack file structure",
+ "type": "developer",
+ "tags": [
+ "New Relic One CLI",
+ "nerdpack",
+ "file structure",
+ "nerdlets",
+ "launchers"
+ ],
+ "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161",
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/",
+ "published_at": "2020-09-22T01:49:58Z",
+ "updated_at": "2020-08-14T01:49:25Z",
"document_type": "page",
"popularity": 1,
- "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.",
- "body": "This tutorial covers methods to identify and track the key indicators of customer experience and clarifies the effect of application performance on your business. A clear understanding of what creates successful customer experience helps DevOps teams drive greater efficiencies in work efforts and deliver greater productivity. An efficient, well-functioning DevOps culture enables organizations to make rapid, frequent releases and product changes. A strong DevOps culture also democratizes data beyond the typical backend users, and makes it available to groups like customer service, support, sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use custom attributes to associate performance data In order to relate performance data to user experience, you need to capture information that ties a particular user or customer to the front- and back-end transactions that are responsible for their interactions with your application. In New Relic, you collect this data with custom attributes. If you plan to collect this information in both frontend and backend, be sure to forward custom attributes from APM to Browser. Here are some common attributes to collect: User ID Organization or customer ID A/B testing cohort value High-value customer indicator Purchase value or product IDs (for e-commerce) If you’ve completed the Iterate and measure impact or Establish objectives and baselines tutorials, consider what service level objectives (SLOs) or key metrics you defined in those stages. New Relic recommends including attributes like the above to measure the impact of your changes and optimizations at a customer level—not only a performance level. 2. Create dashboards with performance and business metrics Using the attributes collected in Step 1, build dashboards to examine the impact of performance issues on your users. Additionally, to drive visibility across your teams, add dedicated widgets to the team dashboards you built in the Establish team dashboards . insights.newrelic.com > Dashboards For example, if you were collecting a custom username attribute, you could use NRQL queries like these to create your widgets for your New Relic Insights dashboard: Number of errors by username: SELECT count(*) FROM TransactionError FACET username Median response time by username: SELECT percentile(duration,50) FROM Transaction FACET username Total purchase value in transactions with errors: SELECT sum(purchaseTotal) FROM TransactionError FACET username If you include a FACET clause in your queries, you’ll be able to click into metric results to see corresponding change in the performance data. For more information on faceting, see Linking Between Dashboards to Drill Into Your Data. 3. Share dashboards across departments Dashboards, data, and metrics that nobody looks at or knows about might as well not exist. When considering how, or with whom, to share your dashboards, consider the following questions: Which teams are responsible for applications that have high levels of end-user interaction? What non-engineering teams could benefit from this information? Customer support: Could customer issues be resolved faster? Product/engineering: Could product make more informed roadmap decisions? Customer success: Can this data be used to make our customers more successful? Are there other teams that can benefit from cohort analysis that includes performance metrics? 4. Utilize data to separate performance by cohort and debug issues at the customer level After you create your dashboards, use them to scope issues affecting particular customers or sets of customers. For example, the following widget shows which apps have errors for a particular user: insights.newrelic.com > Dashboards Use attributes that track user and performance to set alerts on high priority users or customers. For example, you could include a WHERE clause in your NRQL queries to scope the results to a set of user IDs or customer IDs. Set alerts on any performance or business metric that is tied to these attributes. See NRQL alerts will change how you think about using New Relic data for more information. For more help",
+ "info": "An overview of the Nerdpack File Structure",
+ "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │ └── my-nerdlet-launcher │ ├── icon.png │ └── nr1.json ├── nerdlets │ └── my-nerdlet-nerdlet │ ├── index.js │ ├── nr1.json │ └── styles.scss ├── node_modules │ ├── js-tokens │ ├── loose-envify │ ├── object-assign │ ├── prop-types │ ├── react │ ├── react-dom │ ├── react-is │ └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return
Hello, my-awesome-nerdpack Nerdlet!
; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 83.68257,
+ "_score": 48.53816,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "Customer experience improvement: track experience indicators",
- "sections": "1. Use customattributes to associate performance data",
- "info": "Identify and track the key indicators of customer experience to understand the effect of application performance on your business.",
- "body": ", sales, and marketing. However, this data information enablement is only useful if its purpose is to improve and optimize customer experience. Prerequisites This tutorial assumes you’ve reviewed the Establish team dashboards tutorial. 1. Use customattributes to associate performance data In order"
+ "title": "Nerdpack file structure",
+ "sections": "Nerdpack file structure",
+ "info": "An overview of the Nerdpack File Structure",
+ "tags": "NewRelicOne CLI",
+ "body": " components, see our app building guides and the NewRelicOne CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │ └── my-nerdlet-launcher │ ├── icon.png"
},
- "id": "5f5adb2728ccbc7152532752"
+ "id": "5efa989e196a671300766404"
}
],
- "/build-apps/add-time-picker-guide": [
+ "/explore-docs/nr1-subscription": [
{
"sections": [
- "Add tables to your New Relic One application",
- "Before you begin",
- "Clone and set up the example application",
- "Work with table components",
- "Next steps"
+ "New Relic One CLI reference",
+ "Installing the New Relic One CLI",
+ "Tip",
+ "New Relic One CLI Commands",
+ "Get started",
+ "Configure your CLI preferences",
+ "Set up your Nerdpacks",
+ "Manage your Nerdpack subscriptions",
+ "Install and manage plugins",
+ "Manage catalog information"
],
- "title": "Add tables to your New Relic One application",
+ "title": "New Relic One CLI reference",
"type": "developer",
"tags": [
- "table in app",
- "Table component",
- "TableHeaderc omponent",
- "TableHeaderCell component",
- "TableRow component",
- "TableRowCell component"
+ "New Relic One app",
+ "nerdpack commands"
],
- "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936",
- "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png",
- "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:48:42Z",
+ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
+ "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
+ "url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
+ "published_at": "2020-09-22T01:52:51Z",
+ "updated_at": "2020-09-17T01:51:10Z",
"document_type": "page",
"popularity": 1,
- "info": "Add a table to your New Relic One app.",
- "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial
component. The items property collects the data by calling _getItems(), which contains sample values.
; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.",
+ "info": "Intro to New Relic One API components",
+ "body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 50.573654,
+ "_score": 200.02661,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "Nerdpack file structure",
- "sections": "Nerdpack file structure",
- "info": "An overview of the Nerdpack File Structure",
- "tags": "NewRelicOne CLI",
- "body": " components, see our app building guides and the NewRelicOne CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │ └── my-nerdlet-launcher │ ├── icon.png"
+ "title": "Intro to NewRelicOne API components",
+ "sections": "Intro to NewRelicOne API components",
+ "info": "Intro to NewRelicOne API components",
+ "tags": "NewRelicOneapps",
+ "body": " settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the NewRelicOne platform, by reading and writing state from and to the URL, setting the configuration, etc"
},
- "id": "5efa989e196a671300766404"
- }
- ],
- "/explore-docs/nr1-subscription": [
+ "id": "5efa989e28ccbc4071307de5"
+ },
{
"sections": [
"New Relic One CLI reference",
@@ -3658,7 +3772,7 @@
"external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
"image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
"url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:52:51Z",
"updated_at": "2020-09-17T01:51:10Z",
"document_type": "page",
"popularity": 1,
@@ -3666,71 +3780,19 @@
"body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 352.37167,
+ "_score": 188.92491,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI reference",
- "sections": "NewRelicOneCLICommands",
- "info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
- "tags": "NewRelicOne app",
- "body": " extension to build your apps. NewRelicOneCLICommands This table provides descriptions for the NewRelicOnecommands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions"
+ "title": "NewRelicOne CLI reference",
+ "sections": "NewRelicOne CLI reference",
+ "info": "An overview of the CLI to help you build, deploy, and manage NewRelicapps.",
+ "tags": "NewRelicOneapp",
+ "body": "NewRelicOne CLI reference To build a NewRelicOneapp, you must install the NewRelicOne CLI. The CLI helps you build, publish, and manage your NewRelicapp. We provide a variety of tools for building apps, including the NewRelicOne CLI (command line interface). This page explains how to use"
},
"id": "5efa989e28ccbc535a307dd0"
},
- {
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
- "sections": [
- "New Relic One CLI Nerdpack commands",
- "Command details",
- "nr1 nerdpack:build",
- "Builds a Nerdpack",
- "Usage",
- "Options",
- "nr1 nerdpack:clone",
- "Clone an existing Nerdpack",
- "nr1 nerdpack:serve",
- "Serve your Nerdpack locally",
- "nr1 nerdpack:uuid",
- "Get your Nerdpack's UUID",
- "nr1 nerdpack:publish",
- "Publish your Nerdpack",
- "nr1 nerdpack:deploy",
- "Deploy your Nerdpack to a channel",
- "nr1 nerdpack:undeploy",
- "Undeploy your Nerdpack",
- "nr1 nerdpack:clean",
- "Removes all built artifacts",
- "nr1 nerdpack:validate",
- "Validates artifacts inside your Nerdpack",
- "nr1 nerdpack:Info",
- "Shows the state of your Nerdpack in the New Relic's registry"
- ],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic One CLI Nerdpack commands",
- "updated_at": "2020-09-17T01:49:55Z",
- "type": "developer",
- "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
- "document_type": "page",
- "popularity": 1,
- "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
- "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 151.75645,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NewRelicOneCLI Nerdpack commands",
- "sections": "NewRelicOneCLI Nerdpack commands",
- "info": "An overview of the CLIcommands you can use to set up your NewRelicOne Nerdpacks.",
- "body": "NewRelicOneCLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
- },
- "id": "5f28bd6a64441f9817b11a38"
- },
{
"sections": [
"New Relic CLI Reference",
@@ -3744,7 +3806,7 @@
"external_id": "471ed214caaf80c70e14903ec71411e2a1c03888",
"image": "",
"url": "https://developer.newrelic.com/explore-docs/newrelic-cli/",
- "published_at": "2020-09-21T01:52:19Z",
+ "published_at": "2020-09-22T01:51:30Z",
"updated_at": "2020-08-14T01:47:12Z",
"document_type": "page",
"popularity": 1,
@@ -3752,111 +3814,107 @@
"body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 141.11885,
+ "_score": 185.996,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicCLI Reference",
- "sections": "NewRelicCLIcommands",
- "info": "The command line tools for performing tasks against NewRelic APIs",
- "tags": "newreliccli",
- "body": "NewRelicCLI Reference The NewRelicCLI enables the integration of NewRelic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding NewRelic into your CI/CD pipeline. NewRelicCLIcommands Find details for the NewRelicCLIcommand docs"
+ "title": "NewRelic CLI Reference",
+ "sections": "NewRelic CLI Reference",
+ "info": "The command line tools for performing tasks against NewRelic APIs",
+ "tags": "newrelic cli",
+ "body": "NewRelic CLI Reference The NewRelic CLI enables the integration of NewRelic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding NewRelic into your CI/CD pipeline. NewRelic CLI commands Find details for the NewRelic CLI command docs"
},
"id": "5efa989ee7b9d2024b7bab97"
- },
+ }
+ ],
+ "/explore-docs/nr1-nerdpack": [
{
"image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-common/",
+ "url": "https://developer.newrelic.com/explore-docs/nr1-subscription/",
"sections": [
- "New Relic One CLI common commands",
+ "New Relic One CLI subscription commands",
"Command details",
- "nr1 help",
- "See commands and get details",
+ "nr1 subscription:set",
+ "Subscribe to a Nerdpack",
"Usage",
- "Arguments",
- "Examples",
- "nr1 update",
- "Update your CLI",
- "nr1 create",
- "Create a new component",
"Options",
- "nr1 profiles",
- "Manage your profiles keychain",
- "Commands",
- "nr1 autocomplete",
- "See autocomplete installation instructions",
- "nr1 nrql",
- "Query using NRQL"
- ],
- "published_at": "2020-09-21T01:46:19Z",
- "title": "New Relic One CLI common commands",
- "updated_at": "2020-08-14T01:48:10Z",
- "type": "developer",
- "external_id": "503e515e1095418f8d19329517344ab209d143a4",
+ "Aliases",
+ "nr1 subscription:list",
+ "See your subscription",
+ "nr1 subscription:unset",
+ "Unsubscribe from a Nerdpack"
+ ],
+ "published_at": "2020-09-22T01:51:29Z",
+ "title": "New Relic One CLI subscription commands",
+ "updated_at": "2020-08-06T01:44:54Z",
+ "type": "developer",
+ "external_id": "12d2e1b06dede5b1272527f95a14518010aecc58",
"document_type": "page",
"popularity": 1,
- "info": "An overview of common commands you can use with the New Relic One CLI.",
- "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.",
+ "info": "An overview of the CLI commands you can use to manage your Nerdpack subscriptions.",
+ "body": "New Relic One CLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Command details nr1 subscription:set Subscribe to a Nerdpack Subscribes your account to a specific Nerdpack and channel. This command can be run with a Nerdpack UUID or within a specific Nerdpack folder. By default, the command uses the Nerdpack ID in package.json and subscribes to the STABLE channel. An account can only be subscribed to one Nerdpack and channel at a time. Usage $ nr1 subscription:set Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. -c, --channel=DEV/BETA/STABLE Specifies the channel to subscribe to. [default: STABLE] --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:subscribe nr1 subscription:list See your subscription Lists all the Nerdpacks your account is subscribed to. Your account is linked to your API key. Usage $ nr1 subscription:list Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 subscription:unset Unsubscribe from a Nerdpack Unsubscribes your account from a specific Nerdpack. When this command is executed within a Nerdpack folder, the Nerdpack ID from package.json is used by default. Usage $ nr1 subscription:unset Options -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to subscribe to. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. Aliases $ nr1 nerdpack:unsubscribe $ nr1 subscription:delete $ nr1 subscription:remove $ nr1 subscription:rm",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 129.46721,
+ "_score": 806.06995,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI common commands",
- "sections": "NewRelicOneCLI common commands",
- "info": "An overview of common commands you can use with the NewRelicOneCLI.",
- "body": "NewRelicOneCLI common commands Here's a list of common commands to get you started with the NewRelicOneCLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1"
+ "title": "NewRelicOneCLI subscription commands",
+ "sections": "NewRelicOneCLI subscription commands",
+ "info": "An overview of the CLIcommands you can use to manage your Nerdpack subscriptions.",
+ "body": "NewRelicOneCLI subscription commands To manage your Nerdpack subscriptions, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1"
},
- "id": "5f28bd6ae7b9d267996ade94"
+ "id": "5f2b6096e7b9d225ebc9de6f"
},
{
"image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-plugins/",
+ "url": "https://developer.newrelic.com/explore-docs/nr1-common/",
"sections": [
- "New Relic One CLI plugin commands",
+ "New Relic One CLI common commands",
"Command details",
- "nr1 plugins:install",
- "Install a plugin",
+ "nr1 help",
+ "See commands and get details",
"Usage",
"Arguments",
- "Options",
"Examples",
- "Aliases",
- "nr1 plugins:link",
- "Link your plugin",
- "nr1 plugins:update",
- "Update your plugins",
- "nr1 plugins:uninstall",
- "Uninstall your plugin"
+ "nr1 update",
+ "Update your CLI",
+ "nr1 create",
+ "Create a new component",
+ "Options",
+ "nr1 profiles",
+ "Manage your profiles keychain",
+ "Commands",
+ "nr1 autocomplete",
+ "See autocomplete installation instructions",
+ "nr1 nrql",
+ "Query using NRQL"
],
- "published_at": "2020-09-21T01:52:20Z",
- "title": "New Relic One CLI plugin commands",
- "updated_at": "2020-08-14T01:50:34Z",
+ "published_at": "2020-09-22T01:47:24Z",
+ "title": "New Relic One CLI common commands",
+ "updated_at": "2020-08-14T01:48:10Z",
"type": "developer",
- "external_id": "6e94c2de165c2b01c2b15c9297a7314f1895112e",
+ "external_id": "503e515e1095418f8d19329517344ab209d143a4",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI commands you can use to install and manage your plugins.",
- "body": "New Relic One CLI plugin commands To install and manage your plugins, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Command details nr1 plugins:install Install a plugin Installs a plugin into the CLI. You can install plugins from npm or a Git URL. Please note that installing a plugin will override the core plugin. For example, if you have a core plugin that has a 'hello' command, then installing a plugin with a 'hello' command will override the core plugin implementation. This is useful if you want to update the core plugin functionality without patching and updating the whole CLI. Usage $ nr1 plugins:install PLUGIN Arguments PLUGIN: the name, path, or URL of the plugin you want to install. required Options -f, --force Runs yarn install --force. This forces a re-download of all the plugin's packages. -h, --help Shows CLI help. --verbose Adds extra information to the output. Examples $ nr1 plugins:install myplugin $ nr1 plugins:install https://github.com/someuser/someplugin $ nr1 plugins:install someuser/someplugin Aliases $ nr1 plugins:add nr1 plugins:link Link your plugin Links a local plugin into the CLI for development. Please note that linking a plugin will override your user-installed plugin or core plugin. For example, if you have a user-installed or core plugin that has a 'hello' command, linking a plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work. Usage $ nr1 plugins:link PLUGIN Arguments PLUGIN: the name, path, or URL of the plugin you want to link. required Options -h, --help Shows CLI help. --verbose Adds extra information to the output. Examples $ nr1 plugins:link myplugin $ nr1 plugins:link someuser/someplugin nr1 plugins:update Update your plugins Updates all of your installed plugins. Usage $ nr1 plugins:update Options -h, --help Shows CLI help. --verbose Adds extra information to the output. nr1 plugins:uninstall Uninstall your plugin Removes a plugin from the CLI. Usage $ nr1 plugins:uninstall PLUGIN Arguments PLUGIN: the name of the plugin you want to uninstall. required Options -h, --help Shows CLI help. --verbose Adds extra information to the output. Aliases $ nr1 plugins:unlink $ nr1 plugins:remove",
+ "info": "An overview of common commands you can use with the New Relic One CLI.",
+ "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 116.87464,
+ "_score": 573.77954,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI plugin commands",
- "sections": "NewRelicOneCLI plugin commands",
- "info": "An overview of the CLIcommands you can use to install and manage your plugins.",
- "body": "NewRelicOneCLI plugin commands To install and manage your plugins, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin"
+ "title": "NewRelicOneCLI common commands",
+ "sections": "NewRelicOneCLI common commands",
+ "info": "An overview of common commands you can use with the NewRelicOneCLI.",
+ "body": " (NewRelic query language). See our other NewRelicOneCLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command"
},
- "id": "5f28bd6a196a670ddd19d000"
- }
- ],
- "/explore-docs/nr1-plugins": [
+ "id": "5f28bd6ae7b9d267996ade94"
+ },
{
"sections": [
"New Relic One CLI reference",
@@ -3879,7 +3937,7 @@
"external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
"image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
"url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:52:51Z",
"updated_at": "2020-09-17T01:51:10Z",
"document_type": "page",
"popularity": 1,
@@ -3887,7 +3945,7 @@
"body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 333.28137,
+ "_score": 381.49585,
"_version": null,
"_explanation": null,
"sort": null,
@@ -3896,95 +3954,175 @@
"sections": "NewRelicOneCLICommands",
"info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
"tags": "NewRelicOne app",
- "body": " extension to build your apps. NewRelicOneCLICommands This table provides descriptions for the NewRelicOnecommands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions"
+ "body": ". For more on how to serve and publish your application, see our guide on Deploying your NewRelicOne app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet"
},
"id": "5efa989e28ccbc535a307dd0"
},
{
"image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
+ "url": "https://developer.newrelic.com/explore-docs/nr1-catalog/",
"sections": [
- "New Relic One CLI Nerdpack commands",
+ "New Relic One CLI catalog commands",
"Command details",
- "nr1 nerdpack:build",
- "Builds a Nerdpack",
+ "nr1 catalog:info",
+ "Get catalog details",
"Usage",
"Options",
- "nr1 nerdpack:clone",
- "Clone an existing Nerdpack",
- "nr1 nerdpack:serve",
- "Serve your Nerdpack locally",
- "nr1 nerdpack:uuid",
- "Get your Nerdpack's UUID",
- "nr1 nerdpack:publish",
- "Publish your Nerdpack",
- "nr1 nerdpack:deploy",
- "Deploy your Nerdpack to a channel",
- "nr1 nerdpack:undeploy",
- "Undeploy your Nerdpack",
- "nr1 nerdpack:clean",
- "Removes all built artifacts",
- "nr1 nerdpack:validate",
- "Validates artifacts inside your Nerdpack",
- "nr1 nerdpack:Info",
- "Shows the state of your Nerdpack in the New Relic's registry"
+ "nr1 catalog:submit",
+ "Send info to the catalog"
],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic One CLI Nerdpack commands",
- "updated_at": "2020-09-17T01:49:55Z",
+ "published_at": "2020-09-22T01:51:29Z",
+ "title": "New Relic One CLI catalog commands",
+ "updated_at": "2020-08-14T01:49:24Z",
"type": "developer",
- "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
+ "external_id": "e94d6ad2cd04e2c01aecef526778d341867b3031",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
- "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
+ "info": "An overview of the CLI commands you can use to manage your New Relic One catalog information.",
+ "body": "New Relic One CLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder. Command details nr1 catalog:info Get catalog details Shows the information about your application that's displayed in the catalog. If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the --nerdpack-id=NERDPACK_ID option to query from a specific Nerdpack. Usage $ nr1 catalog:info Options -f, --field=FIELD Specifies which field you want info from. -i, --nerdpack-id=NERDPACK_ID Specifies which Nerdpack to get info from. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 catalog:submit Send info to the catalog Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our catalog docs for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative. This command must be run on a Nerdpack folder. The command will search for specific files using convention names. Usage $ nr1 catalog:submit Options -P, --skip-screenshots Skips upload of screenshot assets. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 151.09546,
+ "_score": 165.2886,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI Nerdpack commands",
- "sections": "NewRelicOneCLI Nerdpack commands",
- "info": "An overview of the CLIcommands you can use to set up your NewRelicOne Nerdpacks.",
- "body": "NewRelicOneCLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
+ "title": "NewRelicOneCLI catalog commands",
+ "sections": "NewRelicOneCLI catalog commands",
+ "info": "An overview of the CLIcommands you can use to manage your NewRelicOne catalog information.",
+ "body": "NewRelicOneCLI catalog commands To manage your catalog, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits"
},
- "id": "5f28bd6a64441f9817b11a38"
+ "id": "5f28bd6a64441f805eb11a26"
},
{
"sections": [
- "New Relic CLI Reference",
- "New Relic CLI commands",
- "Options",
- "Commands"
+ "Nerdpack file structure",
+ "Generate Nerdpack components",
+ "Nerdlet file structure",
+ "index.js",
+ "nr1.json",
+ "styles.scss",
+ "icon.png",
+ "Launcher file structure"
],
- "title": "New Relic CLI Reference",
+ "title": "Nerdpack file structure",
"type": "developer",
- "tags": "new relic cli",
- "external_id": "471ed214caaf80c70e14903ec71411e2a1c03888",
+ "tags": [
+ "New Relic One CLI",
+ "nerdpack",
+ "file structure",
+ "nerdlets",
+ "launchers"
+ ],
+ "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161",
"image": "",
- "url": "https://developer.newrelic.com/explore-docs/newrelic-cli/",
- "published_at": "2020-09-21T01:52:19Z",
- "updated_at": "2020-08-14T01:47:12Z",
+ "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/",
+ "published_at": "2020-09-22T01:49:58Z",
+ "updated_at": "2020-08-14T01:49:25Z",
"document_type": "page",
"popularity": 1,
- "info": "The command line tools for performing tasks against New Relic APIs",
- "body": "New Relic CLI Reference The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline. New Relic CLI commands Find details for the New Relic CLI command docs in GitHub. Options --format string output text format [YAML, JSON, Text] (default \"JSON\") -h, --help help for newrelic --plain output compact text Copy Commands newrelic apm - Interact with New Relic APM newrelic completion - Generates shell completion functions newrelic config - Manage the configuration of the New Relic CLI newrelic documentation - Generate CLI documentation newrelic entity - Interact with New Relic entities newrelic nerdgraph - Execute GraphQL requests to the NerdGraph API newrelic nerdstorage - Read, write, and delete NerdStorage documents and collections. newrelic nrql - Commands for interacting with the New Relic Database newrelic profile - Manage the authentication profiles for this tool newrelic version - Show the version of the New Relic CLI newrelic workload - Interact with New Relic One workloads",
+ "info": "An overview of the Nerdpack File Structure",
+ "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │ └── my-nerdlet-launcher │ ├── icon.png │ └── nr1.json ├── nerdlets │ └── my-nerdlet-nerdlet │ ├── index.js │ ├── nr1.json │ └── styles.scss ├── node_modules │ ├── js-tokens │ ├── loose-envify │ ├── object-assign │ ├── prop-types │ ├── react │ ├── react-dom │ ├── react-is │ └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return
; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 88.73569,
+ "_score": 507.93372,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "body": " Services Install on Azure Service Fabric Install on Azure Web Apps Processor architectures The agent is available in both 32-bit (x86) and 64-bit versions on Windows as well as 64-bit on Linux. Permissions Installing and running the .NET agent requires these permissions: Component Necessary permissions"
+ "title": "Map page views by region in a custom app",
+ "sections": "Query your browser data",
+ "info": "Build a New Relic app showing page view data on a world map.",
+ "tags": "custom app",
+ "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace"
},
- "id": "5dc2a08ae7b9d295c8e46457"
+ "id": "5efa993c196a67066b766469"
},
{
"sections": [
- "Serve, publish, and deploy your New Relic One app",
- "Before you begin",
- "Serve your app locally",
- "Add images and metadata to your apps",
- "screenshots folder",
- "documentation.md",
- "additionalInfo.md",
- "config.json",
- "Publish your app",
- "Tip",
- "Deploy your app",
- "Subscribe or unsubsribe apps",
- "Handle duplicate applications"
+ "Query and store data",
+ "Components overview",
+ "Query components",
+ "Mutation components",
+ "Static methods",
+ "NrqlQuery"
],
- "title": "Serve, publish, and deploy your New Relic One app",
+ "title": "Query and store data",
"type": "developer",
"tags": [
- "publish apps",
- "deploy apps",
- "subscribe apps",
- "add metadata apps"
+ "nerdgraph query components",
+ "mutation components",
+ "static methods"
],
- "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c",
- "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png",
- "url": "https://developer.newrelic.com/build-apps/publish-deploy/",
- "published_at": "2020-09-21T01:50:10Z",
- "updated_at": "2020-09-02T02:05:55Z",
+ "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026",
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/",
+ "published_at": "2020-09-22T01:52:51Z",
+ "updated_at": "2020-08-01T01:42:02Z",
"document_type": "page",
"popularity": 1,
- "info": "Start sharing and using the custom New Relic One apps you build",
- "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.",
+ "info": "Reference guide for SDK query components using NerdGraph",
+ "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
({data, error}) => { if (error) { return
Failed to retrieve list: {error.message}
; } return data.map((account) => {
{account.name}
}); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 88.50234,
+ "_score": 280.2961,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "Serve, publish, and deploy your New Relic One app",
- "sections": "Add images and metadata to your apps",
- "info": "Start sharing and using the custom New Relic One apps you build",
- "tags": "publish apps",
- "body": " to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpackmanager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test"
+ "title": "Query and store data",
+ "sections": "Componentsoverview",
+ "info": "Reference guide for SDK querycomponents using NerdGraph",
+ "tags": "nerdgraphquerycomponents",
+ "body": " be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query"
},
- "id": "5efa999de7b9d283e67bab8f"
+ "id": "5efa989e28ccbc2f15307deb"
+ },
+ {
+ "nodeid": 39216,
+ "sections": [
+ "New Relic Alerts",
+ "Get started",
+ "Alert policies",
+ "Alert conditions",
+ "Alert violations",
+ "Alert Incidents",
+ "Alert notifications",
+ "Troubleshooting",
+ "Rules, limits, and glossary",
+ "Alerts and Nerdgraph",
+ "REST API alerts",
+ "NerdGraph API: Loss of signal and gap filling",
+ "Customize your loss of signal detection",
+ "View loss of signal settings for an existing condition",
+ "Create a new condition with loss of signal settings",
+ "Update the loss of signal settings of a condition",
+ "Customize gap filling",
+ "For more help"
+ ],
+ "title": "NerdGraph API: Loss of signal and gap filling",
+ "category_0": "Alerts and Applied intelligence",
+ "type": "docs",
+ "category_1": "New Relic Alerts",
+ "external_id": "30401b9a2c96886f6ac0a8f12682f5e0e626a659",
+ "image": "",
+ "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-loss-signal-gap-filling",
+ "published_at": "2020-09-21T04:04:55Z",
+ "updated_at": "2020-09-18T07:09:33Z",
+ "breadcrumb": "Contents / Alerts and Applied intelligence / New Relic Alerts / Alerts and Nerdgraph",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "Customize how New Relic detects loss of signal and what values it should use for filling gaps in the data.",
+ "body": "Limited release Loss of signal occurs when New Relic stops receiving data for a while; technically, we detect loss of signal after a significant amount of time has elapsed since data was last received in a time series. Loss of signal can be used to trigger or resolve a violation, which you can use to set up alerts. Gap filling can help you solve issues caused by lost data points. When gaps are detected between valid data points, we automatically fill those gaps with replacement values, such as the last known values or a static value. Gap filling can prevent alerts from triggering or resolving when they shouldn't. You can customize loss of signal detection and gap filling using NerdGraph. For example, you can configure how long to wait before considering the signal lost, or what value should be used for filling gaps in the time series. Here are some queries and examples you can use in our NerdGraph API explorer. In this guide we cover the following: Customize loss of signal detection Customize gap filling Customize your loss of signal detection Loss of signal detection opens or closes violations if no data is received after a certain amount of time. For example, if you set the duration of the expiration period to 60 seconds and an integration doesn't seem to send data for more than a minute, a loss of signal violation would be triggered. You can configure the duration of the signal loss and whether to open a violation or close it by using these three fields in NerdGraph: expiration.expirationDuration: How long to wait, in seconds, after the last data point is received by our platform before considering the signal as lost. This is based on the time when data arrives at our platform and not on data timestamps. The default is to leave this null, and therefore this wouldn't enable Loss of Signal Detection. expiration.openViolationOnExpiration: If true, a new violation is opened when a signal is lost. Default is false. To use this field, a duration must be specified. expiration.closeViolationsOnExpiration: If true, open violations related to the signal are closed on expiration. Default is false. To use this field, a duration must be specified. View loss of signal settings for an existing condition Existing NRQL conditions may have their loss of signal settings already configured. To view the existing condition settings, select the fields under nrqlCondition > expiration: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: NRQL_CONDITION_ID) { ... on AlertsNrqlStaticCondition { id name nrql { query } expiration { closeViolationsOnExpiration expirationDuration openViolationOnExpiration } } } } } } } You should see a result like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlCondition\": { \"expiration\": { \" closeViolationsOnExpiration \": false, \" expirationDuration \": 300, \" openViolationOnExpiration \": true }, \"id\": \"YOUR_ACCOUNT_ID\", \"name\": \"Any less than - Extrapolation\", \"nrql\": { \"query\": \"SELECT average(value) FROM AlertsSmokeTestSignals WHERE wave_type IN ('min-max', 'single-gap') FACET wave_type\" } } } } } }, ... Create a new condition with loss of signal settings Let's say that you want to create a new create a NRQL static condition that triggers a loss of signal violation after no data is received for two minutes. You would set expirationDuration to 120 seconds and set openViolationOnExpiration to true, like in the example below. mutation { alertsNrqlConditionStaticCreate( accountId: YOUR_ACCOUNT_ID policyId: YOUR_POLICY_ID condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS expiration : { expirationDuration : 120 openViolationOnExpiration : true } } ) { id name } } Update the loss of signal settings of a condition What if you want to update loss of signal parameters for an alert condition? The following mutation allows you to update a NRQL static condition with new expiration values. mutation { alertsNrqlConditionStaticUpdate( accountId: YOUR_ACCOUNT_ID id: YOUR_STATIC_CONDITION_ID condition: { expiration: { closeViolationsOnExpiration : BOOLEAN expirationDuration : DURATION_IN_SECONDS openViolationOnExpiration : BOOLEAN } } ) { id expiration { closeViolationsOnExpiration expirationDuration openViolationOnExpiration } } } Customize gap filling Gap filling replaces gap values in a time series with either the last value found or a static, arbitrary value of your choice. We fill gaps only after another data point has been received after the gaps in signal — that is, after data reception has been restored. You can configure both the type of filling and the value (if the type is set to static): signal.fillOption: Type of replacement value for lost data points. Values can be: NONE: Gap filling is disabled. LAST_VALUE: The last value seen in the time series. STATIC: An arbitrary value, defined in fillValue. signal.fillValue: Value to use for replacing lost data points when fillOption is set to STATIC. Gap filling is also affected by expiration.expirationDuration. When a gap is longer than the expiration duration, the signal is considered expired and the gap will no longer be filled. For example, here's how you would create a static NRQL condition with gap filling configured: mutation { alertsNrqlConditionStaticCreate( accountId: YOUR_ACCOUNT_ID policyId: YOUR_POLICY_ID condition: { enabled: true name: \"Example Gap Filling Condition\" nrql: { query: \"select count(*) from Transaction\" } terms: { operator: ABOVE priority: CRITICAL threshold: 1000 thresholdDuration: 300 thresholdOccurrences: ALL } valueFunction: SINGLE_VALUE violationTimeLimit: EIGHT_HOURS signal: { evaluationOffset: 3, fillOption: STATIC, fillValue: 1 } } ) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 265.78638,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "NerdGraph API: Loss of signal and gap filling",
+ "sections": "Alerts and Nerdgraph",
+ "info": "Customize how New Relic detects loss of signal and what values it should use for filling gaps in the data.",
+ "category_0": "Alerts and Applied intelligence",
+ "body": " in our NerdGraph API explorer. In this guide we cover the following: Customize loss of signal detection Customize gap filling Customize your loss of signal detection Loss of signal detection opens or closes violations if no data is received after a certain amount of time. For example, if you set"
+ },
+ "id": "5f645d2d28ccbcd200337db9"
+ },
+ {
+ "sections": [
+ "Explore NerdGraph using the API Explorer",
+ "Before you begin",
+ "Build a query to retrieve your name",
+ "Click the play button to see the result",
+ "Add more fields to your query",
+ "Experiment with mutations",
+ "Tip",
+ "Try your NerdGraph query in the terminal",
+ "Next steps"
+ ],
+ "title": "Explore NerdGraph using the API Explorer",
+ "type": "developer",
+ "tags": [
+ "nerdgraph",
+ "mutations",
+ "nerdgraph query terminal"
+ ],
+ "external_id": "df1f04edc2336c69769d946edbaf263a5339bc92",
+ "image": "https://developer.newrelic.com/static/0ce8c387a290d7fbd6be155322be9bce/bc8d6/create-account.png",
+ "url": "https://developer.newrelic.com/collect-data/get-started-nerdgraph-api-explorer/",
+ "published_at": "2020-09-22T01:47:24Z",
+ "updated_at": "2020-08-21T01:47:54Z",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "Explore NerdGraph, our GraphQL API, and build the queries you need.",
+ "body": "Explore NerdGraph using the API Explorer 25 min NerdGraph is New Relic's GraphQL API. It allows you to get all the information you need in a single request. With NerdGraph API Explorer you don't need to know the query format: using the Query Builder you can browse our entire graph and compose queries just by selecting the items you want and filling out their required values. Before you begin Go to api.newrelic.com/graphiql and log in using your New Relic user ID and password: the NerdGraph API Explorer loads up. Make sure you have a valid New Relic API key. You can create one directly from the NerdGraph API Explorer. Step 1 of 5 Build a query to retrieve your name Time for your first NerdGraph query. Search for your name in the New Relic database: Erase everything in the query editor. Select the following fields in the query explorer in this order: actor, user, name. This GraphQL snippet appears in the editor. { actor { user { name } } } Copy Step 2 of 5 Click the play button to see the result With this query, you're telling NerdGraph to retrieve your name. You're asking for the name field, which is nested within the user field. This refers to the user who owns the API key, which in turn is nested within actor. Click the play button to see the result: It has almost the same shape as the request. All the fields in the Query Builder make up what's called the GraphQL schema, which describes all the available data types and their attributes. To learn more about each field, click the Docs button, or hover over a field in the editor. Step 3 of 5 Add more fields to your query Now you can try adding more fields to your query. The simplest way is clicking the fields in the Query Builder: The API Explorer knows where the attributes should go in the query. In the example, you add the account id and email fields. Once again, running the GraphQL query results in just the data you need, without over or under-fetching data. Notice that the id field has an argument: passing arguments is a powerful way of customizing your NerdGraph queries. Every field and object can contain arguments, so instead of running multiple queries, you just compose the one that you need. { actor { user { name email } account(id: 12345678) } } Copy Step 4 of 5 Experiment with mutations In GraphQL, mutations are a way to execute queries with side effects that can alter the data by creating, updating, or deleting objects (Commonly referred to as CRUD operations in REST APIs). Ready for your first mutation? Erase what's in the editor. Scroll down the Query Builder and expand mutation. Select the fields in the following screenshot: In this case, you're trying to add a custom tag to an entity. Notice that the editor complains if you don't select errors: mutations must have a way of telling you how the operation performed in the backend (failed requests result in null responses). Tip Unlike REST, GraphQL APIs like NerdGraph can return partial responses. For example, if you try adding tags to multiple entities, some mutations can fail and others succeed; all is logged in the GraphQL response you get. Step 5 of 5 Try your NerdGraph query in the terminal Let's say that you've built a NerdGraph query you're happy with and you want to test it elsewhere. To capture code-ready queries and mutations: Select the Tools menu. Copy the query as a curl call or as a New Relic CLI command. # curl version curl https://api.newrelic.com/graphql \\ -H 'Content-Type: application/json' \\ -H 'API-Key: API_KEY_REDACTED' \\ --data-binary '{\"query\":\"{\\n actor {\\n user {\\n name\\n email\\n }\\n account(id: 12345678)\\n }\\n}\\n\", \"variables\":\"\"}' # New Relic CLI version newrelic nerdgraph query '{ actor { user { name email } account(id: 12345678) } } ' Copy Next steps Now you know the basics of composing and testing NerdGraph queries, but how do you turn them into client or server code? Solutions such as GraphQL Code Generator can help you turn the NerdGraph queries into code for your implementation. Try creating more complex queries by clicking fields and expanding objects in the Query Builder (be careful with mutations though, since they could write data to your account). For more information on NerdGraph and explore other projects from the developer community, check out the threads on the Explorer’s Hub.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 261.95038,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "Explore NerdGraph using the API Explorer",
+ "sections": "Try your NerdGraphquery in the terminal",
+ "info": "Explore NerdGraph, our GraphQL API, and build the queries you need.",
+ "tags": "nerdgraphquery terminal",
+ "body": " the account id and email fields. Once again, running the GraphQL query results in just the data you need, without over or under-fetching data. Notice that the id field has an argument: passing arguments is a powerful way of customizing your NerdGraph queries. Every field and object can contain"
+ },
+ "id": "5efa9973196a6791f4766402"
}
],
"/automate-workflows/get-started-kubernetes": [
@@ -4739,7 +4918,7 @@
"Set up New Relic using the Kubernetes operator",
"Set up New Relic using Terraform"
],
- "published_at": "2020-09-21T01:47:52Z",
+ "published_at": "2020-09-22T01:49:59Z",
"title": "Automate workflows",
"updated_at": "2020-09-21T01:47:51Z",
"type": "developer",
@@ -4750,7 +4929,7 @@
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 138.74149,
+ "_score": 129.10634,
"_version": null,
"_explanation": null,
"sort": null,
@@ -4802,7 +4981,7 @@
"body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Condition settings Use the Condition settings to: Configure whether and how open violations are force-closed. Adjust the evaluation offset. Create a concise and descriptive condition name. (NerdGraph API Only) Provide a text description for the condition that will be included in violations and notifications. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 74.90407,
+ "_score": 73.82193,
"_version": null,
"_explanation": null,
"sort": null,
@@ -4819,58 +4998,6 @@
},
"id": "5f2d992528ccbc489d88dfc1"
},
- {
- "category_2": "On-host integrations list",
- "nodeid": 37666,
- "sections": [
- "On-host integrations",
- "Get started",
- "Installation",
- "On-host integrations list",
- "Understand and use data",
- "Troubleshooting",
- "VMware Tanzu monitoring integration",
- "Features",
- "Compatibility and requirements",
- "Install and activate",
- "Find and use data",
- "Set up an alert",
- "Metric data",
- "PCFCapacity",
- "PCFContainerMetric",
- "PCFCounterEvent",
- "PCFHttpStartStop",
- "PCFLogMessage",
- "PCFValueMetric",
- "Fields shared across metric data",
- "For more help"
- ],
- "title": "VMware Tanzu monitoring integration",
- "category_0": "Integrations",
- "type": "docs",
- "category_1": "On-host integrations",
- "external_id": "f5ee24e5356985a8c695f8ec80f4547e0224a081",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/tanzu-alert-chart.png",
- "url": "https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/vmware-tanzu-monitoring-integration",
- "published_at": "2020-09-20T21:31:02Z",
- "updated_at": "2020-09-17T15:18:22Z",
- "breadcrumb": "Contents / Integrations / On-host integrations / On-host integrations list",
- "document_type": "page",
- "popularity": 1,
- "info": "Use our integration to gain increased visibility into the performance of your VMware Tanzu environment.",
- "body": "Our VMware Tanzu integration helps you understand the health and performance of your PCF environment. Query data from different Tanzu instances and cloud providers, and go from high level views down to the most granular data, such as the last duration of the garbage collector pause. VMware Tanzu data visualized in a New Relic One dashboard. The integration uses Loggregator to collect metrics and events generated by all Tanzu platform components and applications that run on cells. It connects to our platform by instrumenting the VMware Tanzu Application Service (TAS) and the Cloud Foundry Application Runtime (CFAR). To collect data from VMware PKS, use the New Relic Cluster Monitoring integration. Features With the New Relic VMware Tanzu integration you can: Monitor the health of your deployments using our extensive collection of charts and dashboards. Set alerts based on any metrics collected from Firehose. Retrieve logs and metrics related to user apps deployed on the platform. Stream metrics from platform components and health metrics from BOSH-deployed VMs. Filter logs and metrics by configuring the nozzle during and after the installation. Scale the number of instances of the nozzle to support different volumes of data. Use the data retrieved to monitor Key Performance and Key Capacity Scaling indicators. Instrument and monitor multiple VMware Tanzu instances using the same account. Compatibility and requirements Our integration is compatible with VMware Tanzu (Pivotal Platform) version 2.4 to 2.8, and Ops Manager version 2.4 to 2.8. BOSH stemcells must be based on Ubuntu Xenial. Before installing the integration, make sure that you need a VMware Tanzu account. This integration sends custom events. If you find you are reaching the custom event data collection and data retention limits of your subscription, please reach out to your New Relic representative. Install and activate The quickest way to install the VMware Tanzu integration is by importing the nr-firehose-nozzle tile into Ops Manager. For more information, see the VMware Tanzu documentation. You can also deploy the nozzle as a standard application, edit the manifest, and run cf push from the command line; see how to build and deploy the integration in our GitHub repository. Find and use data Once you install and activate the VMware Tanzu integration, you can find the data and predefined charts in one.newrelic.com > Infrastructure > Third-party services > VMware Tanzu dashboard. You can query the data to create custom charts and dashboards, and add them to your account. If you collect data from multiple Tanzu environments, use pcf.domain and pcf.IP metrics with WHERE or FACET to discriminate between events from different Tanzu deployments. Tanzu metrics are aggregated in order to reduce memory and network consumption. However, you can increase the number of samples acting on the drain interval in the configuration. Many prebuilt dashboards and charts displaying VMware Tanzu data are available upon request. Contact your New Relic representative to get them added to your New Relic account. Set up an alert VMware Tanzu provides a list of indicators on key performance and key capacity scaling, together with warning and critical values that you can monitor using NRQL alert conditions. Here is a sample NRQL query that sets up an alert on memory consumption related to the system space: SELECT average(app.memory.used) FROM PCFContainerMetric WHERE metric.name = 'app.memory' AND app.space.name = 'system' FACET app.instance.uid Here is the resulting chart in New Relic One: For more information on NRQL queries and how to set up different notification channels for alerts, see Create alert conditions for NRQL queries. Creating alert conditions from Infrastructure > Settings is currently not supported for this integration. Metric data The VMware Tanzu integration provides the following metric data: PCFCapacity PCFContainerMetric PCFCounterEvent PCFHttpStartStop PCFLogMessage PCFValueMetric Shared fields (Aggregation, App, Decoration) PCFCapacity Contains all the shared Aggregation and Decoration fields. Name Description metric.source.remaining Type of remaining capacity (for example, integer) metric.source.remaining.value Value of total remaining capacity metric.source.total Type of total capacity (for example, integer) metric.source.total.value Value of total capacity PCFContainerMetric Resource usage of an app in a container. Contains all the shared Aggregation, App, and Decoration fields. If the value of metric.name is app.disk, two additional fields are available: Name Description app.disk.quota Total available disk in bytes app.disk.used Disk currently used in percentage If the value of metric.name is app.memory, two additional fields are available: Name Description app.memory.quota Total available memory in bytes app.memory.used Memory currently used as percentage PCFCounterEvent Increment of a counter. Contains all the shared Aggregation and Decoration fields. Name Description total.reported Current value of the counter PCFHttpStartStop The whole lifecycle of an HTTP request. Contains all the shared Decoration fields. Name Description http.content.length Length of response (in bytes) http.duration Duration of the HTTP request (in milliseconds) http.method Method of the request http.peer.type Role of the emitting process in the request cycle (server or client) http.remote.address Remote address of the request. For a server, this should be the origin of the request http.request.id ID for tracking the lifecycle of the request http.start.timestamp UNIX timestamp (in nanoseconds) when the request was sent (by a client) or received (by a server) http.status Status code returned with the response to the request http.stop.timestamp UNIX timestamp (in nanoseconds) when the request was received http.uri Destination of the request http.user.agent Contents of the UserAgent header on the request PCFLogMessage Log lines and associated metadata. Contains all the shared Aggregation, App, and Decoration fields. Name Description log.app.id Application that emitted the message (or to which the application is related) log.message Log message log.message.type Type of the message (OUT or ERR) log.source.instance Instance that emitted the message log.source.type Source of the message. For Cloud Foundry, this can be APP, RTR, DEA, STG, etc. log.timestamp UNIX timestamp (in nanoseconds) when the log was written PCFValueMetric A flat list of key-value pairs fetched from Loggregator. For an extensive list, see the official documentation. Contains all the shared Aggregation and Decoration fields. Fields shared across metric data VMWare Tanzu metrics contain shared data fields in the following categories: Aggregation fields App fields Decoration fields Aggregation fields Fields generated by the aggregation process. Shared by PCFCounterEvent, PCFContainerMetric, and PCFValueMetric. Name Description metric.max Maximum value of the metric recorded by the nozzle from the last aggregated metric sent metric.min Minimum value of the metric recorded by the nozzle from the last aggregated metric sent metric.name Name of the reported metric Note: the field may contain hundreds of different values metric.sample.last.value Last received value of the metric metric.samples.count Number of samples of the metric received by the nozzle since the last aggregated metric sent metric.sum Sum of all the metric values recorded by the nozzle from the last aggregated metric sent metric.type Metric type (for example, integer) metric.unit Metric unit. For example, delta, seconds, or bytes App fields Fields that describe the source of the data. Shared by PCFContainerMetric and PCFLogMessage. Name Description app.instance.state Status of the application app.instance.uid Id of the application instance app.instances.desired Number of instances required app.name Name of the application app.org.name Organization the application belongs to app.space.name Space where the application is running Decoration fields Fields that contain information related to the agent, the PCF environment, and a timestamp. Shared by all data types. Name Description agent.instance Nozzle ID agent.ip Nozzle IP address agent.subscription Agent subscription ID, registered at the firehose agent.version Version of the nozzle bosh.domain API URL of your Tanzu environment pcf.IP IP address (used to uniquely identify source) pcf.deployment Deployment name (used to uniquely identify source) pcf.domain API URL of your Tanzu environment pcf.index Index of job (used to uniquely identify the source) pcf.job Job name (used to uniquely identify the source) pcf.origin Unique description of the origin of the event timestamp UNIX timestamp (in milliseconds) of the event. Example: 1582023990236 pcf.envelope.type Type of wrapped event nr.customEventSource source of the custom event For more help",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 63.276497,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "sections": "Set up an alert",
- "body": " conditions. Here is a sample NRQL query that sets up an alert on memory consumption related to the system space: SELECT average(app.memory.used) FROM PCFContainerMetric WHERE metric.name = 'app.memory' AND app.space.name = 'system' FACET app.instance.uid Here is the resulting chart in New Relic One: For more"
- },
- "id": "5f5a3859e7b9d23f52acfd77"
- },
{
"category_2": "Understand and use data",
"nodeid": 37981,
@@ -4900,7 +5027,7 @@
"body": "New Relic's ECS integration reports and displays performance data from your Amazon ECS environment. This document provides some recommended alert conditions for monitoring ECS performance. Recommended alert conditions Here are some recommended ECS alert conditions. To add these alerts, go to the Alerts UI and add the following NRQL alert conditions to an existing or new alert policy: High CPU usage NRQL: FROM ContainerSample SELECT cpuUsed / cpuLimitCores Critical: > 90% for 5 minutes High memory usage NRQL: FROM ContainerSample SELECT memoryUsageBytes / memorySizeLimitBytes Critical: > 80% for 5 minutes Restart count NRQL: FROM ContainerSample SELECT max(restartCount) - min(restartCount) Critical: > 5 for 5 minutes For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 62.533207,
+ "_score": 62.274147,
"_version": null,
"_explanation": null,
"sort": null,
@@ -4950,7 +5077,7 @@
"body": "You can use baseline conditions to define violation thresholds that adjust to the behavior of your data. Baseline alerting is useful for creating conditions that: Only notify you when data is behaving abnormally. Dynamically adjust to changing data and trend s, including daily or weekly trends. In addition, baseline alerting works well with new applications when you do not yet have known behaviors. How it works When you choose a data source (for example, an APM metric) for a baseline condition, we'll use the past values of that data to dynamically predict the data's near-future behavior. The line of that predicted future behavior for that value is called a baseline. It appears as a dotted black line on the preview chart in the baseline condition UI. You'll use the baseline alert condition UI to: Adjust how sensitive the condition is to fluctuations in the data source. Set the behavior that will trigger a violation (for example: \"deviating for more than five minutes\"). Set whether you want the condition to check for upper violations, lower violations, or both. When your data escapes the predicted \"normal\" behavior and meets the criteria you've chosen, you'll receive a notification. Set baseline thresholds one.newrelic.com > AI & Alerts > Policies > (create or select policy) > Create alert condition: Baseline alert conditions give you the ability to set intelligent, self-adjusting thresholds that only generate violations when abnormal behavior is detected. To create a baseline condition: When you start to create a condition, choose one of the following data sources: APM: Application metric baseline Browser: Metric baseline NRQL (and then choose a baseline type threshold) Here are some tips for setting baseline thresholds: Set the baseline direction to monitor violations that happen either above or below the baseline. Set the preview chart to either 2 days or 7 days of displayed data. (Not applicable for NRQL alert conditions.) Use the slider bar to adjust the Critical threshold sensitivity, represented in the preview chart by the light gray area around the baseline. The tighter the band around the baseline, the more sensitive it is and the more violations it will generate. Optional: You can create a Warning threshold (the darker gray area around the baseline). For NRQL alerts, see the allowed types of NRQL queries. If the alert condition applies to multiple apps, you can select a choice from the dropdown above the chart to use different metrics. (Not applicable for NRQL alert conditions.) Baseline rules and settings Here are some details about how the UI works: Rules governing creation of baseline The algorithm for baseline conditions is mathematically complex. Here are some of the major rules governing its predictive abilities: Data trait Baseline rules Age of data On initial creation, the baseline is calculated using between 1 to 4 weeks of data, depending on data availability and baseline type. After its creation, the algorithm will take into account ongoing data fluctuations over a long time period, although greater weight is given to more recent data. For data that has only existed for a short time, the baseline will likely fluctuate a good deal and not be very accurate. This is because there is not yet enough data to determine its usual values and behavior. The more history the data has, the more accurate the baseline and thresholds will become. Consistency of data For metric values that remain in a consistent range or that trend slowly and steadily, their more predictable behavior means that their thresholds will become tighter around the baseline. Data that is more varied and unpredictable will have looser (wider) thresholds. Regular fluctuations For shorter-than-one-week cyclical fluctuations (such as weekly Wednesday 1pm deployments or nightly reports), the baseline algorithm looks for these cyclical fluctuations and attempts to adjust to them. Baseline direction: select upper or lower ranges You can choose whether you want the condition to violate for behavior that goes above the baseline (\"upper\") or that goes below the baseline (\"lower\"), or that goes either above or below. You choose these with the Baseline direction selector. Example use cases for this: You might use the Upper setting for a data source like error rate, because you generally are only concerned if it goes up, and aren't concerned if it goes down. You might use the Lower setting for a data source like throughput, because sudden upward fluctuations are quite common, but a large sudden downswing would be a sign of a problem. Here are examples of how large fluctuations in your data would be treated under the different baseline direction settings. The red areas represent violations. Preview chart: select 2 or 7 days When setting thresholds, the preview chart has an option for displaying Since 2 days ago or Since 7 days ago. These selections are not the time period used to compute the baseline; they are only the time range used for a preview display. For more about the time range used to calculate the baseline, see the algorithm rules. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 61.007103,
+ "_score": 60.678898,
"_version": null,
"_explanation": null,
"sort": null,
@@ -4966,232 +5093,292 @@
"breadcrumb": "Contents / Alerts and Applied intelligence / New Relic Alerts / Alertconditions"
},
"id": "5f2d847b28ccbc876888e004"
- }
- ],
- "/explore-docs/query-and-store-data": [
+ },
{
+ "category_2": "On-host integrations list",
+ "nodeid": 37666,
"sections": [
- "Intro to NerdStorage",
- "Use NerdStorage in your apps",
- "Data model",
- "Limits",
- "Data access",
- "Permissions for working with NerdStorage"
- ],
- "title": "Intro to NerdStorage",
- "type": "developer",
- "tags": [
- "nerdstorage",
- "nerdstorage components",
- "new relic one apps",
- "data access"
+ "On-host integrations",
+ "Get started",
+ "Installation",
+ "On-host integrations list",
+ "Understand and use data",
+ "Troubleshooting",
+ "VMware Tanzu monitoring integration",
+ "Features",
+ "Compatibility and requirements",
+ "Install and activate",
+ "Find and use data",
+ "Set up an alert",
+ "Metric data",
+ "PCFCapacity",
+ "PCFContainerMetric",
+ "PCFCounterEvent",
+ "PCFHttpStartStop",
+ "PCFLogMessage",
+ "PCFValueMetric",
+ "Fields shared across metric data",
+ "For more help"
],
- "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62",
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nerdstorage/",
- "published_at": "2020-09-21T01:53:41Z",
- "updated_at": "2020-09-08T01:50:19Z",
+ "title": "VMware Tanzu monitoring integration",
+ "category_0": "Integrations",
+ "type": "docs",
+ "category_1": "On-host integrations",
+ "external_id": "f5ee24e5356985a8c695f8ec80f4547e0224a081",
+ "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/tanzu-alert-chart.png",
+ "url": "https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/vmware-tanzu-monitoring-integration",
+ "published_at": "2020-09-20T21:31:02Z",
+ "updated_at": "2020-09-17T15:18:22Z",
+ "breadcrumb": "Contents / Integrations / On-host integrations / On-host integrations list",
"document_type": "page",
"popularity": 1,
- "info": "Intro to NerdStorage on New Relic One",
- "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.",
+ "info": "Use our integration to gain increased visibility into the performance of your VMware Tanzu environment.",
+ "body": "Our VMware Tanzu integration helps you understand the health and performance of your PCF environment. Query data from different Tanzu instances and cloud providers, and go from high level views down to the most granular data, such as the last duration of the garbage collector pause. VMware Tanzu data visualized in a New Relic One dashboard. The integration uses Loggregator to collect metrics and events generated by all Tanzu platform components and applications that run on cells. It connects to our platform by instrumenting the VMware Tanzu Application Service (TAS) and the Cloud Foundry Application Runtime (CFAR). To collect data from VMware PKS, use the New Relic Cluster Monitoring integration. Features With the New Relic VMware Tanzu integration you can: Monitor the health of your deployments using our extensive collection of charts and dashboards. Set alerts based on any metrics collected from Firehose. Retrieve logs and metrics related to user apps deployed on the platform. Stream metrics from platform components and health metrics from BOSH-deployed VMs. Filter logs and metrics by configuring the nozzle during and after the installation. Scale the number of instances of the nozzle to support different volumes of data. Use the data retrieved to monitor Key Performance and Key Capacity Scaling indicators. Instrument and monitor multiple VMware Tanzu instances using the same account. Compatibility and requirements Our integration is compatible with VMware Tanzu (Pivotal Platform) version 2.4 to 2.8, and Ops Manager version 2.4 to 2.8. BOSH stemcells must be based on Ubuntu Xenial. Before installing the integration, make sure that you need a VMware Tanzu account. This integration sends custom events. If you find you are reaching the custom event data collection and data retention limits of your subscription, please reach out to your New Relic representative. Install and activate The quickest way to install the VMware Tanzu integration is by importing the nr-firehose-nozzle tile into Ops Manager. For more information, see the VMware Tanzu documentation. You can also deploy the nozzle as a standard application, edit the manifest, and run cf push from the command line; see how to build and deploy the integration in our GitHub repository. Find and use data Once you install and activate the VMware Tanzu integration, you can find the data and predefined charts in one.newrelic.com > Infrastructure > Third-party services > VMware Tanzu dashboard. You can query the data to create custom charts and dashboards, and add them to your account. If you collect data from multiple Tanzu environments, use pcf.domain and pcf.IP metrics with WHERE or FACET to discriminate between events from different Tanzu deployments. Tanzu metrics are aggregated in order to reduce memory and network consumption. However, you can increase the number of samples acting on the drain interval in the configuration. Many prebuilt dashboards and charts displaying VMware Tanzu data are available upon request. Contact your New Relic representative to get them added to your New Relic account. Set up an alert VMware Tanzu provides a list of indicators on key performance and key capacity scaling, together with warning and critical values that you can monitor using NRQL alert conditions. Here is a sample NRQL query that sets up an alert on memory consumption related to the system space: SELECT average(app.memory.used) FROM PCFContainerMetric WHERE metric.name = 'app.memory' AND app.space.name = 'system' FACET app.instance.uid Here is the resulting chart in New Relic One: For more information on NRQL queries and how to set up different notification channels for alerts, see Create alert conditions for NRQL queries. Creating alert conditions from Infrastructure > Settings is currently not supported for this integration. Metric data The VMware Tanzu integration provides the following metric data: PCFCapacity PCFContainerMetric PCFCounterEvent PCFHttpStartStop PCFLogMessage PCFValueMetric Shared fields (Aggregation, App, Decoration) PCFCapacity Contains all the shared Aggregation and Decoration fields. Name Description metric.source.remaining Type of remaining capacity (for example, integer) metric.source.remaining.value Value of total remaining capacity metric.source.total Type of total capacity (for example, integer) metric.source.total.value Value of total capacity PCFContainerMetric Resource usage of an app in a container. Contains all the shared Aggregation, App, and Decoration fields. If the value of metric.name is app.disk, two additional fields are available: Name Description app.disk.quota Total available disk in bytes app.disk.used Disk currently used in percentage If the value of metric.name is app.memory, two additional fields are available: Name Description app.memory.quota Total available memory in bytes app.memory.used Memory currently used as percentage PCFCounterEvent Increment of a counter. Contains all the shared Aggregation and Decoration fields. Name Description total.reported Current value of the counter PCFHttpStartStop The whole lifecycle of an HTTP request. Contains all the shared Decoration fields. Name Description http.content.length Length of response (in bytes) http.duration Duration of the HTTP request (in milliseconds) http.method Method of the request http.peer.type Role of the emitting process in the request cycle (server or client) http.remote.address Remote address of the request. For a server, this should be the origin of the request http.request.id ID for tracking the lifecycle of the request http.start.timestamp UNIX timestamp (in nanoseconds) when the request was sent (by a client) or received (by a server) http.status Status code returned with the response to the request http.stop.timestamp UNIX timestamp (in nanoseconds) when the request was received http.uri Destination of the request http.user.agent Contents of the UserAgent header on the request PCFLogMessage Log lines and associated metadata. Contains all the shared Aggregation, App, and Decoration fields. Name Description log.app.id Application that emitted the message (or to which the application is related) log.message Log message log.message.type Type of the message (OUT or ERR) log.source.instance Instance that emitted the message log.source.type Source of the message. For Cloud Foundry, this can be APP, RTR, DEA, STG, etc. log.timestamp UNIX timestamp (in nanoseconds) when the log was written PCFValueMetric A flat list of key-value pairs fetched from Loggregator. For an extensive list, see the official documentation. Contains all the shared Aggregation and Decoration fields. Fields shared across metric data VMWare Tanzu metrics contain shared data fields in the following categories: Aggregation fields App fields Decoration fields Aggregation fields Fields generated by the aggregation process. Shared by PCFCounterEvent, PCFContainerMetric, and PCFValueMetric. Name Description metric.max Maximum value of the metric recorded by the nozzle from the last aggregated metric sent metric.min Minimum value of the metric recorded by the nozzle from the last aggregated metric sent metric.name Name of the reported metric Note: the field may contain hundreds of different values metric.sample.last.value Last received value of the metric metric.samples.count Number of samples of the metric received by the nozzle since the last aggregated metric sent metric.sum Sum of all the metric values recorded by the nozzle from the last aggregated metric sent metric.type Metric type (for example, integer) metric.unit Metric unit. For example, delta, seconds, or bytes App fields Fields that describe the source of the data. Shared by PCFContainerMetric and PCFLogMessage. Name Description app.instance.state Status of the application app.instance.uid Id of the application instance app.instances.desired Number of instances required app.name Name of the application app.org.name Organization the application belongs to app.space.name Space where the application is running Decoration fields Fields that contain information related to the agent, the PCF environment, and a timestamp. Shared by all data types. Name Description agent.instance Nozzle ID agent.ip Nozzle IP address agent.subscription Agent subscription ID, registered at the firehose agent.version Version of the nozzle bosh.domain API URL of your Tanzu environment pcf.IP IP address (used to uniquely identify source) pcf.deployment Deployment name (used to uniquely identify source) pcf.domain API URL of your Tanzu environment pcf.index Index of job (used to uniquely identify the source) pcf.job Job name (used to uniquely identify the source) pcf.origin Unique description of the origin of the event timestamp UNIX timestamp (in milliseconds) of the event. Example: 1582023990236 pcf.envelope.type Type of wrapped event nr.customEventSource source of the custom event For more help",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 167.76758,
+ "_score": 60.43843,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "tags": "nerdstorage components",
- "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the staticmethods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order"
+ "sections": "Set up an alert",
+ "body": " conditions. Here is a sample NRQL query that sets up an alert on memory consumption related to the system space: SELECT average(app.memory.used) FROM PCFContainerMetric WHERE metric.name = 'app.memory' AND app.space.name = 'system' FACET app.instance.uid Here is the resulting chart in New Relic One: For more"
},
- "id": "5efa989ee7b9d2048e7bab92"
- },
+ "id": "5f5a3859e7b9d23f52acfd77"
+ }
+ ],
+ "/automate-workflows/kubernetes-helm-deployment": [
{
- "category_2": "Java agent release notes",
- "nodeid": 11976,
+ "image": "",
+ "url": "https://developer.newrelic.com/automate-workflows/",
"sections": [
- "APM agent release notes",
- "Go agent release notes",
- "Java agent release notes",
- ".NET agent release notes",
- "Node.js agent release notes",
- "PHP agent release notes",
- "Python agent release notes",
- "Ruby agent release notes",
- "C SDK release notes",
- "Java Agent 3.36.0",
- "Improvements",
- "Fixes"
+ "Automate workflows",
+ "Guides to automate workflows",
+ "Quickly tag resources",
+ "Set up New Relic using Helm charts",
+ "Automatically tag a simple \"Hello World\" Demo across the entire stack",
+ "Automate common tasks",
+ "Set up New Relic using the Kubernetes operator",
+ "Set up New Relic using Terraform"
],
- "title": "Java Agent 3.36.0",
- "category_0": "Release notes",
- "type": "docs",
- "category_1": "APM agent release notes",
- "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050",
- "image": "",
- "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360",
- "published_at": "2020-09-20T20:20:36Z",
- "updated_at": "2018-04-14T23:39:35Z",
- "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes",
- "document_type": "release_notes",
- "popularity": -2,
- "body": "[RSS] Released on: Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.",
+ "published_at": "2020-09-22T01:49:59Z",
+ "title": "Automate workflows",
+ "updated_at": "2020-09-21T01:47:51Z",
+ "type": "developer",
+ "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871",
+ "document_type": "page",
+ "popularity": 1,
+ "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform",
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 47.565067,
+ "_score": 5901.3853,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using staticmethods. The agent now reports WildFly dispatcher name and version. Fixes a bug"
+ "sections": "SetupNewRelicusingHelmcharts",
+ "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min SetupNewRelicusingHelmcharts Learn how to setupNewRelicusingHelmcharts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy"
},
- "id": "58a53cf38e9c0f755a81db4e"
+ "id": "5efa999c196a67dfb4766445"
},
{
- "category_2": "API guides",
- "nodeid": 11521,
+ "category_2": "Private locations",
+ "nodeid": 23821,
"sections": [
- "Java agent",
+ "Synthetic monitoring",
"Getting started",
- "Installation",
- "Additional installation",
- "Heroku",
- "Configuration",
- "Attributes",
- "Features",
- "Instrumentation",
- "Custom instrumentation",
- "API guides",
- "Async instrumentation",
+ "Guides",
+ "Using monitors",
+ "Monitor scripting",
+ "Administration",
+ "Private locations",
+ "UI pages",
+ "Synthetics API",
"Troubleshooting",
- "Guide to using the Java agent API",
- "Use the API",
- "Transactions",
- "Instrument asynchronous work",
- "Implement distributed tracing",
- "Implement cross application tracing",
- "Obtain references to New Relic entities",
- "Additional API functionality",
- "Additional API usage examples",
+ "Install containerized private minions (CPMs)",
+ "General private minion features",
+ "Kubernetes-specific features",
+ "System requirements and compatibility",
+ "Private location key",
+ "Sandboxing and Docker dependencies",
+ "Install and update CPM versions",
+ "Start the CPM",
+ "Stop or delete the CPM",
+ "Show help and examples",
+ "Show license information",
+ "Configure CPM",
+ "Networks",
+ "Security, sandboxing, and running as non-root",
+ "Docker image repository",
+ "Additional considerations for CPM connection",
"For more help"
],
- "title": "Guide to using the Java agent API ",
- "category_0": "APM agents",
+ "title": "Install containerized private minions (CPMs)",
+ "category_0": "Synthetic monitoring",
"type": "docs",
- "category_1": "Java agent",
- "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api",
- "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18",
- "image": "",
- "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api",
- "published_at": "2020-09-20T20:19:15Z",
- "updated_at": "2020-09-03T11:06:02Z",
- "breadcrumb": "Contents / APM agents / Java agent / API guides",
+ "category_1": "Synthetic monitoring",
+ "external_id": "63c77c4ba313098967f23929294f2cbc2f8d31d3",
+ "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/img-integration-k8s@2x.png",
+ "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/install-containerized-private-minions-cpms",
+ "published_at": "2020-09-20T19:02:03Z",
+ "updated_at": "2020-08-13T23:22:19Z",
+ "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations",
"document_type": "page",
"popularity": 1,
- "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.",
- "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
+ "info": "Install New Relic's Docker-based private minion that accepts and runs the jobs assigned to your private locations",
+ "body": "You may not modify any CPM files and New Relic is not liable for any modifications you make. For more information, contact your account representative or a New Relic technical sales rep. Read on to learn about the New Relic containerized private minion (CPM), a Docker container-based private minion that accepts and executes synthetic monitors against your private locations. The CPM can operate in a Docker container system environment or a Kubernetes container orchestration system environment. The CPM will auto-detect its environment to select the appropriate operating mode. General private minion features Because the CPM operates as a container instead of a virtual machine, it delivers many features: Easy to install, start, and update Runs on: Linux macOS Windows Enhanced security and support for non-root user execution Ability to leverage a Docker container as a sandbox environment Customizable monitor check timeout Custom provided modules for scripted monitor types Kubernetes-specific features Also, the CPM delivers the following features in a Kubernetes environment: Integrates with the Kubernetes API to delegate runtime lifecycle management to Kubernetes Does not require privileged access to the Docker socket Supports hosted and on-premise Kubernetes clusters Supports various container engines such as Docker and Containerd Deployable via Helm charts as well as configuration YAMLs Allows job (ping vs. non-ping checks) based resource allocation for optimum resource management Observability offered via the New Relic One Kubernetes cluster explorer System requirements and compatibility To host CPMs, your system must meet the minimum requirements for the chosen system environment. Docker container system environment requirements Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Memory 2.5 GB of RAM per CPU core (dedicated) Disk space A minimum of 10 GB per host Docker version Docker 17.12.1-ce or higher Private location key You must have a private location key Kubernetes container orchestration system environment requirements (CPM v3.0.0 or higher) Compatibility for Requirements Operating system Linux kernel: 3.10 or higher macOS: 10.11 or higher Windows: Windows 10 64-bit or higher Processor A modern, multi-core CPU Minion pod CPU (vCPU/Core): 0.5 up to 0.75 Memory: 800 Mi up to 1.6 Gi Resources allocated to a Minion pod are user configurable. Runner pod CPU (vCPU/Core): 0.5 up to 1 Memory: 1.25 Gi up to 3 Gi For a Scripted API check, 1.25 Gi will be requested with a limit of 2.5 Gi. For a Simple Browser or Scripted Browser check, 2 Gi will be requested with a limit of 3 Gi. Additional considerations: Resources allocated to a Runner pod are not user configurable. The maximum limit-request resource ratio for both CPU and Memory is 2. Disk space Persistent volume (PV) of at least 10 Gi in size Note that if a ReadWriteOnce (RWO) PV is provided to the minion, an implicit node affinity will be established to ensure the minion and the runner containers are scheduled on the same node. This is required to allow the minion and the associated runners access to the PV, as an RWO PV can be accessed only by a single node in the cluster. Kubernetes version We recommend that your Kubernetes cluster supports Kubernetes v1.15. Private location key You must have a private location key Helm Follow installation instructions for Helm v3 for your OS. Kubectl Follow installation instructions for Kubectl for your OS. To view versions, dependencies, default values for how many runner pods start with each minion, the Persistent volume access mode, and more, please see Show help and examples below. Private location key Before launching CPMs, you must have a private location key. Your CPM uses the key to authenticate against New Relic and run monitors associated with that private location. To find the key for existing private location: Go to one.newrelic.com > Synthetics > Private locations. In the Private locations index, locate the private location you want your CPM to be assigned to. Note the key associated with the private location with the key key icon. Sandboxing and Docker dependencies Sandboxing and Docker dependencies are applicable to the CPM in a Docker container system environment. Docker dependencies The CPM runs in Docker and is able to leverage Docker as a sandboxing technology. This ensures complete isolation of the monitor execution, which improves security, reliability, and repeatability. Every time a scripted or browser monitor is executed, the CPM creates a brand new Docker container to run it in called a runner. The minion container needs to be configured to communicate with the Docker engine in order to spawn additional runner containers. Each spawned container is then dedicated to run a check associated with the synthetic monitor running on the private location the minion container is associated with. There are two crucial dependencies at launch. To enable sandboxing, ensure that: Your writable and executable directory is mounted at /tmp. The writable directory can be any directory you want the CPM to write into, but New Relic recommends the system's own /tmp to make things easy. Your writable Docker UNIX socket is mounted at /var/run/docker.sock or DOCKER_HOST environment variable. For more information, see Docker's Daemon socket option. Core count on the host determines how many runner containers the CPM can run concurrently on the host. Since memory requirements are scaled to the expected count of runner containers, we recommend not running multiple CPMs on the same host to avoid resource contention. For additional information on sandboxing and running as a root or non-root user, see Security, sandboxing, and running as non-root. Install and update CPM versions Both installing and updating the CPM use the same command to pull the latest Docker image from the Quay.io repository where the CPM Docker image is hosted. Go to quay.io/repository/newrelic/synthetics-minion for a list of all the releases. CPM images are also hosted on Docker Hub. Go to hub.docker.com/r/newrelic/synthetics-minion/tags for a list of all the releases. Start the CPM To start the CPM, follow the applicable Docker or Kubernetes instructions. Docker start procedure Locate your private location key. Ensure you've enabled Docker dependencies for sandboxing and installed CPM on your system. Run the appropriate script for your system. Tailor the common defaults for /tmp and /var/run/docker.sock in the following examples to match your system. Linux/macOS: docker run \\ --name YOUR_CONTAINER_NAME \\ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" \\ -v /tmp:/tmp:rw \\ -v /var/run/docker.sock:/var/run/docker.sock:rw \\ quay.io/newrelic/synthetics-minion:latest Windows: docker run ^ --name YOUR_CONTAINER_NAME ^ -e \"MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY\" ^ -v /tmp:/tmp:rw ^ -v /var/run/docker.sock:/var/run/docker.sock:rw ^ quay.io/newrelic/synthetics-minion:latest When a message similar to Synthetics Minion is ready and servicing location YOUR_PRIVATE_LOCATION_LABEL appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Set up the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helm charts from the New Relic Helm repo. If you are copying the charts for the first time: helm repo add YOUR_REPO_NAME https://helm-charts.newrelic.com/charts If you previously copied the Helm charts from the New Relic Helm repo, then get the latest: helm repo update Install the CPM with the following Helm command: For a fresh installation of the CPM: helm install YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY To update an existing CPM installation: helm upgrade YOUR_CPM_NAME YOUR_REPO_NAME/synthetics-minion -n YOUR_NAMESPACE --set synthetics.privateLocationKey=YOUR_PRIVATE_LOCATION_KEY Check if the minion pod is up and running: kubectl get -n YOUR_NAMESPACE pods Once the status attribute of each pod is shown as running, your CPM is up and ready to run monitors assigned to your private location. Stop or delete the CPM On a Docker container system environment, use the Docker stop procedure to stop the CPM from running. On a Kubernetes container orchestration system environment, use the Kubernetes delete procedure to stop the CPM from running. Docker stop procedure You can stop a Docker container either by the container name, or the container ID. Container name stop for Linux, macOS, and Windows: docker stop YOUR_CONTAINER_NAME docker rm YOUR_CONTAINER_NAME Container ID stop for Linux/macOS: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. CONTAINER_ID=$(docker ps -aqf name=YOUR_CONTAINER_NAME) docker stop $CONTAINER_ID docker rm $CONTAINER_ID Container ID stop for Windows: In the examples the container is stopped and removed. To only stop the container, omit docker rm $CONTAINER_ID. FOR /F \"tokens=*\" %%CID IN ('docker ps -aqf name=YOUR_CONTAINER_NAME') do (SET CONTAINER_ID=%%CID) docker stop %CONTAINER_ID% docker rm %CONTAINER_ID% Kubernetes delete procedure Get the MINION_POD_INSTALLATION_NAME of the minion pod you want to delete: helm list -n YOUR_NAMESPACE Delete the minion pod: helm uninstall -n YOUR_NAMESPACE MINION_POD_INSTALLATION_NAME Delete the namespace set up for the CPM in your Kubernetes cluster: kubectl delete namespace YOUR_NAMESPACE Show help and examples Use these options as applicable: To get a list of the most commonly used run options directly in the command line interface, run the show help command. To show CPM usage examples as well as the list of all the available run options, run this command: docker run quay.io/newrelic/synthetics-minion:latest help To keep track of Docker logs and verify the health of your monitors, see Containerized private minion (CPM) maintenance and monitoring. For a CPM in the Kubernetes container orchestration system environment, the following Helm show commands can be used to view the chart.yaml and the values.yaml, respectively: helm show chart YOUR_REPO_NAME/synthetics-minion helm show values YOUR_REPO_NAME/synthetics-minion Show license information To show the licensing information for the open source software that we use in the CPM, run the LICENSE command. Run this command to view license information for CPM versions 2.2.27 or higher: docker run quay.io/newrelic/synthetics-minion:latest LICENSE Some of our open-source software is listed under multiple software licenses, and in that case we have listed the license we've chosen to use. Our license information is also available in the our licenses documentation. Configure CPM You can configure the containerized private minion with custom npm modules, preserve data between launches, use environment variables, and more. For more information, see CPM configuration. Networks For both Docker and Kubernetes, the CPM and its runner containers will inherit network settings from the host. For an example of this on a Docker container system environment, see the Docker site. A new bridge network is created for each runner container. This means networking command options like --network and --dns passed to the CPM container at launch (such as through Docker run commands on a Docker container system environment) are not inherited or used by the runner containers. When these networks are created, they pull from the default IP address pool configured for daemon. For an example of this on a Docker container system environment, see the Docker site. Typically, the runner network is removed after the check is completed. However, if a CPM exits while a check is still running, or exits in another unexpected circumstance, these networks may get orphaned. This can potentially use up IP address space that is available to the Docker daemon. If this happens, you may see INTERNAL ENGINE ERROR code: 31 entries in your CPM logging when trying to create a new runner container. To clean these up in Docker container system environments only, run docker network prune. Security, sandboxing, and running as non-root By default, the software running inside a CPM is executed with root user privileges. This is suitable for most scenarios, as the execution is sandboxed. In a Docker container system environment: To change the default AppArmor profile used by containers that CPM spawns to run monitors, see the environment variable MINION_RUNNER_APPARMOR (CPM version 3.0.3 or higher) or MINION_DOCKER_RUNNER_APPARMOR (CPM version up to v3.0.2). To run the CPM as a non-root user, additional steps are required: Run as non-root user for Docker For more information, see Docker's official documentation about security and AppArmor security profiles. If your environment requires you to run the CPM as a non-root user, follow this procedure. In the following example, the non-root user is my_user. Ensure that my_user can use the Docker engine on the host: Verify that my_user belongs to the \"docker\" system group. OR Enable the Docker TCP socket option, and pass the DOCKER_HOST environment variable to CPM. Verify that my_user has read/write permissions to all the directories and volumes passed to CPM. To set these permission, use the chmod command. Get the uid of my_user for use in the run command: id -u my_user. Once these conditions are met, use the option \"-u :\" when launching CPM: docker run ... -u 1002 ... OR docker run ... -u 1002 -e DOCKER_HOST=http://localhost:2375 ... Docker image repository A single CPM Docker image serves both the Docker container system environment and Kubernetes container orchestration system environment. The Docker image is hosted on quay.io. To make sure your Docker image is up-to-date, see the quay.io newrelic/synthetics-minion repository. Additional considerations for CPM connection Connection Description CPMs without Internet access A CPM can operate without access to the internet, but with some exceptions. The public internet health check can be disabled using the environment variables named MINION_NETWORK_HEALTHCHECK_DISABLED for a Docker container system environment or synthetics.minionNetworkHealthCheckDisabled for a Kubernetes container orchestration system environment. The CPM needs to be able to contact the \"synthetics-horde.nr-data.net\" domain. This is necessary for it to report data to New Relic and to receive monitors to execute. Ask your network administration if this is a problem and how to set up exceptions. Communicate with Synthetics via a proxy To set up communication with New Relic by proxy, use the environment variables named MINION_API_PROXY*. Arguments passed at launch This applies to a Docker container environment only. Arguments passed to the CPM container at launch do not get passed on to the containers spawned by the CPM. Docker has no concept of \"inheritance\" or a \"hierarchy\" of containers, and we don't copy the configuration that is passed from CPM to the monitor-running containers. The only shared configuration between them is the one set at the Docker daemon level. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 37.73431,
+ "_score": 122.402435,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Staticmethods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional"
+ "sections": "Using monitors",
+ "info": "Install NewRelic's Docker-based private minion that accepts and runs the jobs assigned to your private locations",
+ "body": " appears, your CPM is up and ready to run monitors assigned to that location. Kubernetes start procedure Locate your private location key. Setup the a namespace for the CPM in your Kubernetes cluster: kubectl create namespace YOUR_NAMESPACE Copy the Helmcharts from the NewRelicHelm repo. If you"
},
- "id": "5a3137f4e621f4576cf1e35f"
+ "id": "5f31d981196a678103fbd731"
},
{
- "category_2": "PHP agent API",
- "nodeid": 11821,
+ "category_2": "Get started",
+ "nodeid": 27301,
"sections": [
- "PHP agent",
- "Getting started",
+ "Kubernetes integration",
+ "Get started",
"Installation",
- "Advanced installation",
- "Configuration",
- "API guides",
- "PHP agent API",
- "Attributes",
- "Features",
- "Frameworks and libraries",
+ "Understand and use data",
+ "Link apps and services",
+ "Kubernetes events",
+ "Logs",
"Troubleshooting",
- "newrelic_add_custom_tracer",
- "Requirements",
- "Description",
- "Parameters",
- "Return value(s)",
- "Example(s)",
- "Instrument a function",
- "Instrument a method within a class",
- "Instrument a method within a namespaced class",
+ "Introduction to the Kubernetes integration",
+ "Get started: Install the Kubernetes integration",
+ "Why it matters",
+ "Navigate all your Kubernetes events",
+ "Bring your cluster logs to New Relic",
+ "Check the source code",
"For more help"
],
- "title": "newrelic_add_custom_tracer (PHP agent API)",
- "category_0": "APM agents",
+ "title": "Introduction to the Kubernetes integration",
+ "category_0": "Integrations",
"type": "docs",
- "category_1": "PHP agent",
- "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e",
+ "category_1": "Kubernetes integration",
+ "external_id": "4ad996d529753d173874d752239ece44c8e6d43f",
"image": "",
- "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer",
- "published_at": "2020-09-20T21:00:10Z",
- "updated_at": "2019-09-30T22:55:59Z",
- "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API",
- "document_type": "api_doc",
+ "url": "https://docs.newrelic.com/docs/integrations/kubernetes-integration/get-started/introduction-kubernetes-integration",
+ "published_at": "2020-09-22T01:38:01Z",
+ "updated_at": "2020-08-05T01:57:55Z",
+ "breadcrumb": "Contents / Integrations / Kubernetes integration / Get started",
+ "document_type": "page",
"popularity": 1,
- "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ",
- "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }",
+ "info": "New Relic's Kubernetes integration: features, requirements, and getting started. ",
+ "body": "New Relic's Kubernetes integration gives you full observability into the health and performance of your environment, no matter whether you run Kubernetes on-premises or in the cloud. With our cluster explorer, you can cut through layers of complexity to see how your cluster is performing, from the heights of the control plane down to applications running on a single pod. one.newrelic.com > Kubernetes cluster explorer: The cluster explorer is our powerful, fully visual answer to the challenges associated with running Kubernetes at a large scale. You can see the power of the Kubernetes integration in the cluster explorer, where the full picture of a cluster is made available on a single screen: nodes and pods are visualized according to their health and performance, with pending and alerting nodes in the innermost circles. Predefined alert conditions help you troubleshoot issues right from the start. Clicking each node reveals its status and how each app is performing. Get started: Install the Kubernetes integration We have an automated installer to help you with many types of installations: servers, virtual machines, and unprivileged environments. It can also help you with installations in managed services or platforms, but you'll need to review a few preliminary notes before getting started. Here's what the automated installer does: Asks for the cluster name and namespace of the integration. Asks for additional setup options, such as Kube state metrics. Asks for the installation method: manifest file or Helm. Generates either the manifest or Helm chart. Read the install docs Start the installer If your New Relic account is in the EU region, access the automated installer from one.eu.newrelic.com. Why it matters Governing the complexity of Kubernetes can be challenging; there's so much going on at any given moment, with containers being created and deleted in a matter of minutes, applications crashing, and resources being consumed unexpectedly. Our integration helps you navigate Kubernetes abstractions across on-premises, cloud, and hybrid deployments. In New Relic, you can build your own charts and query all your Kubernetes data, which our integration collects by instrumenting the container orchestration layer. This gives you additional insight into nodes, namespaces, deployments, replica sets, pods, and containers. one.newrelic.com > Dashboards: Using the chart builder you can turn any query on Kubernetes data to clear visuals. With the Kubernetes integration you can also: Link your APM data to Kubernetes to measure the performance of your web and mobile applications, with metrics such as request rate, throughput, error rate, and availability. Monitor services running on Kubernetes, such as Apache, NGINX, Cassandra, and many more (see our tutorial for monitoring Redis on Kubernetes). Create new alert policies and alert conditions based on your Kubernetes data, or extend the predefined alert conditions. These features are in addition to the data New Relic already reports for containerized processes running on instrumented hosts. Navigate all your Kubernetes events The Kubernetes events integration, which is installed separately, watches for events happening in your Kubernetes clusters and sends those events to New Relic. Events data is then visualized in the cluster explorer. To set it up, check the Kubernetes events box in step 3 of our install wizard, or follow the instructions. one.newrelic.com > Kubernetes cluster explorer > Events: Browse and filter all your Kubernetes events, and dig into application logs and infrastructure data. Bring your cluster logs to New Relic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can set up new alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check the source code This integration is open source software. That means you can browse its source code and send improvements, or you can create your own fork and build it. For more information, see the README. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 26.605156,
+ "_score": 102.57696,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "sections": "Instrument a method within a class",
- "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ",
- "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument"
+ "sections": "Bring your cluster logs to NewRelic",
+ "info": "NewRelic's Kubernetes integration: features, requirements, and getting started. ",
+ "body": " data. Bring your cluster logs to NewRelic Our Kubernetes plugin for log monitoring can collect all your cluster's logs and send them to our platform, so that you can setupnew alerts and charts. To set it up, check the Log data box in step 3 of our install wizard, or follow the instructions. Check"
},
- "id": "58ca4191e621f45edd466e7a"
+ "id": "5cf9564164441f8f472a9169"
},
{
- "nodeid": 9691,
+ "image": "https://developer.newrelic.com/static/kubecon-europe-2020-b989ec0e7b4ed71a89666c35fe934433.jpg",
+ "url": "https://developer.newrelic.com/kubecon-europe-2020/",
"sections": [
- "Introduction to New Relic Mobile (Unity)",
- "Contents",
- "Monitor mobile app performance",
- "Install and configure",
- "Use Unity SDK API",
- "Send custom events and attributes to Insights",
- "Track custom network requests",
- "Uninstall plugin",
- "Unity release notes",
+ "KubeCon and CloudNativeCon Europe 2020",
+ "New Relic welcomes you at Virtual Kubecon and CloudNativeCon Europe 2020!",
+ "Attend one of our lightning talks",
+ "Note",
+ "We handle Prometheus, you keep Grafana",
+ "How to use and customize Helm charts",
+ "Kubernetes observability with context",
+ "What is OpenTelemetry and how to get started?",
+ "OpenTelemetry Architecture",
+ "Kubernetes in the wild: best practices",
+ "Want some action now? Check out the following videos!",
+ "How to use the Kubernetes cluster explorer",
+ "What is OpenTelemetry?",
+ "Connecting Prometheus and Grafana to New Relic"
+ ],
+ "published_at": "2020-09-22T01:52:51Z",
+ "title": "New Relic Developers",
+ "updated_at": "2020-08-15T01:43:38Z",
+ "type": "developer",
+ "external_id": "53cb6afa4f4062ba359559e9fb3bb2406ece2ad4",
+ "document_type": "page",
+ "popularity": 1,
+ "body": "KubeCon and CloudNativeCon Europe 2020 New Relic welcomes you at Virtual Kubecon and CloudNativeCon Europe 2020! Learn more about the New Relic One platform, the only observability platform that provides open, connected and programmable observability for cloud-native environments. Join us to dive into the New Relic One platform and our Kubernetes cluster explorer. Register here Attend one of our lightning talks Note Go to the virtual expo tab, and find New Relic in Silver Hall B to attend a lightning talk. We handle Prometheus, you keep Grafana Mon Aug 17 @ 14:35 CEST Samuel Vandamme How to use and customize Helm charts Mon Aug 17 @ 16:25 CEST Douglas Camata Kubernetes observability with context Tue Aug 18 @ 15:05 CEST Stijn Polfliet What is OpenTelemetry and how to get started? Tue Aug 18 @ 17:15 CEST Lavanya Chockaligam How to use and customize Helm charts Wed Aug 19 @ 15:05 CEST Douglas Camata OpenTelemetry Architecture Wed Aug 19 @ 16:25 CEST John Watson Kubernetes in the wild: best practices Thu Aug 20 @ 15:05 CEST Martin Fuentes Kubernetes observability with context Thu Aug 20 @ 16:50 CEST Stijn Polfliet Want some action now? Check out the following videos! How to use the Kubernetes cluster explorer What is OpenTelemetry? Connecting Prometheus and Grafana to New Relic",
+ "info": "",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 101.517845,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "NewRelic Developers",
+ "sections": "How to use and customize Helmcharts",
+ "body": " to use and customize Helmcharts Mon Aug 17 @ 16:25 CEST Douglas Camata Kubernetes observability with context Tue Aug 18 @ 15:05 CEST Stijn Polfliet What is OpenTelemetry and how to get started? Tue Aug 18 @ 17:15 CEST Lavanya Chockaligam How to use and customize Helmcharts Wed Aug 19 @ 15:05 CEST"
+ },
+ "id": "5f373dcae7b9d20949909274"
+ },
+ {
+ "category_2": "Private locations",
+ "nodeid": 23826,
+ "sections": [
+ "Synthetic monitoring",
+ "Getting started",
+ "Guides",
+ "Using monitors",
+ "Monitor scripting",
+ "Administration",
+ "Private locations",
+ "UI pages",
+ "Synthetics API",
+ "Troubleshooting",
+ "Containerized private minion (CPM) configuration",
+ "Guidelines for mounting volumes",
+ "Custom npm modules",
+ "Change package.json for custom modules",
+ "Permanent data storage",
+ "User-defined environment variables for scripted monitors",
+ "Accessing user-defined environment variables from scripts",
+ "Environment variables",
"For more help"
],
- "title": "Introduction to New Relic Mobile (Unity)",
+ "title": "Containerized private minion (CPM) configuration",
+ "category_0": "Synthetic monitoring",
"type": "docs",
- "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c",
+ "category_1": "Synthetic monitoring",
+ "external_id": "69673df39f26ded4722eabf57c47ff1b84a365ae",
"image": "",
- "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity",
- "published_at": "2020-09-21T00:13:57Z",
- "updated_at": "2020-07-25T00:44:01Z",
- "breadcrumb": "Contents",
+ "url": "https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/private-locations/containerized-private-minion-cpm-configuration",
+ "published_at": "2020-09-20T19:02:02Z",
+ "updated_at": "2020-09-18T01:56:45Z",
+ "breadcrumb": "Contents / Synthetic monitoring / Synthetic monitoring / Private locations",
"document_type": "page",
"popularity": 1,
- "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
- "info": "",
+ "info": "Customize your New Relic containerized private minion (CPM).",
+ "body": "Read on to learn how to configure your containerized private minion (CPM). You can do the following to customize your CPMs: Set up custom modules for scripted browsers in New Relic. Preserve launch data with permanent data storage. Use environment variables in your configuration. You may not modify any CPM files and New Relic is not liable for any modifications you make. Guidelines for mounting volumes All directories and files must be assigned group ownership as 3729 with read/write permissions. This ensures that the Runner, which uses uid: 1000 and gid: 3729, has access to all the mounted volumes. However, the Minion is able to run as root (uid: 0) or with any uid between the range of [2000, 4000], inclusive. For more information, see running as non-root in Kubernetes or Docker. Docker Directories are mounted onto a container as volumes by specifying a -v argument within docker run For example, docker run ... -v /path/to/src:/path/to/dest:rw Kubernetes It is possible to add a directory onto a persistent volume (PV) by using kubectl cp. However, alternative approaches are supported as long as the file permissions are set appropriately. For example, kubectl cp /path/to/src :/path/to/dest will add a directory onto each PV in the specified pod Each PV must have a separate copy of the directories. For example, a cluster with n Minion replicas must have n PVs, each with their own copy of directories The directories and files must be added prior to the Minion boot up, otherwise the Minion must be restarted to detect the updates Custom npm modules Custom npm modules are exclusive to the CPM. They allow you to provide an arbitrary set of npm modules, and make them available for scripted monitors in Synthetics. To set up the modules: Create a directory which contains a package.json, following the npm official guidelines, in the root of the directory. Anything contained in the dependencies field will be installed by the CPM at start, and made available when running monitors on that private minion. Optionally, you can override the root level package.json with a Node version-specific directory. This allows a script to be updated per monitor runtime if a Node version of a runtime is no longer compatible with your dependencies. See an example of this below. Custom module directory In this example, a custom module directory is used with the following structure: /example-custom-modules-dir/ ├── counter │ ├── index.js │ └── package.json └── package.json ⇦ the only mandatory file The package.json defines dependencies as both a local module (i.e. counter) and an npm hosted modules (i.e. async version ^2.6.1): { \"name\": \"custom-modules\", \"version\": \"1.0.0\", ⇦ optional \"description\": \"example custom modules directory\", ⇦ optional \"dependencies\": { \"async\": \"^2.6.1\", ⇦ npm hosted module \"counter\": \"file:./counter\" ⇦ Local module } } Node version-specific overrides You can declare a package.json per Node version that will override the root level package.json. This allows a monitor script to be updated per monitor runtime in the event that the Node version of a runtime is no longer compatible with your dependencies. As shown in the first example, local modules can still be defined within a version specific directory. If a package.json is not defined for a specific Node version, then the root level package.json will be used to install dependencies. In this example, a custom module directory is used with the following structure: /example-custom-modules-dir/ ├── 6.11.2 ⇦ optional Node specific directory │ └── package.json └── 10.15.0 ⇦ optional Node specific directory │ └── package.json ├── counter │ ├── index.js │ └── package.json └── package.json ⇦ the only mandatory file Once you create the custom modules directory and the package.json you can apply it to your CPM for Docker and Kubernetes. Docker For Docker, launch CPM mounting the directory at /var/lib/newrelic/synthetics/modules. For example: docker run ... -v /example-custom-modules-dir:/var/lib/newrelic/synthetics/modules:rw ... Kubernetes Complete the following: Launch the CPM, setting a value for the persistence.customModules configuration value either in the command line or in a YAML file during installation. The value should specify the subpath on your Minion's Persistent Volume where your custom modules files exist. For example: helm install ... --set persistence.customModules= ... Make sure that your custom modules directory is available on the Minion Pod. You can use kubectl cp as one method to copy the directory from your host to the Minion. For example: kubectl cp /example-custom-modules-dir /:/var/lib/newrelic/synthetics/ Look at the CPM logs for \"... Initialization of Custom Modules ...\" to see if the modules were installed properly, or if there were any errors. The npm installation logs will be shown. Now you can add \"require('async');\" into the script of monitors you send to this private location. Change package.json for custom modules Along with npm modules, you can also use Node.js modules. To change the custom modules used by your CPM, modify package.json and reboot the CPM. It will detect the change in configuration during the reboot, and then clean up and re-install. Local modules: While your package.json can include any local module, these modules must reside inside the tree under your custom module directory. If stored outside the tree, the initialization process will fail and you will see an error message in the docker logs after launching CPM. Permanent data storage CPM is a stateless application and does not preserve information from prior requests or sessions by default. However, you can preserve data between launches by enabling permanent data storage. For example, you can permanently set how the minion identifies itself (for example, Minion_ID), and use it to associate the data visible in Synthetics and Insights events with the exact minion that produced it. To set permanent data storage on Docker: Create a directory. Launch the CPM, mounting the directory at /var/lib/newrelic/synthetics. Example: docker run ... -v /example-permanent-dir:/var/lib/newrelic/synthetics:rw ... To set permanent data storage on Kubernetes: Launch the CPM, setting a value for the persistence.permanentData configuration value either in the command line or in a YAML file during installation. The value should specify the subpath on your Minion's Persistent Volume where you want the data to be saved. Example: helm install ... --set persistence.permanentData= ... User-defined environment variables for scripted monitors Containerized private minions let you configure environment variables for use in scripted monitors. These variables are hosted locally on the CPM and can be accessed via $env.USER_DEFINED_VARIABLES. There are two ways to set user-defined variables: by mounting a JSON file or by supplying an environment variable to the CPM on launch. If both are provided, the CPM will use values provided from the environment only. Mounting JSON file The JSON file must have read permissions and contain a JSON formatted map. Example user-defined variable file: { \"KEY\" : \"VALUE\", \"User_Name\": \"MINION\", \"My_Password\": \"PASSW0RD 1 2 3\", \"my_URL\": \"https://newrelic.com/\", \"ETC\" : \"ETC\" } The file must be available or mounted to the path in your container: /var/lib/newrelic/synthetics/variables/user_defined_variables.json Docker example: docker run ... -v /example-user-defined-variables.json:/var/lib/newrelic/synthetics/variables/user_defined_variables.json:rw ... Kubernetes example: When mounting a JSON file to your Minion Pod in Kubernetes, you can either copy the file directly to the Minion Pod or to a Pod that has access to the same Persistent Volume and Persistent Volume Claim that the Minion will use. After successfully loading the file, you may need to restart your Minion Pod for the change to take effect. kubectl cp path/to/user_defined_variables.json /:/var/lib/newrelic/synthetics/variables/user_defined_variables.json Passing as an environment variable Use the -e flag to set up an environment variable named MINION_USER_DEFINED_VARIABLES and give it a value of a JSON formatted map string. docker run ... -e MINION_USER_DEFINED_ENV_VARIABLES='{\"KEY\":\"VALUE\",\"NAME\":\"MINION\",\"ETC\":\"ETC\"}' ... The CPM on Kubernetes does not currently support loading user-defined environment variables via environment variable. You will have to configure your Kubernetes CPM by mounting a JSON file. Accessing user-defined environment variables from scripts To reference a configured user-defined environment variable, use the reserved $env.USER_DEFINED_VARIABLES followed by the name of a given variable with dot notation. For example, $env.USER_DEFINED_VARIABLES.MY_VARIABLE User-defined environment variables are not sanitized from logs. For sensitive information, consider using the secure credentials feature. Environment variables Environmental variables allow you to fine-tune the CPM configuration to meet your specific environmental and functional needs. Docker environment configuration The variables are provided at startup using the -e, --env argument. The following table shows all the environment variables that CPM supports. MINION_PRIVATE_LOCATION_KEY is required, and all other variables are optional. Name Description MINION_PRIVATE_LOCATION_KEY REQUIRED. UUID of the Private Location, as found on the Private Location Web page. DOCKER_API_VERSION Format: \"vX.Y\" API version to be used with the given Docker service. Default: v1.35. DOCKER_HOST Points the minion to a given DOCKER_HOST. If absent, the default value is /var/run/docker.sock. MINION_API_ENDPOINT For US-based accounts, the endpoint is: https://synthetics-horde.nr-data.net. For EU-based accounts, the endpoint is: https://synthetics-horde.eu01.nr-data.net/ Ensure your CPM can connect to the appropriate endpoint in order to serve your monitor. MINION_DOCKER_RUNNER_REGISTRY_ENDPOINT The Docker Registry where the Minion Runner image is hosted. Use this to override quay.io as the default (for example, docker.io). MINION_API_PROXY Format: \"host:port\". MINION_API_PROXY_AUTH Format: \"username:password\" - Support HTTP Basic Auth + additional authentication protocols supported by Chrome. MINION_API_PROXY_SELF_SIGNED_CERT Acceptable values: true, 1, or yes (any case). MINION_CHECK_TIMEOUT The maximum amount of seconds that your monitor checks are allowed to run. This value must be an integer between 0 seconds (excluded) and 900 seconds (included) (for example, from 1 second to 15 minutes). Default: 65 seconds for ping monitors, 180 seconds for the other monitor types. MINION_DOCKER_API_VERSION Synonym of DOCKER_API_VERSION. MINION_DOCKER_HOST Synonym of DOCKER_HOST. MINION_RUNNER_APPARMOR (CPM version > 3.0.2) OR MINION_DOCKER_RUNNER_APPARMOR (CPM version <= 3.0.2) The AppArmor profile name, if it has been applied to Docker containers running monitor scripts (for example, Docker Runner). The AppArmor profile name must exist and be set up on the machine to work. MINION_JVM_MB Default: \"2560\" (2.5GB). MINION_JVM_OPTS Passes command line options to the internal JVM. See Oracle's Java documentation for more information. Default: -server. MINION_LOG_LEVEL When contacting New Relic Support, they may ask you to increase this to \"DEBUG\" or \"TRACE\". Default: INFO. MINION_NETWORK_HEALTHCHECK_DISABLED (CPM version >= 3.0.11) The Minion Network Healthcheck disabled state, to manage the CPM check for public internet access. Default is 'false', when set as 'true' the CPM will bypass this healthcheck. MINION_USER_DEFINED_ENV_VARIABLES Format: Example. A locally hosted set of user defined key value pairs. MINION_HEAVY_WORKERS The number of workers the minion will use to run heavy jobs (BROWSER, SCRIPT_BROWSER, SCRIPT_API). If undefined, the minion will use NUM_CPUS where NUM_CPUS is the number of CPUs available to the minion. The maximum allowed value for this variable is 50. For more information on monitor types, see Types of Synthetics monitors. MINION_LIGHTWEIGHT_WORKERS The number of workers the minion will use to run lightweight jobs (SIMPLE ping jobs). If undefined, the minion will use 25 * NUM_CPUS where NUM_CPUS is the number of CPUs available to the minion. The maximum allowed value for this variable is 1250. For more information on monitor types, see Types of Synthetics monitors. MINION_VSE_PASSPHRASE If set, enables verified script execution and uses this value as a passphrase. Kubernetes environment configuration The variables are provided at startup using the --set argument. The following list shows all the environment variables that CPM supports. synthetics.privateLocationKey is required, and all other variables are optional. Name Description synthetics.privateLocationKey REQUIRED. UUID of the Private Location, as found on the Private Location Web page. replicaCount Number of replicas to maintain with your StatefulSet installation Default: 1. synthetics.minionApiEndpoint For US-based accounts, the endpoint is: https://synthetics-horde.nr-data.net. For EU-based accounts, the endpoint is: https://synthetics-horde.eu01.nr-data.net/ Ensure your CPM can connect to the appropriate endpoint in order to serve your monitor. synthetics.minionDockerRunnerRegistryEndpoint The Docker Registry where the Minion Runner image is hosted. Use this to override quay.io as the default (for example, docker.io) synthetics.minionApiProxy Format: \"host:port\". synthetics.minionApiProxyAuth Format: \"username:password\" - Support HTTP Basic Auth + additional authentication protocols supported by Chrome. synthetics.minionApiProxySelfSignedCert Acceptable values: true, 1, or yes (any case). synthetics.minionCheckTimeout The maximum amount of seconds that your monitor checks are allowed to run. This value must be an integer between 0 seconds (excluded) and 900 seconds (included) (for example, from 1 second to 15 minutes). Default: 65 seconds for ping monitors, 180 seconds for the other monitor types. synthetics.minionLogLevel When contacting New Relic Support, they may ask you to increase this to \"DEBUG\" or \"TRACE\". Default: INFO. synthetics.minionNetworkHealthCheckDisabled (CPM version >= 3.0.11) The Minion Network Healthcheck disabled state, to manage the CPM check for public internet access. Default is 'false', when set as 'true' the CPM will bypass this healthcheck. synthetics.minionUserDefinedEnvVariable Format: Example. A locally hosted set of user defined key value pairs. synthetics.heavyWorkers The number of concurrent workers the minion will use to run heavy jobs (BROWSER, SCRIPT_BROWSER, SCRIPT_API). If undefined, the minion will use the value 2. The maximum allowed value for this variable is 50. For more information on monitor types, see Types of Synthetics monitors. synthetics.lightweightWorkers The number of workers the minion will use to run lightweight jobs (SIMPLE ping jobs). If undefined, the minion will use 25 * synthetics.heavyWorkers. Where synthetics.heavyWorkers is number defined in the previous environment variable. The maximum allowed value for this variable is 1250. For more information on monitor types, see Types of synthetic monitors. synthetics.minionVsePassphrase If set, enables verified script execution and uses this value as a passphrase. appArmorProfileName The AppArmor profile name that will be applied to the Minion and Runner pods. If set, then the AppArmor profile must exist on the Kubernetes node(s) for this to work. podSecurityContextRunAsUser A UID that can be set to either 0 (root) or between [2000, 4000], inclusive. If set, runs the CPM as the given UID. Default: 2379 For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 17.98112,
+ "_score": 97.74138,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following staticmethods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return"
+ "sections": "Using monitors",
+ "info": "Customize your NewRelic containerized private minion (CPM).",
+ "body": "Read on to learn how to configure your containerized private minion (CPM). You can do the following to customize your CPMs: Setup custom modules for scripted browsers in NewRelic. Preserve launch data with permanent data storage. Use environment variables in your configuration. You may not modify"
},
- "id": "5c52cbec8e9c0f0b286080ec"
+ "id": "5f31d9b5196a6790dafbd6e7"
}
],
"/automate-workflows/get-started-new-relic-cli": [
@@ -5214,18 +5401,18 @@
"New Relic developer champions",
"New Relic Podcasts"
],
- "published_at": "2020-09-21T01:45:24Z",
+ "published_at": "2020-09-22T01:47:25Z",
"title": "New Relic Developers",
- "updated_at": "2020-09-21T01:36:40Z",
+ "updated_at": "2020-09-22T01:36:38Z",
"type": "developer",
"external_id": "214583cf664ff2645436a1810be3da7a5ab76fab",
"document_type": "page",
"popularity": 1,
- "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 22 Days : 14 Hours : 58 Minutes : 30 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
+ "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 21 Days : 14 Hours : 59 Minutes : 10 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 331.19165,
+ "_score": 329.87622,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5249,7 +5436,7 @@
"Set up New Relic using the Kubernetes operator",
"Set up New Relic using Terraform"
],
- "published_at": "2020-09-21T01:47:52Z",
+ "published_at": "2020-09-22T01:49:59Z",
"title": "Automate workflows",
"updated_at": "2020-09-21T01:47:51Z",
"type": "developer",
@@ -5260,7 +5447,7 @@
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 310.7697,
+ "_score": 287.4105,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5295,7 +5482,7 @@
"external_id": "c7c374812f8295e409a9b06d552de51ceefc666b",
"image": "",
"url": "https://developer.newrelic.com/automate-workflows/5-mins-tag-resources/",
- "published_at": "2020-09-21T01:49:05Z",
+ "published_at": "2020-09-22T01:47:24Z",
"updated_at": "2020-08-14T01:45:08Z",
"document_type": "page",
"popularity": 1,
@@ -5303,7 +5490,7 @@
"body": "Quickly tag a set of resources 5 min Tags help you group, search, filter, and focus the data about your entities, which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. In this 5-minute guide, you use the New Relic CLI to add multiple tags to one of your entities. Before you begin For this guide you need your New Relic personal API Key: Create it at the Account settings screen for your account. Step 1 of 6 Install the New Relic CLI You can download the New Relic CLI via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 6 Create your New Relic CLI profile New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. To create your first CLI profile, run the profiles add command. Don't forget to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey API_KEY -r us # Set the profile as default newrelic profiles default -n tutorial Copy Step 3 of 6 Search for an entity Your New Relic account might have hundreds of entities: Have a quick look by opening the Entity explorer. In the terminal, run entity search to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with \"test\" in their name. # Change the `name` to match any of your existing entities newrelic entity search --name \"test\" Copy Step 4 of 6 If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. Select an entity from the results and look for its guid value; the guid is the unique identifier of the entity. Write it down. { \"accountId\": 123456789, \"domain\": \"NR1\", \"entityType\": \"WORKLOAD_ENTITY\", \"guid\": \"F7B7AE59FDED4204B846FB08423DB18E\", \"name\": \"Test workload\", \"reporting\": true, \"type\": \"WORKLOAD\" }, Copy Step 5 of 6 Add tags and tag lists to your entity With your entity guid, you can add tags right away. You can do so by invoking the entities tags create command. What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: tag1:value1,tag2:value2 Note Adding tags is an asynchronous operation: it could take a little while for the tags to get created. # Adding a single tag newrelic entity tags create --guid GUID --tag key:value # Adding multiple tags newrelic entity tags create --guid GUID --tag tag1:test,tag2:test Copy Step 6 of 6 Check that the tags are there To make sure that the tags have been added to your entities, retrieve them using the entity tags get command. All tags associated with your entity are retrieved as a JSON array. newrelic entity tags get --guid GUID Tip Tags can be deleted at any time by invoking the entity tags delete command followed by the same arguments you used to create them. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Next steps Have a look at all the New Relic CLI commands. For example, you could create a New Relic workflow using workload create. If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 194.44882,
+ "_score": 191.82181,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5360,7 +5547,7 @@
"body": "New Relic's VMware vSphere integration helps you understand the health and performance of your vSphere environment. You can: Query data to get insights on the performance on your hypervisors, virtual machines, and more. Go from high level views down to the most granular data. vSphere data visualized in a New Relic dashboard: operating systems, status, average CPU and memory consumption, and more. Our integration uses the vSphere API to collect metrics and events generated by all vSphere's components, and forwards the data to our platform via the infrastructure agent. Why it matters With our vSphere integration you can: Instrument and monitor multiple vSphere instances using the same account. Collect data on snapshots, VMs, hosts, resource pools, clusters, and datastores, including tags. Monitor the health of your hypervisors and VMs using our charts and dashboards. Use the data retrieved to monitor key performance and key capacity scaling indicators. Set alerts based on any metrics collected from vCenter. Create workloads to group resources and focus on key data. You can create workloads using data collected via the vSphere integration. Compatibility and requirements Our integration is compatible with VMware vSphere 6.5 or higher. Before installing the integration, make sure that you meet the following requirements: Infrastructure agent installed on a host vCenter service account having at least read-only global permissions with the propagate to children option checked In large environments, where the number of virtual machines is bigger than 800, the integration is not currently able to report all data and might fail. There is a known workaround for these environments that will preserve all metrics and events, but it will disable entity registration. To apply the workaround add the following environment variable to the configuration file: EVENTS: true and METRICS: true. Install and activate To install the vSphere integration, choose your setup: Linux installation Follow the instructions for installing an integration, using the file name nri-vsphere. Change the directory to the integrations folder: cd /etc/newrelic-infra/integrations.d Copy of the sample configuration file: sudo cp vsphere-config.yml.sample vsphere-config.yml Edit the vsphere-config.yml file as described in the configuration settings. Restart the infrastructure agent. Windows installation Download the nri-vsphere MSI installer image from: https://download.newrelic.com/infrastructure_agent/windows/integrations/nri-vsphere/nri-vsphere-amd64.msi To install from the Windows command prompt, run: msiexec.exe /qn /i PATH\\TO\\nri-vsphere-amd64.msi In the Integrations directory, C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\, create a copy of the sample configuration file by running: cp vsphere-config.yml.sample vsphere-config.yml Edit the vsphere-config.yml file as described in the configuration settings. Restart the infrastructure agent. Tarball installation (advanced) You can also install the integration from a tarball file. This gives you full control over the installation and configuration process. Configure the integration An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference. To configure the vSphere integration, you must define the URL of the vSphere API endpoint, and your vSphere username and password. For configuration examples, see the sample configuration files. Some features of the vSphere integration are optional and can be enabled via configuration settings. With secrets management, you can configure on-host integrations with New Relic Infrastructure's agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management. Enable and configure performance metrics (Beta) Performance metrics provide a better understanding of the current status of VMware resources and can be collected in addition to the metrics collected by default;and included in the samples;described at the bottom of the page. All metrics collected are included in the corresponding sample with the perf. prefix attached to the name. For example, net.packetsRx.summation is collected and sent as perf.net.packetsRx.summation. To collect vSphere performance metrics, use the ENABLE_VSPHERE_PERF_METRICS environment variable. Data is collected according to the settings in the vsphere-performance.metrics configuration file. You can override the location of the performance metrics config file using PERF_METRIC_FILE environment variable. Notice that the integration follows VMware's data collection levels (1 to 4). When ENABLE_VSPHERE_PERF_METRICS is set, all level 1 metrics are collected. The data collection level of the performance metrics collected can be modified using PERF_LEVEL. Each metric in the config file can be commented out and new ones can be added if needed. Collection of performance data can increase the load in vCenter and the time needed by to collect data. We recommended to only include the metrics you need in the configuration file. To fine-tune data collection, the number of entities and metrics retrieved per request can be modified using BATCH_SIZE_PERF_ENTITIES and BATCH_SIZE_PERF_METRICS. For more information on vSphere performance metrics, see the VMware documentation. Collect vSphere events (Beta) To collect vSphere events, use the ENABLE_VSPHERE_EVENTS environment variable. The integration collects events between the current time and the last fetched event for each datacenter. It stores the information regarding the last fetched event in a cache that is updated after each execution. Events are only available if the integration is connected to a vCenter and not directly to an ESXi host. The number of events collected per request can be tuned by modifying EVENTS_PAGE_SIZE, which is set to 100 by default. Events are available in the Events page and can be queried via NRQL as InfrastructureEvent under vSphereEvent. Here is an example of vSphere events data: \"summary\": \"User dcui@127.0.0.1 logged out (login time: Tuesday, 14 July, 2020 08:32:09 AM, number of API invocations: 0, user agent: VMware-client/6.5.0)\", \"vSphereEvent.computeResource\": \"cluster1\", \"vSphereEvent.datacenter\": \"Prod Datacenter\", \"vSphereEvent.date\": \"Tue, 14 Jul 2020 09:03:51 UTC\", \"vSphereEvent.host\": \"192.168.0.230\", \"vSphereEvent.userName\": \"dcui\" Collect snapshots data (Beta) To collect snapshot data, use the ENABLE_VSPHERE_SNAPSHOTS environment variable. Snapshot data can be found in VSphereSnapshotVmSample. Collected data covers total and unique space occupied by disk and memory files, snapshot tree, and creation time. You can use this information to create NRQL queries, dashboards, and alerts, since it's linked to the corresponding virtual machine entity. Collect vSphere tags (Beta) To collect vSphere tags, use the ENABLE_VSPHERE_TAGS environment variable. Tags are available as attributes in the corresponding entity sample as label.tagCategory:tagName. If two tags of the same category are assigned to a resource, they are added to a unique attribute separated by a pipe character. For example: label.tagCategory:tagName|tagName2. Tags can be used to run NRQL queries, filter entities in the entity explorer, and to create dashboards and alerts. Filter resources by tags (Beta) Resource filtering allows you to specify which resources you want to monitor by declaring a set of tags that resources must have in order to be monitored. Resources require a match on any (one or more) of the filter tags in order to be included. If none of the resource tags match any of the filter tags, no information about that resource is sent to New Relic. To use filtering resources by tag you need to have the ENABLE_VSPHERE_TAGS environment variable enabled. A tag filter expression is a space-separated list of pairs of strings with the format category=name. For example, to only retrieve resources with a tag category region and include regions us and eu use a filter expression like: region=us region=eu INCLUDE_TAGS: > region=us region=eu To enable resource filtering by tag, edit your integration configuration file and add the option INCLUDE_TAGS with the filter expression you want. Note that datacenter resources acting as the root of the resource tree MUST have tags attached AND match the filter expression in order for other child resources to be fetched. If you connect the integration directly to the ESXi host, vCenter data is not available (for example, events, tags, or datacenter metadata). Example configuration Here are examples of the vSphere integration configuration, including performance metrics: vsphere-config.yml.sample (Linux) vsphere-config-win.yml.sample (Windows) vsphere-performance.metrics (Performance metrics) For more information, see our documentation about the general structure of on-host integration configurations. The configuration option inventory_source is not compatible with this integration. Update your integration On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent. View and use data Data from this service is reported to an integration dashboard. You can query this data for troubleshooting purposes or to create charts and dashboards. vSphere data is attached to these event types: VSphereHostSample VSphereClusterSample VSphereVmSample VSphereDatastoreSample VSphereDatacenterSample VSphereResourcePoolSample VSphereSnapshotVmSample Performance data is enabled and configured separately (see Enable and configure performance metrics). For more on how to view and use your data, see Understand integration data. Metric data The vSphere integration provides metric data attached to the following New Relic events: VSphereHost VSphereVm VSphereDatastore VSphereDatacenter VSphereResourcePool VSphereCluster VSphereSnapshotVm VSphereHost Name Description cpu.totalMHz Sum of the MHz for all the individual cores on the host cpu.coreMHz Speed of the CPU cores cpu.available Amount of free CPU MHz in the host cpu.overallUsage CPU usage across all cores on the host in MHz cpu.percent Percentage of CPU utilization in the host cpu.cores Number of physical CPU cores on the host. Physical CPU cores are the processors contained by a CPU package cpu.threads Number of physical CPU threads on the host disk.totalMiB Total capacity of disks mounted in host, in MiB mem.free Amount of available memory in the host, in MiB mem.usage Amount of used memory in the host, in MiB mem.size Total memory capacity of the host, in MiB vmCount Number of virtual machines in the host hypervisorHostname Name of the host uuid The hardware BIOS identification datacenterName Name of the datacenter related to the host clusterName Name of the cluster related to the host resourcePoolNameList List of names of the resource pools related to the host datastoreNameList List of names of datastores related to the host datacenterLocation Datacenter location networkNameList List of names of networks related to the host overallStatus gray: Status is unknown green: Entity is OK yellow: Entity might have a problem red: Entity definitely has a problem connectionState The host connection state: connected: Connected to the server. For ESX Server, this is the default setting. disconnected: The user has explicitly taken the host down. VirtualCenter does not expect to receive heartbeats from the host. The next time a heartbeat is received, the host is moved to the connected state again and an event is logged. notResponding: VirtualCenter is not receiving heartbeats from the server. The state automatically changes to connected once heartbeats are received again. This state is typically used to trigger an alarm on the host. inMaintenanceMode The flag to indicate whether or not the host is in maintenance mode. This flag is set when the host has entered the maintenance mode. It is not set during the entering phase of maintenance mode. inQuarantineMode The flag to indicate whether or not the host is in quarantine mode. InfraUpdateHa will recommend to set this flag based on the HealthUpdates received by the HealthUpdateProviders configured for the cluster. A host that is reported as degraded will be recommended to enter quarantine mode, while a host that is reported as healthy will be recommended to exit quarantine mode. Execution of these recommended actions will set this flag. Hosts in quarantine mode will be avoided by vSphere DRS as long as the increased consolidation in the cluster does not negatively affect VM performance. powerState The host power state: poweredOff: The host was specifically powered off by the user through VirtualCenter. This state is not a cetain state, because after VirtualCenter issues the command to power off the host, the host might crash, or kill all the processes but fail to power off. poweredOn: The host is powered on. A host that is entering standby mode entering is also in this state. standBy: The host was specifically put in standby mode, either explicitly by the user or automatically by DPM. This state is not a certain state, because after VirtualCenter issues the command to put the host in standby state, the host might crash, or kill all the processes but fail to power off. A host that is exiting standby mode s also in this state. unknown: If the host is disconnected or notResponding, we know its power state, so the host is marked as unknown. standbyMode The host’s standby mode. The property is only populated by vCenter server. If queried directly from the ESX host, the property is unset. entering: The host is entering standby mode. exiting: The host is exiting standby mode. in: The host is in standby mode. none: The host is not in standby mode, and it is not in the process of entering or exiting standby mode. cryptoState Encryption state of the host. Valid values are enumerated by the CryptoState type: incapable: The host is not safe for receiving sensitive material. prepared: The host is prepared for receiving sensitive material but does not have a host key set yet. safe: The host is crypto safe and has a host key set. bootTime The time when the host was booted. VSphereVm Name Description mem.size Memory size of the virtual machine, in MiB mem.usage Guest memory utilization statistics, in MiB. This is also known as active guest memory. The value can range between 0 and the configured memory size of the virtual machine. Valid while the virtual machine is running. mem.free Guest memory available, in MiB. The value can range between 0 and the configured memory size of the virtual machine. Valid while the virtual machine is running. mem.ballooned The size of the balloon driver in the virtual machine, in MiB. The host will inflate the balloon driver to reclaim physical memory from the virtual machine. This is a sign that there is memory pressure on the host. mem.swapped The portion of memory, in MiB, that is granted to this virtual machine from the host's swap space. This is a sign that there is memory pressure on the host. mem.swappedSsd The amount of memory swapped to fast disk device such as SSD, in MiB cpu.allocationLimit Resource limits for CPU, in MHz. If set to -1, there is no fixed allocation limit. cpu.overallUsage Basic CPU performance statistics, in MHz. Valid while the virtual machine is running. cpu.hostUsagePercent Percent of the host CPU used by the virtual machine. In case a limit is configured, the percentage is calculated by taking the limit as the total. cpu.cores Number of processors in the virtual machine disk.totalMiB Total storage space, committed to this virtual machine across all datastores, in MiB ipAddress Primary guest IP address, if available ipAddresses List of IPs associated with the VM (except ipAddress). A pipe or vertical bar character (|) is used as a separator. connectionState Indicates whether or not the virtual machine is available for management: connected: Server has access to the virtual machine. disconnected: Server is currently disconnected from the virtual machine, since its host is disconnected. inaccessible: One or more of the virtual machine configuration files are inaccessible. invalid: The virtual machine configuration format is invalid. orphaned: The virtual machine is no longer registered on its associated host. powerState The current power state of the virtual machine: poweredOff, poweredOn, or suspended. guestHeartbeatStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. operatingSystem Operating system of the virtual machine guestFullName Guest operating system full name, if available from guest tools hypervisorHostname Name of the host where the virtual machine is running instanceUuid Unique identification of the virtual machine datacenterName Name of the datacenter clusterName Name of the cluster resourcePoolNameList List of names of the resource pools datastoreNameList List of names of datastores networkNameList List of names of networks datacenterLocation Datacenter location overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. disk.suspendMemory Size of the snapshot file (bytes). disk.suspendMemoryUnique Size of the snapshot file, unique blocks (bytes). disk.totalUncommittedMiB Additional storage space potentially used by this virtual machine on all datastores. Essentially an aggregate of the property uncommitted across all datastores that this virtual machine is located on (Mebibytes). disk.totalUnsharedMiB Total storage space occupied by the virtual machine across all datastores, that is not shared with any other virtual machine (Mebibytes). mem.hostUsage Host memory usage (Mebibytes). resourcePoolName Resource Pool Name. vmConfigName Vm Config Name. vmHostname Vm Hostname. VSphereDatastore Name Description capacity Maximum capacity of this datastore, in GiB, if accessible is true freeSpace Available space of this datastore, in GiB, if accessible is true uncommitted Total additional storage space, potentially used by all virtual machines on this datastore, in GiB, if accessible is true vmCount Number of virtual machines attached to the datastore datacenterLocation Datacenter location datacenterName Datacenter name hostCount Number of hosts attached to the datastore overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. accessible Connectivity status of the datastore. If this is set to false, the datastore is not accessible. url Unique locator for the datastore, if accessible is true fileSystemType Type of file system volume, such as VMFS or NFS name Name of the datastore nas.remoteHost Host that runs the NFS/CIFS server nas.remotePath Remote path of NFS/CIFS mount point VSphereDatacenter Name Description datastore.totalUsedGiB Total used space in the datastores, in GiB datastore.totalFreeGiB Total free space in the datastores, in GiB datastore.totalGiB Total size of the datastores, in GiB cpu.cores Total CPU count per datacenter cpu.overallUsagePercentage Total CPU usage, in percentage cpu.overallUsage Total CPU usage, in MHz cpu.totalMHz Total CPU capacity, in MHz mem.usage Total memory usage, in MiB mem.size Total memory, in MiB mem.usagePercentage Total memory usage as percentage clusters Total cluster count per datacenter resourcePools Total resource pools per datacenter datastores Total datastores per datacenter networks Total network adapter count per datacenter overallStatus gray: Status is unknown green: Entity is OK yellow: Entity might have a problem red: Entity definitely has a problem hostCount Total host system count per datacenter vmCount Total virtual machines count per datacenter VSphereResourcePool Name Description cpu.TotalMHz Resource pool CPU total capacity, in MHz cpu.overallUsage Resource pool CPU usage, in MHz mem.size Resource pool total memory reserved, in MiB mem.usage Resource pool memory usage, in MiB mem.free Resource pool memory available, in MiB mem.ballooned Size of the balloon driver in the resource pool, in MiB mem.swapped Portion of memory, in MiB, that is granted to this resource pool from the host's swap space vmCount Number of virtual machines in the resource pool overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. resourcePoolName Name of the resource pool datacenterLocation Datacenter location datacenterName Name of the datacenter clusterName Name of the cluster VSphereCluster Name Description cpu.totalEffectiveMHz Effective CPU resources, in MHz, available to virtual machines. This is the aggregated effective resource level from all running hosts. Hosts that are in maintenance mode or are unresponsive are not counted. Resources used by the VMware Service Console are not included in the aggregate. This value represents the amount of resources available for the root resource pool for running virtual machines. cpu.totalMHz Aggregated CPU resources of all hosts, in MHz. It does not filter out cpu used by system or related to hosts under maintenance. cpu.cores Number of physical CPU cores. Physical CPU cores are the processors contained by a CPU package. cpu.threads Aggregated number of CPU threads. mem.size Aggregated memory resources of all hosts, in MiB. It does not filter out memory used by system or related to hosts under maintenance. mem.effectiveSize Effective memory resources, in MiB, available to run virtual machines. This is the aggregated effective resource level from all running hosts. Hosts that are in maintenance mode or are unresponsive are not counted. Resources used by the VMware Service Console are not included in the aggregate. This value represents the amount of resources available for the root resource pool for running virtual machines. effectiveHosts Total number of effective hosts. This number exclude hosts under maintenance. hosts Total number of hosts overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. datastoreList List of datastore used by the cluster. A pipe or vertical bar character (|) is used as a separator. hostList List of hosts belonging to the cluster. A pipe or vertical bar character (|) is used as a separator. networkList List of networks attached to the cluster. A pipe or vertical bar character (|) is used as a separator. drsConfig.vmotionRate Threshold for generated ClusterRecommendations. DRS generates only those recommendations that are above the specified vmotionRate. Ratings vary from 1 to 5. This setting applies to manual, partiallyAutomated, and fullyAutomated DRS clusters. dasConfig.restartPriorityTimeout Maximum time the lower priority VMs should wait for the higher priority VMs to be ready (Seconds). datacenterName Datacenter name. datacenterLocation Datacenter location. drsConfig.enabled Flag indicating whether or not the service is enabled. drsConfig.enableVmBehaviorOverrides Flag that dictates whether DRS Behavior overrides for individual virtual machines (ClusterDrsVmConfigInfo) are enabled. drsConfig.defaultVmBehavior Specifies the cluster-wide default DRS behavior for virtual machines. You can override the default behavior for a virtual machine by using the ClusterDrsVmConfigInfo object. dasConfig.enabled Flag to indicate whether or not vSphere HA feature is enabled. dasConfig.admissionControlEnabled Flag that determines whether strict admission control is enabled dasConfig.isolationResponse Indicates whether or not the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. dasConfig.restartPriority Restart priority for a virtual machine. dasConfig.hostMonitoring Determines whether HA restarts virtual machines after a host fails. dasConfig.vmMonitoring Level of HA Virtual Machine Health Monitoring Service. dasConfig.vmComponentProtecting This property indicates if vSphere HA VM Component Protection service is enabled. dasConfig.hbDatastoreCandidatePolicy The policy on what datastores will be used by vCenter Server to choose heartbeat datastores: allFeasibleDs, allFeasibleDsWithUserPreference, userSelectedDs VSphereSnapshotVm Name Description snapshotTreeInfo Tree info for the snapshot. Es: Cluster:Vm:Snapshot1:Snapshot2 name Snapshot name creationTime Snapshot creation time powerState The power state of the virtual machine when this snapshot was taken snapshotId The unique identifier that distinguishes this snapshot from other snapshots of the virtual machine quiesced Flag to indicate whether or not the snapshot was created with the \"quiesce\" option, ensuring a consistent state of the file system backupManifest The relative path from the snapshotDirectory pointing to the backup manifest. Available for certain quiesced snapshots only description Description of the snapshot replaySupported Flag to indicate whether this snapshot is associated with a recording session on the virtual machine that can be replayed totalMemoryInDisk Total size of memory in disk. totalUniqueMemoryInDisk Total size of the file corresponding to the file blocks that were allocated uniquely to store memory. In other words, if the underlying storage supports sharing of file blocks across disk files, the property corresponds to the size of the file blocks that were allocated only in context of this file, i.e. it does not include shared blocks that were allocated in other files. This property will be unset if the underlying implementation is unable to compute this information. totalDisk Total size of snapshot files in disk totalUniqueDisk Total size of the file corresponding to the file blocks that were allocated uniquely to store snapshot data in disk. In other words, if the underlying storage supports sharing of file blocks across disk files, the property corresponds to the size of the file blocks that were allocated only in context of this file, i.e. it does not include shared blocks that were allocated in other files. This property will be unset if the underlying implementation is unable to compute this information. datastorePathDisk Disk file path in the datastore datastorePathMemory Memory file path in the datastore For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 183.73552,
+ "_score": 170.02747,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5391,7 +5578,7 @@
"external_id": "7ff7a8426eb1758a08ec360835d9085fae829936",
"image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png",
"url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:47:24Z",
"updated_at": "2020-09-17T01:48:42Z",
"document_type": "page",
"popularity": 1,
@@ -5399,7 +5586,7 @@
"body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial
component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). ApplicationSizeCompanyTeamCommit; { ({ item }) => ( {item.name}{item.value}{item.company}{item.team}{item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company}{item.team}{item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 174.5007,
+ "_score": 165.7388,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5412,30 +5599,272 @@
"id": "5efa989ee7b9d2ad567bab51"
}
],
- "/build-apps/build-hello-world-app": [
+ "/explore-docs/nerdpack-file-structure": [
{
"sections": [
- "Intro to New Relic One API components",
- "Components of the SDK",
- "UI components",
- "Chart components",
- "Query and storage components",
- "Platform APIs"
+ "Create a \"Hello, World!\" application",
+ "Before you begin",
+ "Tip",
+ "Create a local version of the \"Hello, World!\" application",
+ "Publish your application to New Relic",
+ "Add details to describe your project",
+ "Subscribe accounts to your application",
+ "Summary",
+ "Related information"
],
- "title": "Intro to New Relic One API components",
+ "title": "Create a \"Hello, World!\" application",
"type": "developer",
"tags": [
- "SDK components",
- "New Relic One apps",
- "UI components",
- "chart components",
- "query and storage components",
- "Platform APIs"
+ "nr1 cli",
+ "Nerdpack file structure",
+ "NR One Catalog",
+ "Subscribe applications"
],
- "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2",
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/",
- "published_at": "2020-09-21T01:52:19Z",
+ "external_id": "aa427030169067481fb69a3560798265b6b52b7c",
+ "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png",
+ "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/",
+ "published_at": "2020-09-22T01:47:24Z",
+ "updated_at": "2020-08-21T01:45:19Z",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "Build a \"Hello, World!\" app and publish it to New Relic One",
+ "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return
\"Hello, World!\"
; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 449.67862,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "sections": "Publish your application to NewRelic",
+ "info": "Build a "Hello, World!" app and publish it to NewRelicOne",
+ "tags": "Nerdpackfilestructure",
+ "body": "!" application The CLI allows you to run a local version of NewRelicOne. You can develop your application locally before you publish it in NewRelicOne. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit"
+ },
+ "id": "5efa9973196a67d16d76645c"
+ },
+ {
+ "sections": [
+ "New Relic One CLI reference",
+ "Installing the New Relic One CLI",
+ "Tip",
+ "New Relic One CLI Commands",
+ "Get started",
+ "Configure your CLI preferences",
+ "Set up your Nerdpacks",
+ "Manage your Nerdpack subscriptions",
+ "Install and manage plugins",
+ "Manage catalog information"
+ ],
+ "title": "New Relic One CLI reference",
+ "type": "developer",
+ "tags": [
+ "New Relic One app",
+ "nerdpack commands"
+ ],
+ "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
+ "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
+ "url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
+ "published_at": "2020-09-22T01:52:51Z",
+ "updated_at": "2020-09-17T01:51:10Z",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.",
+ "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 444.98773,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "NewRelicOneCLI reference",
+ "sections": "NewRelicOneCLI reference",
+ "info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
+ "tags": "NewRelicOne app",
+ "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the NewRelicOneCLI In NewRelic, click Apps and then in the NewRelicOne catalog area, click the Build"
+ },
+ "id": "5efa989e28ccbc535a307dd0"
+ },
+ {
+ "sections": [
+ "Map page views by region in a custom app",
+ "Before you begin",
+ "New Relic terminology",
+ "Build a custom app with a table chart",
+ "Query your browser data",
+ "Create and serve a new Nerdpack",
+ "Review your app files and view your app locally",
+ "Hard code your account ID",
+ "Import the TableChart component",
+ "Add a table with a single row",
+ "Customize the look of your table (optional)",
+ "Get your data into that table",
+ "Make your app interactive with a text field",
+ "Import the TextField component",
+ "Add a row for your text field",
+ "Build the text field object",
+ "Get your data on a map",
+ "Install Leaflet",
+ "Add a webpack config file for Leaflet",
+ "Import modules from Leaflet",
+ "Import additional modules from New Relic One",
+ "Get data for the map",
+ "Customize the map marker colors",
+ "Set your map's default center point",
+ "Add a row for your map",
+ "Replace \"Hello\" with the Leaflet code"
+ ],
+ "title": "Map page views by region in a custom app",
+ "type": "developer",
+ "tags": [
+ "custom app",
+ "map",
+ "page views",
+ "region",
+ "nerdpack"
+ ],
+ "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb",
+ "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png",
+ "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/",
+ "published_at": "2020-09-22T01:47:24Z",
+ "updated_at": "2020-09-17T01:48:42Z",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "Build a New Relic app showing page view data on a world map.",
+ "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return
Hello, pageview-app-nerdlet Nerdlet!
; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 398.26233,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "sections": "Import additional modules from NewRelicOne",
+ "info": "Build a NewRelic app showing page view data on a world map.",
+ "tags": "nerdpack",
+ "body": " look like a series of interactive charts or a map of the world. Nerdpack: NewRelic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpackfilestructure. Launcher: The button on NewRelicOne"
+ },
+ "id": "5efa993c196a67066b766469"
+ },
+ {
+ "sections": [
+ "Add tables to your New Relic One application",
+ "Before you begin",
+ "Clone and set up the example application",
+ "Work with table components",
+ "Next steps"
+ ],
+ "title": "Add tables to your New Relic One application",
+ "type": "developer",
+ "tags": [
+ "table in app",
+ "Table component",
+ "TableHeaderc omponent",
+ "TableHeaderCell component",
+ "TableRow component",
+ "TableRowCell component"
+ ],
+ "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936",
+ "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png",
+ "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/",
+ "published_at": "2020-09-22T01:47:24Z",
+ "updated_at": "2020-09-17T01:48:42Z",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "Add a table to your New Relic One app.",
+ "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial
component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). ApplicationSizeCompanyTeamCommit; { ({ item }) => ( {item.name}{item.value}{item.company}{item.team}{item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company}{item.team}{item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 362.55554,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "Add tables to your NewRelicOne application",
+ "sections": "Add tables to your NewRelicOne application",
+ "info": "Add a table to your NewRelicOne app.",
+ "body": " application, you need to update its unique id by invoking the NewRelicOneCLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install"
+ },
+ "id": "5efa989ee7b9d2ad567bab51"
+ },
+ {
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
+ "sections": [
+ "New Relic One CLI Nerdpack commands",
+ "Command details",
+ "nr1 nerdpack:build",
+ "Builds a Nerdpack",
+ "Usage",
+ "Options",
+ "nr1 nerdpack:clone",
+ "Clone an existing Nerdpack",
+ "nr1 nerdpack:serve",
+ "Serve your Nerdpack locally",
+ "nr1 nerdpack:uuid",
+ "Get your Nerdpack's UUID",
+ "nr1 nerdpack:publish",
+ "Publish your Nerdpack",
+ "nr1 nerdpack:deploy",
+ "Deploy your Nerdpack to a channel",
+ "nr1 nerdpack:undeploy",
+ "Undeploy your Nerdpack",
+ "nr1 nerdpack:clean",
+ "Removes all built artifacts",
+ "nr1 nerdpack:validate",
+ "Validates artifacts inside your Nerdpack",
+ "nr1 nerdpack:Info",
+ "Shows the state of your Nerdpack in the New Relic's registry"
+ ],
+ "published_at": "2020-09-22T01:47:24Z",
+ "title": "New Relic One CLI Nerdpack commands",
+ "updated_at": "2020-09-17T01:49:55Z",
+ "type": "developer",
+ "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
+ "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 300.64832,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "NewRelicOneCLINerdpack commands",
+ "sections": "NewRelicOneCLINerdpack commands",
+ "info": "An overview of the CLI commands you can use to set up your NewRelicOneNerdpacks.",
+ "body": "NewRelicOneCLINerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
+ },
+ "id": "5f28bd6a64441f9817b11a38"
+ }
+ ],
+ "/build-apps/build-hello-world-app": [
+ {
+ "sections": [
+ "Intro to New Relic One API components",
+ "Components of the SDK",
+ "UI components",
+ "Chart components",
+ "Query and storage components",
+ "Platform APIs"
+ ],
+ "title": "Intro to New Relic One API components",
+ "type": "developer",
+ "tags": [
+ "SDK components",
+ "New Relic One apps",
+ "UI components",
+ "chart components",
+ "query and storage components",
+ "Platform APIs"
+ ],
+ "external_id": "3620920c26bcd66c59c810dccb1200931b23b8c2",
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/intro-to-sdk/",
+ "published_at": "2020-09-22T01:49:59Z",
"updated_at": "2020-08-14T01:47:12Z",
"document_type": "page",
"popularity": 1,
@@ -5443,7 +5872,7 @@
"body": "Intro to New Relic One API components To help you build New Relic One applications, we provide you with the New Relic One SDK. Here we give you an introduction to the types of API calls and components in the SDK. The SDK provides everything you need to build your Nerdlets, create visualizations, and fetch New Relic or third-party data. Components of the SDK SDK components are located in the Node module package named nr1, which you get when you install the NR1 CLI. The nr1 components can be divided into several categories: UI components Chart components Query and storage components Platform APIs UI components The UI components category of the SDK contains React UI components, including: Text components: These components provide basic font and heading elements. These include HeadingText and BlockText. Layout components: These components give you control over the layout, and help you build complex layout designs without having to deal with the CSS. Layout components include: Grid and GridItem: for organizing more complex, larger scale page content in rows and columns Stack and StackItem: for organizing simpler, smaller scale page content (in column or row) Tabs and TabsItem: group various related pieces of content into separate hideable sections List and ListItem: for providing a basic skeleton of virtualized lists Card, CardHeader and CardBody : used to group similar concepts and tasks together Form components: These components provide the basic building blocks to interact with the UI. These include Button, TextField, Dropdown and DropdownItem, Checkbox, RadioGroup, Radio, and Checkbox. Feedback components: These components are used to provide feedback to users about actions they have taken. These include: Spinnerand Toast. Overlaid components: These components are used to display contextual information and options in the form of an additional child view that appears above other content on screen when an action or event is triggered. They can either require user interaction (like modals), or be augmenting (like a tooltip). These include: Modal and Tooltip. Components suffixed with Item can only operate as direct children of that name without the suffix. For example: GridItem should only be found as a child of Grid. Chart components The Charts category of the SDK contains components representing different types of charts. The ChartGroup component helps a group of related charts share data and be aligned. Some chart components can perform NRQL queries on their own; some accept a customized set of data. Query and storage components The Query components category contains components for fetching and storing New Relic data. The main way to fetch data is with NerdGraph, our GraphQL endpoint. This can be queried using NerdGraphQuery. To simplify use of NerdGraph queries, we provide some components with pre-defined queries. For more on using NerdGraph, see Queries and mutations. We also provide storage for storing small data sets, such as configuration settings data, or user-specific data. For more on this, see NerdStorage. Platform APIs The Platform API components of the SDK enable your application to interact with different parts of the New Relic One platform, by reading and writing state from and to the URL, setting the configuration, etc. They can be divided into these categories: PlatformStateContext: provides read access to the platform URL state variables. Example: timeRange in the time picker. navigation: an object that allows programmatic manipulation of the navigation in New Relic One. Example: opening a new Nerdlet. NerdletStateContext: provides read access to the Nerdlet URL state variables. Example: an entityGuid in the entity explorer. nerdlet: an object that provides write access to the Nerdlet URL state.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 210.80128,
+ "_score": 208.10252,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5479,7 +5908,7 @@
"external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161",
"image": "",
"url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/",
- "published_at": "2020-09-21T01:52:20Z",
+ "published_at": "2020-09-22T01:49:58Z",
"updated_at": "2020-08-14T01:49:25Z",
"document_type": "page",
"popularity": 1,
@@ -5487,7 +5916,7 @@
"body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │ └── my-nerdlet-launcher │ ├── icon.png │ └── nr1.json ├── nerdlets │ └── my-nerdlet-nerdlet │ ├── index.js │ ├── nr1.json │ └── styles.scss ├── node_modules │ ├── js-tokens │ ├── loose-envify │ ├── object-assign │ ├── prop-types │ ├── react │ ├── react-dom │ ├── react-is │ └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return
Hello, my-awesome-nerdpack Nerdlet!
; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 193.15678,
+ "_score": 190.39294,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5541,7 +5970,7 @@
"external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb",
"image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png",
"url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:47:24Z",
"updated_at": "2020-09-17T01:48:42Z",
"document_type": "page",
"popularity": 1,
@@ -5549,7 +5978,7 @@
"body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return
Hello, pageview-app-nerdlet Nerdlet!
; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 190.2652,
+ "_score": 181.55405,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5584,7 +6013,7 @@
"nr1 nrql",
"Query using NRQL"
],
- "published_at": "2020-09-21T01:46:19Z",
+ "published_at": "2020-09-22T01:47:24Z",
"title": "New Relic One CLI common commands",
"updated_at": "2020-08-14T01:48:10Z",
"type": "developer",
@@ -5595,7 +6024,7 @@
"body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 164.74113,
+ "_score": 163.23294,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5629,7 +6058,7 @@
"external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
"image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
"url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:52:51Z",
"updated_at": "2020-09-17T01:51:10Z",
"document_type": "page",
"popularity": 1,
@@ -5637,7 +6066,7 @@
"body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 143.47443,
+ "_score": 135.27649,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5658,35 +6087,35 @@
"sections": [
"Build apps",
"Guides to build apps",
- "Permissions for managing applications",
"Create a \"Hello, World!\" application",
+ "Permissions for managing applications",
"Set up your development environment",
"Add, query, and mutate data using NerdStorage",
"Add the NerdGraphQuery component to an application",
"Add a time picker to your app",
"Add a table to your app",
- "Publish and deploy apps",
- "Create a custom map view"
+ "Create a custom map view",
+ "Publish and deploy apps"
],
- "published_at": "2020-09-21T01:47:51Z",
+ "published_at": "2020-09-22T01:47:25Z",
"title": "Build apps",
- "updated_at": "2020-09-21T01:47:51Z",
+ "updated_at": "2020-09-22T01:47:24Z",
"type": "developer",
"external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d",
"document_type": "page",
"popularity": 1,
- "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps Permissions for managing applications Learn about permissions for subscribing to apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Publish and deploy apps Start sharing the apps you build 30 min Create a custom map view Build an app to show page view data on a map",
+ "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One Permissions for managing applications Learn about permissions for subscribing to apps 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Create a custom map view Build an app to show page view data on a map 30 min Publish and deploy apps Start sharing the apps you build",
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 892.0304,
+ "_score": 884.07385,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
"title": "Build apps",
"sections": "Publish and deploy apps",
- "body": " a "Hello, World!" application Build a "Hello, World!" app and publish it to NewRelicOne 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within NewRelicOne"
+ "body": " you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps 15 min Create a "Hello, World!" application Build a "Hello, World!" app and publish it to NewRelicOne"
},
"id": "5efa999d64441fc0f75f7e21"
},
@@ -5711,7 +6140,7 @@
"external_id": "7ff7a8426eb1758a08ec360835d9085fae829936",
"image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png",
"url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:47:24Z",
"updated_at": "2020-09-17T01:48:42Z",
"document_type": "page",
"popularity": 1,
@@ -5719,7 +6148,7 @@
"body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial
component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). ApplicationSizeCompanyTeamCommit; { ({ item }) => ( {item.name}{item.value}{item.company}{item.team}{item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company}{item.team}{item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 831.6654,
+ "_score": 790.64246,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5752,7 +6181,7 @@
"external_id": "709e06c25376d98b2191ca369b4d139e5084bd62",
"image": "",
"url": "https://developer.newrelic.com/explore-docs/nerdstorage/",
- "published_at": "2020-09-21T01:53:41Z",
+ "published_at": "2020-09-22T01:49:58Z",
"updated_at": "2020-09-08T01:50:19Z",
"document_type": "page",
"popularity": 1,
@@ -5760,7 +6189,7 @@
"body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 811.76794,
+ "_score": 784.979,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5813,7 +6242,7 @@
"external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb",
"image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png",
"url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:47:24Z",
"updated_at": "2020-09-17T01:48:42Z",
"document_type": "page",
"popularity": 1,
@@ -5821,7 +6250,7 @@
"body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return
Hello, pageview-app-nerdlet Nerdlet!
; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 608.32495,
+ "_score": 579.34344,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5853,7 +6282,7 @@
"external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026",
"image": "",
"url": "https://developer.newrelic.com/explore-docs/query-and-store-data/",
- "published_at": "2020-09-21T01:53:41Z",
+ "published_at": "2020-09-22T01:52:51Z",
"updated_at": "2020-08-01T01:42:02Z",
"document_type": "page",
"popularity": 1,
@@ -5861,7 +6290,7 @@
"body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
({data, error}) => { if (error) { return
Failed to retrieve list: {error.message}
; } return data.map((account) => {
{account.name}
}); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 544.1281,
+ "_score": 537.433,
"_version": null,
"_explanation": null,
"sort": null,
@@ -5875,50 +6304,233 @@
"id": "5efa989e28ccbc2f15307deb"
}
],
- "/explore-docs/nr1-catalog": [
+ "/explore-docs/query-and-store-data": [
{
"sections": [
- "New Relic One CLI reference",
- "Installing the New Relic One CLI",
- "Tip",
- "New Relic One CLI Commands",
- "Get started",
- "Configure your CLI preferences",
- "Set up your Nerdpacks",
- "Manage your Nerdpack subscriptions",
- "Install and manage plugins",
- "Manage catalog information"
+ "Intro to NerdStorage",
+ "Use NerdStorage in your apps",
+ "Data model",
+ "Limits",
+ "Data access",
+ "Permissions for working with NerdStorage"
],
- "title": "New Relic One CLI reference",
+ "title": "Intro to NerdStorage",
"type": "developer",
"tags": [
- "New Relic One app",
- "nerdpack commands"
+ "nerdstorage",
+ "nerdstorage components",
+ "new relic one apps",
+ "data access"
],
- "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
- "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
- "url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:51:10Z",
+ "external_id": "709e06c25376d98b2191ca369b4d139e5084bd62",
+ "image": "",
+ "url": "https://developer.newrelic.com/explore-docs/nerdstorage/",
+ "published_at": "2020-09-22T01:49:58Z",
+ "updated_at": "2020-09-08T01:50:19Z",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.",
- "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
+ "info": "Intro to NerdStorage on New Relic One",
+ "body": "Intro to NerdStorage 30 min To help you build a New Relic One application, we provide you with the New Relic One SDK. On this page, you’ll learn how to use NerdStorage SDK components. Use NerdStorage in your apps NerdStorage is used to store and retrieve simple sets of data, including users's configuration settings and preferences (like favorites), or any other small data sets. This storage is unique per Nerdpack, and can't be shared with any other Nerdpack. NerdStorage can be classified into three categories: User storage: Data that is attached to a particular user. If you’re authenticated as the user the data is attached to, you can read it and write it. Account storage: Data that is attached to a particular account. If you’re authenticated and can access the account, you can read and write to account scoped NerdStorage. Visibility of account data is also determined by master/subaccount rules: If a user has access to the master account, then they also have access to data in all subaccounts. Entity storage: Data that is attached to a particular entity. If you can see the corresponding entity, you can read and write data on that entity. Data model You can imagine NerdStorage as a nested key-value map. Data is inside documents, which are nested inside collections: { 'YourNerdpackUuid': { 'collection-1': { 'document-1-of-collection-1': '{\"lastNumber\": 42, \"another\": [1]}', 'document-2-of-collection-1': '\"userToken\"', // ... }, 'another-collection': { 'fruits': '[\"pear\", \"apple\"]', // ... }, // ... }, } Copy Each NerdStorage level has different properties and purpose: Collections: From a Nerdpack, you can create multiple collections by naming each of them. Inside a collection you can put one or more documents. Think of a collection as key-value storage, where each document is a key-value pair. Documents: A document is formed by an identifier (documentId) and a set of data associated with it. Data associated with a document: NerdStorage accepts any sort of data associated to a documentId. Query and mutation components that are provided work by serializing and deserializing JSON. Limits A Nerdpack can hold up to 1,000 collections and 10,000 documents, plus storage type. A collection can hold up to 1,500 documents, plus storage type. Each document can have a maximum length of 1024 KiB when serialized. Data access To access NerdStorage, you can run NerdGraph queries, or use the provided storage queries. Depending on which storage you want to access, you can use a different set of SDK components: User access: UserStorageQuery and UserStorageMutation Account access: AccountStorageQuery and AccountStorageMutation Entity access: EntityStorageQuery and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the static methods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order to persist changes on NerdStorage, such as creating, updating, and deleting account and entity storage, you must have a user role with permission to persist changes.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 416.76746,
+ "_score": 163.1857,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI reference",
- "sections": "NewRelicOneCLICommands",
- "info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
- "tags": "NewRelicOne app",
- "body": " CLIcommands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the NewRelicOneCLI In NewRelic, click Apps and then in the NewRelicOnecatalog area, click the Build"
+ "tags": "nerdstorage components",
+ "body": " and EntityStorageMutation Each of these components can operate declaratively (for example, as part of your React rendering methods) or imperatively (by using the staticmethods for query and mutation). For more information on this, see Data querying and mutations. Permissions for working with NerdStorage In order"
},
- "id": "5efa989e28ccbc535a307dd0"
+ "id": "5efa989ee7b9d2048e7bab92"
+ },
+ {
+ "category_2": "Java agent release notes",
+ "nodeid": 11976,
+ "sections": [
+ "APM agent release notes",
+ "Go agent release notes",
+ "Java agent release notes",
+ ".NET agent release notes",
+ "Node.js agent release notes",
+ "PHP agent release notes",
+ "Python agent release notes",
+ "Ruby agent release notes",
+ "C SDK release notes",
+ "Java Agent 3.36.0",
+ "Improvements",
+ "Fixes"
+ ],
+ "title": "Java Agent 3.36.0",
+ "category_0": "Release notes",
+ "type": "docs",
+ "category_1": "APM agent release notes",
+ "external_id": "f94f5c53e522a9835ea42514e90d9a39e81fd050",
+ "image": "",
+ "url": "https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3360",
+ "published_at": "2020-09-20T20:20:36Z",
+ "updated_at": "2018-04-14T23:39:35Z",
+ "breadcrumb": "Contents / Release notes / APM agent release notes / Java agent release notes",
+ "document_type": "release_notes",
+ "popularity": -2,
+ "body": "[RSS] Released on: Wednesday, February 15, 2017 - 09:55 Download Improvements APIs This release adds a number of APIs that will allow you to instrument and get expanded visibility into frameworks, libraries, and any custom code that New Relic does not automatically instrument. In addition to instrumenting your web frameworks, you can also instrument calls to and from messaging systems, database calls, and external calls! By passing context about your code to the APIs, you will get the same reporting, including cross application tracing, that you get with New Relic’s built-in instrumentation. Solr This release adds support for Solr versions 5 and 6 (up to and including version 6.3.0). Fixes Fixes a bug that prevents an application from starting up when a JAX-RS annotated method contains more than 8 parameters. Fixes an issue that affected Spring and JAX-RS applications compiled with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using static methods. The agent now reports WildFly dispatcher name and version. Fixes a bug in which Queue Time could be misreported on the Overview page for customers injecting the X-Queue-Start or X-Request-Start HTTP headers. This fix brings the Java Agent into compliance with the behavior of other New Relic Agents. Fixes an issue in which custom Hystrix Commands that are subclassed multiple times in Groovy cause an application to throw an exception on startup.",
+ "info": "",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 47.15584,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "body": " with the Java 8 flag javac -parameters. The issue would cause the application to throw a java.lang.reflect.MalformedParametersException exception. Fixes bug that affected applications implementing JAX-RS endpoints using staticmethods. The agent now reports WildFly dispatcher name and version. Fixes a bug"
+ },
+ "id": "58a53cf38e9c0f755a81db4e"
+ },
+ {
+ "category_2": "API guides",
+ "nodeid": 11521,
+ "sections": [
+ "Java agent",
+ "Getting started",
+ "Installation",
+ "Additional installation",
+ "Heroku",
+ "Configuration",
+ "Attributes",
+ "Features",
+ "Instrumentation",
+ "Custom instrumentation",
+ "API guides",
+ "Async instrumentation",
+ "Troubleshooting",
+ "Guide to using the Java agent API",
+ "Use the API",
+ "Transactions",
+ "Instrument asynchronous work",
+ "Implement distributed tracing",
+ "Implement cross application tracing",
+ "Obtain references to New Relic entities",
+ "Additional API functionality",
+ "Additional API usage examples",
+ "For more help"
+ ],
+ "title": "Guide to using the Java agent API ",
+ "category_0": "APM agents",
+ "type": "docs",
+ "category_1": "Java agent",
+ "translation_ja_url": "https://docs.newrelic.co.jp/docs/agents/java-agent/api-guides/guide-using-java-agent-api",
+ "external_id": "a31c751c7c29dd46effac2e568f7c0a92b033b18",
+ "image": "",
+ "url": "https://docs.newrelic.com/docs/agents/java-agent/api-guides/guide-using-java-agent-api",
+ "published_at": "2020-09-20T20:19:15Z",
+ "updated_at": "2020-09-03T11:06:02Z",
+ "breadcrumb": "Contents / APM agents / Java agent / API guides",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "A goal-focused guide to New Relic's Java agent API, with links to relevant sections of the complete API documentation on GitHub.",
+ "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Static methods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional functionality Use this API to set up custom instrumentation of your Java app and collect more in-depth data. For detailed information about this API, see the complete Javadoc on GitHub. Another way to set up custom instrumentation is to use XML instrumentation. The XML option is simpler and does not require modification of your app code, but it lacks the complete functionality of the Java agent API. For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher. For all available New Relic APIs, see Intro to APIs. Use the API To access the API class, add newrelic-api.jar to your application class path. The jar is in the New Relic Java agent's installation zip file. You can call the API when the Java agent is not running. The API methods are just stubs; the implementation is added when the Java agent loads the class. Transactions To instrument Transactions in your application, use the following APIs. If you want to... Use this Create a Transaction when New Relic does not create one automatically @Trace(dispatcher = true) on the method that encompasses the work to be reported. When this annotation is used on a method within the context of an existing transaction, this will not start a new transaction, but rather include the method in the existing transaction. Capture the duration of a method that New Relic does not automatically trace @Trace() on the method you want to time. Set the name of the current Transaction NewRelic.setTransactionName(...) Start the timer for the response time of the current Transaction and to cause a Transaction you create to be reported as a Web transaction, rather than as an Other transaction NewRelic.setRequestAndReponse(...) Add custom attributes to Transactions and TransactionEvents NewRelic.addCustomParameter(...) Prevent a Transaction from being reported to New Relic NewRelic.ignoreTransaction() Exclude a Transaction when calculating your app's Apdex score NewRelic.ignoreApdex() Instrument asynchronous work For detailed information, see Java agent API for asynchronous applications. If you want to... Use this Trace an asynchronous method if it is linked to an existing Transaction... @Trace(async = true) Link the Transaction associated with the Token on the current thread... Token.link() or Token.linkAndExpire() Expire a Token associated with the current Transaction... Token.expire() Stop timing a Segment and have it report as part of its parent Transaction Segment.end() Stop timing a Segment and not have it report as part of its parent Transaction Segment.ignore() Implement distributed tracing These APIs require distributed tracing to be enabled. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. For general instructions on how to use the calls below to implement distributed tracing, see Use distributed tracing APIs. If you want to... Use this Create a payload to be sent to a called service. Transaction.createDistributedTracePayload() For more on obtaining references to the current transaction and other entities, see Obtain references. Accept a payload sent from the first service; this will link these services together in a trace. Transaction.acceptDistributedTracePayload(...) For more on obtaining references to the current transaction and other entities, see Obtain references. Payload used to connect services. The text() call returns a JSON string representation of the payload. DistributedTracePayload.text() Payload used to connect services. The httpSafe() call returns a base64 encoded JSON string representation of the payload. DistributedTracePayload.httpSafe() Add custom attributes to SpanEvents in distributed traces NewRelic.getAgent().getTracedMethod().addCustomAttribute(...) Implement cross application tracing To track external calls and add cross application tracing, use the following APIs: If you want to... Use this Trace across a custom transport channel that New Relic does not support by default, such as a proprietary RPC transport Transaction.getRequestMetadata(), .processRequestMetadata(...), .getResponseMetadata(), .processResponseMetadata(...) Also refer to the information in this document about using Transaction to obtain references to New Relic entities. View or change the metric name or a rollup metric name of a TracedMethod (A rollup metric name, such as OtherTransaction/all, is not scoped to a specific transaction. It represents all background transactions.) TracedMethod.getMetricName(), .setMetricName(...), .setRollupMetricName(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Report a call to an external HTTP service, database server, message queue, or other external resource that is being traced using the Java agent API's @Trace annotation TracedMethod.reportAsExternal(...) passing arguments constructed using ExternalParameters builder. Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Enable and add cross application tracing when communicating with an external HTTP or JMS service that is instrumented by New Relic TracedMethod.addOutboundRequestHeaders(...) along with TracedMethod.reportAsExternal(...) Also refer to the information in this document about using TracedMethod to obtain references to New Relic entities. Add timing for an application server or dispatcher that is not supported automatically Transaction.setRequest(...), Transaction.setResponse(...), or NewRelic.setRequestAndResponse(...), and Transaction.markResponseSent() Also refer to the information in this document about using Transaction to obtain references to New Relic entities. Obtain references to New Relic entities Other tasks require the New Relic Agent object. The Agent object exposes multiple objects that give you the following functionality: If you want to... Use this Get a reference to the current Transaction NewRelic.getAgent().getTransaction() Get a Token to link asynchronous work NewRelic.getAgent().getTransaction().getToken() Start and get a reference to a Segment NewRelic.getAgent().getTransaction().startSegment() Get a reference to the method currently being traced NewRelic.getAgent().getTracedMethod() Get a reference to the Agent logger NewRelic.getAgent().getLogger() Get a reference to the Agent configuration NewRelic.getAgent().getConfig() Get a reference to an aggregator for custom metrics NewRelic.getAgent().getAggregator() Get a reference to Insights in order to record custom events NewRelic.getAgent().getInsights() Additional API functionality The following APIs provide additional functionality, such as setting app server info, reporting errors, adding page load timing information, recording custom metrics, and sending custom events to Insights. If you want to... Use this Explicitly set port, name, and version information for an application server or dispatcher and the instance name for a JVM NewRelic.setAppServerPort(...), .setServerInfo(...), and .setInstanceName(...) Report an error that New Relic does not report automatically NewRelic.noticeError(...) When inside a transaction, the first call to noticeError wins. Only 1 error will be reported per transaction. Add browser page load timing for Transactions that New Relic does not add to the header automatically NewRelic.getBrowserTimingHeader(), .getBrowserTimingFooter(), .setUserName(String name), .setAccountName(String name), and .setProductName(String name) Create and accumulate custom metrics NewRelic.recordMetric(...), .recordResponseTimeMetric(...), or .incrementCounter(...) Record custom events Insights.recordCustomEvent(...) Or, use NewRelic.addCustomParameter(...) to add custom attributes to the New Relic-defined TransactionEvent type. Also refer to the information in this document about using Insights to obtain references to New Relic entities. Additional API usage examples For detailed code examples about using the APIs, see New Relic's documentation about custom instrumentation for: External calls, cross application traces, messaging, datastores, and web frameworks Cross application tracing and external datastore calls Apps using custom instrumentation with annotation Custom framework instrumentation API Preventing unwanted instrumentation Inserting custom attributes Inserting custom events Collecting custom metrics For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 36.90687,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "body": "The New Relic Java agent API lets you control, customize, and extend the functionality of the APM Java agent. This API consists of: Staticmethods on the com.newrelic.api.agent.NewRelic class A @Trace annotation for implementing custom instrumentation A hierarchy of API objects providing additional"
+ },
+ "id": "5a3137f4e621f4576cf1e35f"
+ },
+ {
+ "category_2": "PHP agent API",
+ "nodeid": 11821,
+ "sections": [
+ "PHP agent",
+ "Getting started",
+ "Installation",
+ "Advanced installation",
+ "Configuration",
+ "API guides",
+ "PHP agent API",
+ "Attributes",
+ "Features",
+ "Frameworks and libraries",
+ "Troubleshooting",
+ "newrelic_add_custom_tracer",
+ "Requirements",
+ "Description",
+ "Parameters",
+ "Return value(s)",
+ "Example(s)",
+ "Instrument a function",
+ "Instrument a method within a class",
+ "Instrument a method within a namespaced class",
+ "For more help"
+ ],
+ "title": "newrelic_add_custom_tracer (PHP agent API)",
+ "category_0": "APM agents",
+ "type": "docs",
+ "category_1": "PHP agent",
+ "external_id": "12242c1e6fe8cb70e2d42ff670cad04c01e9317e",
+ "image": "",
+ "url": "https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer",
+ "published_at": "2020-09-20T21:00:10Z",
+ "updated_at": "2019-09-30T22:55:59Z",
+ "breadcrumb": "Contents » APM agents / PHP agent / PHP agent API",
+ "document_type": "api_doc",
+ "popularity": 1,
+ "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ",
+ "body": "newrelic_add_custom_tracer(string $function_name) Specify functions or methods for the agent to instrument with custom instrumentation. Requirements Compatible with all agent versions. Description Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions. Parameters Parameter Description $function_name string Required. The name can be formatted either as function_name for procedural functions, or as \"ClassName::method\" for methods. Both static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument a function function example_function() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"example_function\"); } } Instrument a method within a class class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"ExampleClass::example_method\"); } } } Instrument a method within a namespaced class namespace Foo\\Bar; class ExampleClass { function example_method() { if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(\"Foo\\\\Bar\\\\ExampleClass::example_method\"); } } } Alternatively, on PHP 5.5 or later, the ::class syntax can be used instead: namespace Foo\\Bar { class ExampleClass { function example_method() { // ... } } } namespace { use Foo\\Bar; if (extension_loaded('newrelic')) { // Ensure PHP agent is available newrelic_add_custom_tracer(Bar::class . \"::example_method\"); } } }",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 26.38439,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "sections": "Instrument a method within a class",
+ "info": "New Relic PHP agent API call to add custom instrumentation to particular methods in your app code. ",
+ "body": " static and instance methods will be instrumented if the method syntax is used, and the class name must be fully qualified: it must include the full namespace if the class was defined within a namespace. Return value(s) Returns true if the tracer was added successfully. Example(s) Instrument"
+ },
+ "id": "58ca4191e621f45edd466e7a"
},
+ {
+ "nodeid": 9691,
+ "sections": [
+ "Introduction to New Relic Mobile (Unity)",
+ "Contents",
+ "Monitor mobile app performance",
+ "Install and configure",
+ "Use Unity SDK API",
+ "Send custom events and attributes to Insights",
+ "Track custom network requests",
+ "Uninstall plugin",
+ "Unity release notes",
+ "For more help"
+ ],
+ "title": "Introduction to New Relic Mobile (Unity)",
+ "type": "docs",
+ "external_id": "9e03a54ec6df360532302d4dfe7484070f8ba80c",
+ "image": "",
+ "url": "https://docs.newrelic.com/docs/introduction-new-relic-mobile-unity",
+ "published_at": "2020-09-21T00:13:57Z",
+ "updated_at": "2020-07-25T00:44:01Z",
+ "breadcrumb": "Contents",
+ "document_type": "page",
+ "popularity": 1,
+ "body": "Legacy feature This document is for historical reference. Unity is no longer supported for new customers. Contents Monitor mobile app performance The New Relic Unity plugin allows Unity developers to embed a New Relic Mobile agent (iOS or Android) in a Unity app build for mobile devices to monitor your app's performance. The plugin is written in C#, but it includes the native iOS and Android agents that embed the appropriate files for your build. Features New Relic Mobile Features Comprehensive performance data View your mobile app's performance Overview page for summary information about active sessions, or drill down to detailed information, including (note limitations below): Interaction times and trace details Crash reporting Devices Operating systems Detailed network views Available by using the API to track custom network requests For iOS apps, receive automatic instrumentation for networking for any parts of the app that are native and non-Unity (using standard Apple networking components such as NSURLConnection) Examine HTTP errors and network failures (such as DNS lookups, timeouts, SSL errors, etc.) and server error traces. Usage details at a glance Compare performance between versions of your app with detailed information for memory, CPU (iOS only), interaction speed, network requests per minute, and network failures. View a monthly report with a bar chart tracking the number of devices running your app for each month over the last year. Mobile SDK API options Use the Unity API to: Create and complete interactions Record custom metrics Send custom events to Insights Track custom network requests Known limitations The New Relic Unity plugin does not automatically instrument interactions. You must use the Unity API to track specific interactions. The New Relic Unity plugin does not automatically instrument network requests. You must use the Unity API to track network calls. Android builds: Unity still generates an Eclipse project, but Android Studio can import the Eclipse project. Install and configure The Unity plugin includes iOS and Android agent files that will embed the appropriate files for your build. To instrument interactions and network requests, you must use the Unity API to manually instrument your code. Install the Unity plugin As part of the installation process, New Relic Mobile automatically generates an application token. This is a 40-character hexadecimal string for authenticating each mobile project you monitor in New Relic Mobile. For Admins with existing New Relic accounts, follow these steps to install and configure your Unity application. (If you do not have a New Relic account, see New Relic Mobile.) Go to rpm.newrelic.com/mobile. From the mobile apps index, select Add a new app. From the Get started page, select Unity as the platform for mobile monitoring. Type a name for your mobile project, then select Continue. Continue with the procedures to configure the Unity plugin. Configure the Unity plugin These procedures to configure your app also appear on the Get started page in the New Relic UI. Install NewRelic-Unity-Plugin.unitypackage into your project by going to Assets > Import package > Custom package... and selecting NewRelic-Unity-Plugin.unitypackage. Create a new GameObject in your project's initial scene by going to GameObject > Create empty and naming it NewRelicAgent. Add NewRelicAgent.cs script (located in Assets/Plugins) to the NewRelicAgent GameObject: Drag it on top of NewRelicAgent in the Hierarchy tab. OR Click Add Component button, then select New Relic Agent from the Scripts option. In the Inspector tab, set the iOS or Android application token from your New Relic Mobile apps. (Recommendation: Keep New Relic Mobile apps on separate platforms.) Build for your platform (iOS or Android), then open the resulting project (Xcode or Eclipse). For Eclipse, import the generated project into Android Studio. Android only: Ensure that your app requests the INTERNET permission through the Player Settings inspector window. In Other Settings, Configuration, ensure the Internet access dropdown is set to Required. This will result in the following permission added to the app's manifest: Run your app in an emulator or device to generate data. Check New Relic Mobile to ensure the data is reporting to your account. Configure crash reporting The New Relic Unity plugin cannot automatically upload dSYMs for iOS crash reporting. You must manually upload dSYMs once your iOS unity app is built for release. If the application is bitcode enabled, follow the procedures for bitcode enabled apps once the your iOS app is submitted to Apple. If you are building an Android app with ProGuard enabled, you must follow similar steps. The ProGuard mapping must be uploaded to New Relic so crash reports can be de-obfuscated. For more information, see Android agent crash reporting. Optional: Change the logging level Six logging levels are available for mobile apps monitoring: NONE ERROR WARNING INFO VERBOSE DEBUG Recommendation: Set the logging level from the Unity Inspector tab. Use Unity SDK API Use the New Relic Unity SDK API to further configure and extend the plugin's instrumentation. Create and complete interactions To start an interaction: string interactionIdentifier = NewRelicAgent.StartInteractionWithName(\"new interaction\"); To stop the current interaction: NewRelicAgent.StopCurrentInteraction(interactionIdentifier); Interactions work in conjuction with method tracing. To trace a method insert startTracingMethod, insert at the start of the method to trace, and insert endTracingMethodWithTimer at each exit point of the method. To start tracing a method: Timer methodTimer = new Timer(); NewRelicAgent.StartTracingMethod(\"MethodName\",\"ClassName\",methodTimer,NewRelicAgent.NRTraceType.None); To end tracing a method, use the same timer as the startTracingMethod:> NewRelicAgent.EndTracingMethodWithTimer(methodTimer); Set a custom build identifier Custom build identifiers are set as the Application Build property in the inspector pane for the NewRelicAgent game object, under the New Relic Agent (Script) settings. Execute a demo crash If you have trouble getting your project to crash, use the New Relic Unity plugin API to execute a demo crash. Recommendation: Add this line of code to a button click event handler as applicable: NewRelicAgent.CrashNow(\"message\")> Record custom metrics With the custom metric API, you can record arbitrary numerical data and named events. Custom metrics can help to track high level events specific to your application. You can use several API calls to record custom metrics that provide different levels of detail. To create a custom metric, use this method: NewRelicAgent.RecordMetricWithName(String name, String category) The name parameter is the textual name of the metric that will appear in the user interface for New Relic Mobile. Using clear, concise metric names will help you get the most out of the metrics. The guidelines for naming a custom metric include: Use case and white space characters appropriate for display in the user interface. Metric names are rendered as-is. Capitalize the metric name. Avoid using the characters / ] [ | * when naming things. Avoid multi-byte characters. If you want to specify more details about a custom metric, three other API methods are available: NewRelicAgent.RecordMetricWithName(String name, String category, double value) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits) NewRelicAgent.RecordMetricWithName(string name, string category, double value, string valueUnits, string countUnits) With these methods, you can record additional details: Parameter Description count The number of times the event has happened totalValue The total value of the recording exclusiveValue The exclusive value of the recording; for example, if the total value contains measurements accounted for elsewhere countUnit Unit of measurement for the metric count, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS valueUnit Unit of measurement for the metric value, including PERCENT, BYTES, SECONDS, BYTES_PER_SECOND, or OPERATIONS To view the custom metrics you collect, follow standard procedures to create custom dashboards. Send custom events and attributes to Insights The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following static methods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return true if they succeed, or false if the operation did not complete. The following methods are available for custom attributes and events: RecordEvent (name, attributes) NewRelicAgent.RecordEvent (string name, string dictionary attributes) Records a custom Insights event. Includes a list of attributes specified as a map. SetAttribute (name, value) NewRelicAgent.SetAttribute (string name, string value) NewRelicAgent.SetAttribute (string name, double value) Creates an attribute with the specified text name and text/float value. SetAttribute overwrites its previous value and type each time it is called. Examples boolean attributeSet = NewRelicAgent.SetAttribute(\"username\", \"SampleUserName\"); boolean attributeSet = NewRelicAgent.SetAttribute(\"rate\", 9999.99); IncrementAttribute (name [, value]) public static boolean IncrementAttribute(String name); public static boolean incrementAttribute(String name, double value) If value is not specified, this method increments the count for the specified attribute by 1. If the attribute does not exist, it creates the attribute with a value of 1. If value is specified, the method will increment the attribute by the specified amount. Examples boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\"); boolean incremented = NewRelicAgent.IncrementAttribute(\"rate\", 9999.99, false); RemoveAttribute (name) NewRelicAgent.RemoveAttribute(String name) Removes the specified attribute. Example boolean attributeRemoved = NewRelicAgent.RemoveAttribute(\"rate\"); removeAllAttributes NewRelicAgent.removeAllAttributes() Removes all attributes from the session. Example boolean attributesRemoved = NewRelicAgent.RemoveAllAttributes(); Track custom network requests New Relic Mobile's API provides several methods to track network requests and network failures. For example, use the noticeHttpTransaction family of methods to record HTTP transactions with several available levels of detail. If a network request fails, you can record details about the failure with noticeNetworkFailure. NoticeNetworkRequest NewRelicAgent.NoticeNetworkRequest (\"http://newrelic.com\", \"GET\", timer, null, 200, 1024, 8192, bytes, httpParameters); Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST statusCode The statusCode of the HTTP response, such as 200 for OK timer A timer created when the network request was started bytesSent The number of bytes sent in the request bytesReceived The number of bytes received in the response responseBody The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error. params Additional parameters included in an HTTP Error metric if the HTTP transaction is an error. NoticeNetworkFailure NewRelicAgent.NoticeNetworkFailure(String url, String httpMethod, Timer timer, NewRelicAgent.NetworkFailureCode failureCode, String message) Parameter Description url The URL of the request httpMethod The HTTP method used, such as GET or POST timer A timer created when the network request was started exception The exception that occurred. New Relic Mobile can automatically translate many common exceptions into network failure types. failure The type of network failure that occurred. If an exception cannot be resolved to a network failure automatically, this method can be used to categorize the failure accurately. The values are defined by the NetworkFailure enum. Valid values include Unknown, BadURL, TimedOut, CannotConnectToHost, DNSLookupFailed, BadServerResponse, and SecureConnectionFailed. Uninstall plugin To uninstall the Unity plugin, use the project console to remove all related files and resources that were installed with the Unity package: Delete NewRelicAgent object from the Hierarchy pane of the Unity project console. From All Scripts, delete all the scripts that start with newrelic. Then do the following as applicable: From Assets > Plugin > iOS, delete the NewRelicIos, NewRelicUnityPlugin, post-build, and restore-framework files. Then remove the mod_pbxproj and NewRelicAgent.framework directories. From Assets > Plugin > Android, delete the newrelic.android and NewRelicAndroid files. Then remove the LICENSE and README directories. Unity release notes These release notes are for historical reference. Unity is no longer supported for new customers. Unity plugin 1.2.0 Released on: Monday, March 13, 2017 - 13:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.2.0.zip Notes: Updated Unity plugin to iOS agent 5.9.0 and Android agent 5.9.0 Unity plugin 1.1.0 Released on: Tuesday, September 6, 2016 - 14:53 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.1.0.zip Notes: Updated Unity plugin to iOS agent 5.8.0 and Android agent 5.7.1 Unity plugin 1.0.1 Released on: Monday, August 8, 2016 - 14:00 Download URL: https://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.1.zip Notes: Bundle Android class rewriter JAR file (version 5.6.1) into the Unity package. Unity plugin 1.0.0 Released on: Wednesday, May 25, 2016 - 14:00 Download URL: http://download.newrelic.com/unity/NewRelic-Unity-Plugin_1.0.0.zip Notes: This plugin provides New Relic Mobile agent support for iOS and Android applications built with Unity. It also gives Unity developers access to New Relic crash reporting. It provides information about app performance, sessions, devices, operating systems, and more. It also includes APIs for custom instrumentation to gain deeper insights into specific areas of your app. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
+ "info": "",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 17.79867,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "body": " The SDK can store up to 64 user-defined attributes at a time. If you attempt to store more than 64 attributes, the SDK returns false. Use the following staticmethods in the NewRelicAgent namespace to send custom attributes and events to New Relic Insights. Methods that return boolean results return"
+ },
+ "id": "5c52cbec8e9c0f0b286080ec"
+ }
+ ],
+ "/automate-workflows/5-mins-tag-resources": [
{
"image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png",
"url": "https://developer.newrelic.com/",
@@ -5938,176 +6550,207 @@
"New Relic developer champions",
"New Relic Podcasts"
],
- "published_at": "2020-09-21T01:45:24Z",
+ "published_at": "2020-09-22T01:47:25Z",
"title": "New Relic Developers",
- "updated_at": "2020-09-21T01:36:40Z",
+ "updated_at": "2020-09-22T01:36:38Z",
"type": "developer",
"external_id": "214583cf664ff2645436a1810be3da7a5ab76fab",
"document_type": "page",
"popularity": 1,
- "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 22 Days : 14 Hours : 58 Minutes : 30 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
+ "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 21 Days : 14 Hours : 59 Minutes : 10 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
"info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 198.77528,
+ "_score": 180.12036,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
"title": "NewRelic Developers",
"sections": "NewRelic developer champions",
- "body": " instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local NewRelicOneCatalog Start the guide Get inspired 30 min Add a table to your app Add a table to your NewRelicOne app 15 min Collect data - any"
+ "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the NewRelicCLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add"
},
"id": "5d6fe49a64441f8d6100a50f"
},
{
"image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-common/",
+ "url": "https://developer.newrelic.com/automate-workflows/",
"sections": [
- "New Relic One CLI common commands",
- "Command details",
- "nr1 help",
- "See commands and get details",
- "Usage",
- "Arguments",
- "Examples",
- "nr1 update",
- "Update your CLI",
- "nr1 create",
- "Create a new component",
- "Options",
- "nr1 profiles",
- "Manage your profiles keychain",
- "Commands",
- "nr1 autocomplete",
- "See autocomplete installation instructions",
- "nr1 nrql",
- "Query using NRQL"
+ "Automate workflows",
+ "Guides to automate workflows",
+ "Quickly tag resources",
+ "Set up New Relic using Helm charts",
+ "Automatically tag a simple \"Hello World\" Demo across the entire stack",
+ "Automate common tasks",
+ "Set up New Relic using the Kubernetes operator",
+ "Set up New Relic using Terraform"
],
- "published_at": "2020-09-21T01:46:19Z",
- "title": "New Relic One CLI common commands",
- "updated_at": "2020-08-14T01:48:10Z",
+ "published_at": "2020-09-22T01:49:59Z",
+ "title": "Automate workflows",
+ "updated_at": "2020-09-21T01:47:51Z",
"type": "developer",
- "external_id": "503e515e1095418f8d19329517344ab209d143a4",
+ "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871",
"document_type": "page",
"popularity": 1,
- "info": "An overview of common commands you can use with the New Relic One CLI.",
- "body": "New Relic One CLI common commands Here's a list of common commands to get you started with the New Relic One CLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). See our other New Relic One CLI docs for commands specific to Nerdpack set-up, Nerdpack subscriptions, CLI configuration, plugins, or catalogs. Command details nr1 help See commands and get details Shows all nr1 commands by default. To get details about a specific command, run nr1 help COMMAND_NAME. Usage $ nr1 help Arguments COMMAND_NAME The name of a particular command. Examples $ nr1 help $ nr1 help nerdpack $ nr1 help nerdpack:deploy nr1 update Update your CLI Updates to latest version of the CLI. You can specify which channel to update if you'd like. Usage $ nr1 update Arguments CHANNEL The name of a particular channel. Examples $ nr1 update $ nr1 update somechannel nr1 create Create a new component Creates a new component from our template (either a Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. To learn more about Nerdpacks and their file structure, see Nerdpack file structure. For more on how to set up your Nerdpacks, see our Nerdpack CLI commands. Usage $ nr1 create Options -f, --force If present, overrides existing files without asking. -n, --name=NAME Names the component. -t, --type=TYPE Specifies the component type. --path=PATH The route to the component. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 profiles Manage your profiles keychain Displays a list of commands you can use to manage your profiles. Run nr1 help profiles:COMMAND for more on their specific usages. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. To learn more about setting up profiles, see our Github workshop. Usage $ nr1 profiles:COMMAND Commands profiles:add Adds a new profile to your profiles keychain. profiles:default Chooses which profile should be default. profiles:list Lists the profiles on your keychain. profiles:remove Removes a profile from your keychain. nr1 autocomplete See autocomplete installation instructions Displays the autocomplete installation instructions. By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run nr1 autocomplete bash. Usage $ nr1 autocomplete Arguments SHELL The shell type you want instructions for. Options -r, --refresh-cache Refreshes cache (ignores displaying instructions). Examples $ nr1 autocomplete $ nr1 autocomplete zsh $ nr1 autocomplete bash $ nr1 autocomplete --refresh-cache nr1 nrql Query using NRQL Fetches data from databases using a NRQL query. To learn more about NRQL and how to use it, see our NRQL docs. Usage $ nr1 nrql OPTION ... Options -a, --account=ACCOUNT The user account ID. required -q, --query=QUERY The NRQL query to run. required -u, --ugly Displays the content without tabs or spaces. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output.",
+ "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform",
+ "info": "",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 179.50056,
+ "_score": 148.2966,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI common commands",
- "sections": "NewRelicOneCLI common commands",
- "info": "An overview of common commands you can use with the NewRelicOneCLI.",
- "body": "NewRelicOneCLI common commands Here's a list of common commands to get you started with the NewRelicOneCLI. You can click any command to see its usage options and additional details about the command. Command Description nr1 help Shows all nr1 commands or details about each command. nr1"
+ "sections": "Set up NewRelic using Helm charts",
+ "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up NewRelic using Helm charts Learn how to set up NewRelic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy"
},
- "id": "5f28bd6ae7b9d267996ade94"
+ "id": "5efa999c196a67dfb4766445"
},
{
"sections": [
- "Serve, publish, and deploy your New Relic One app",
+ "Get started with the New Relic CLI",
"Before you begin",
- "Serve your app locally",
- "Add images and metadata to your apps",
- "screenshots folder",
- "documentation.md",
- "additionalInfo.md",
- "config.json",
- "Publish your app",
- "Tip",
- "Deploy your app",
- "Subscribe or unsubsribe apps",
- "Handle duplicate applications"
+ "Install the New Relic CLI",
+ "Linux",
+ "macOS",
+ "Windows",
+ "Create your New Relic CLI profile",
+ "Get your application details",
+ "Add a simple tag to your application",
+ "Bonus step: Create a deployment marker",
+ "Next steps"
],
- "title": "Serve, publish, and deploy your New Relic One app",
+ "title": "Get started with the New Relic CLI",
"type": "developer",
"tags": [
- "publish apps",
- "deploy apps",
- "subscribe apps",
- "add metadata apps"
+ "api key",
+ "New Relic CLI",
+ "Tags",
+ "Entity",
+ "Deployment markers"
],
- "external_id": "63283ee8efdfa419b6a69cb8bd135d4bc2188d2c",
- "image": "https://developer.newrelic.com/static/175cc6506f7161ebf121129fa87e0789/0086b/apps_catalog.png",
- "url": "https://developer.newrelic.com/build-apps/publish-deploy/",
- "published_at": "2020-09-21T01:50:10Z",
- "updated_at": "2020-09-02T02:05:55Z",
+ "external_id": "531f2f3985bf64bb0dc92a642445887095048882",
+ "image": "",
+ "url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/",
+ "published_at": "2020-09-22T01:47:24Z",
+ "updated_at": "2020-08-08T01:41:47Z",
"document_type": "page",
"popularity": 1,
- "info": "Start sharing and using the custom New Relic One apps you build",
- "body": "Serve, publish, and deploy your New Relic One app 30 min When you build a New Relic One app, chances are you'll want to share it with others in your organization. You might even want to share it broadly through our open source channel. But first, you probably want to try it out locally to make sure it's working properly. From the New Relic One Apps page, you can review available apps and subscribe to the ones you want for accounts you manage. The Your apps section shows launchers for New Relic apps, as well as any third-party apps that you subscribe to. The New Relic One catalog provides apps that you haven't subscribed to, some developed by New Relic engineers to provide visualizations we think you'll want, like Cloud Optimizer, which analyzes your cloud environment, or PageView Map, which uses Browser events to chart performance across geographies. Your apps in the catalog are created by third-party contributors and are submitted via opensource.newrelic.com. All are intended to help you visualize the data you need, the way you want it. Here, you learn to: Serve your app locally Add images and metadata to your app Publish it Subscribe and unsubscribe accounts you manage to the app Handle duplicate applications Before you begin This guide requires the following: A New Relic One app or Nerdpack New Relic One CLI A Nerdpack manager role for publishing, deploying, and subscribing apps. Serve your app locally You can locally serve the app you create to New Relic One to test it out. Step 1 of 1 In the parent root folder of your Nerdpack, run nr1 nerdpack:serve. Go to one.newrelic.com/?nerdpacks=local. The ?nerdpacks=local URL suffix will load any locally served Nerdpacks that are available. When you make a change to a locally served Nerdpack, New Relic One will automatically reload it. Add images and metadata to your apps Application creators can include a description of what their apps do and how they're best used when they build an app. They can also include screenshots, icons, and metadata that help to make them easy to spot amongst other applications. Some metadata is added automatically when an app is published: Related entities, listed if there are any. Origin label to indicate where the app comes from: local, custom, or public. The New Relic One CLI enables you to provide the information and images you want to include with your application. Then it's a matter of kicking off a catalog command that validates the information and saves it to the catalog. Step 1 of 3 Update the New Relic One CLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add a catalog folder to your New Relic One project. The folder contains the following empty files and folder. Add the information as described in the following sections for the process to succeed. screenshots folder A directory that must contain no more than 6 images and meet these criteria: 3:2 aspect ratio PNG format landscape orientation 1600 to 2400 pixels wide documentation.md A markdown file that presents usage information pulled into the Documentation tab for the application in the catalog. additionalInfo.md An optional markdown file for any additional information about using your application. config.json A JSON file that contains the following fields: tagline: A brief headline for the application. Must not exceed 30 characters. repository: The URL to the GitHub repo for the application. Must not exceed 1000 characters. details: Describes the purpose of the application and how to use it. Information must not exceed 1000. Use carriage returns for formatting. Do not include any markdown or HTML. support: An object that contains: issues: A valid URL to the GitHub repository's issues list, generally the GitHub Issues tab for the repo. email: A valid email address for the team supporting the application. community: URL to a support thread, forum, or website for troubleshooting and usage support. whatsNew: A bulleted list of changes in this version. Must not exceed 500 characters. Use carriage returns for formatting. Do not include markdown or HTML. Example: { \"tagline\": \"Map your workloads & entities\", \"repository\": \"https://github.com/newrelic/nr1-workload-geoops.git\", \"details\": \"Describe, consume, and manage Workloads and Entities in a geographic \\n model that supports location-specific KPI's, custom metadata, drill-down navigation into Entities \\n and Workloads, real-time configuration, and configuration via automation using the newrelic-cli.\", \"support\": { \"issues\": { \"url\": \"https://github.com/newrelic/nr1-workload-geoops/issues\" }, \"email\": { \"address\": \"opensource+nr1-workload-geoops@newrelic.com\" }, \"community\": { \"url\": \"https://discuss.newrelic.com/t/workload-geoops-nerdpack/99478\" } }, \"whatsNew\": \"\\n-Feat: Geographic mapping of Workloads and Entities\\n -Feat: Programmatic alerting rollup of underlying Entities\\n -Feat: Custom KPI measurement per location\\n -Feat: Empty-state edit workflow\\n -Feat: JSON file upload format\\n-Feat: Published (in open source docs) guide to automating configuration using the newrelic-cli\" } Copy Step 3 of 3 Save the metadata and screenshots to the catalog. This validates the information you added to the catalog directory against the criteria described in the previous step, and saves it to the catalog. nr1 catalog:submit Copy Publish your app Publishing places your Nerdpack in New Relic One. To publish or deploy, you must be a Nerdpack manager. New Relic One requires that only one version (following semantic versioning) of a Nerdpack can be published at a time. Tip If you know what channel you want to deploy to (as described in the Deploy your app section that follows), you can run nr1 nerdpack:publish --channel=STABLE or nr1 nerdpack:publish --channel=BETA. Step 1 of 2 Update the version attribute in the app's package.json file. This follows semantic versioning, and must be updated before you can successfully publish. Step 2 of 2 To publish your Nerdpack, run nr1 nerdpack:publish. Deploy your app Deploying is applying a Nerdpack version to a specific channel (for example, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. Channels are meant to be an easier way to control application version access than having to be concerned with specific version numbers. Step 1 of 1 To deploy an application, run nr1 nerdpack:deploy. Subscribe or unsubsribe apps Whether you want to subscribe accounts to an app you've created or to apps already available in the catalog, the process is the same. Note that if you subscribe to an app in the catalog, you'll automatically get any updates that are added to the app. To learn about the appropriate permissions for subscribing, see Permissions for managing applications. Step 1 of 2 Subscribe accounts to an application. Select an application you want to add to your New Relic account. Click Add this app. Note that this button says Manage access if the app has already been subscribed to an account you manage. On the Account access page listing the accounts you can subscribe to an application: Select the accounts you want to subscribe the app to. Choose the channel you want to subscribe the app to, Stable or Dev. This can only be Stable for the public apps created by New Relic. Click the update button. Now you and members of the accounts you have subscribed to the app can launch it from New Relic One. Step 2 of 2 Unsubsribe from an application. On the Apps page, open the app you want to unsubscribe. Click Manage access. Clear the check box for any accounts you want to unsubscribe, and then click the update button. The application is no longer listed in the Your apps section of the Apps page, and you have unsubscribed. Handle duplicate applications You might end up with duplicate applications on your New Relic One Apps page. This can happen when you subscribe to the same app using both the CLI and the catalog. Or if you clone an app, modify, and deploy it, but keep the original name. You can manage duplicates with the catalog. Good to know before you start: You need a user role with the ability to manage Nerdpacks for accounts that you want to unsubscribe and undeploy from applications. You can't remove the public apps. When a duplicate application has no accounts subscribed to it, you undeploy it. For applications that have accounts subscribed to them, you unscubscribe and undeploy. The unsubscribe and undeploy process happens in a batch. To remove an account from an application, but ensure that other accounts continue to be subscribed, select the checkbox, Resubscribe these accounts to the new application. Step 1 of 1 Remove duplicates. In the New Relic One catalog, click a public application that has one or more duplicates. (You can only manage duplicates from the public version of the application.) On the application information page, select Clean up applications. Review the information about the application that's open, as well as any duplicates. Click Manage app for duplicates you want to remove. If needed, select Resubscribe these accounts to the new application. Click Unsubscribe and undeploy, and agree to the terms and conditions.",
+ "info": "Learn the essentials of the New Relic CLI, from install and configuration to basic usage.",
+ "body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 159.25339,
+ "_score": 104.95538,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "Serve, publish, and deploy your NewRelicOne app",
- "sections": "Serve, publish, and deploy your NewRelicOne app",
- "info": "Start sharing and using the custom NewRelicOne apps you build",
- "body": " a matter of kicking off a catalogcommand that validates the information and saves it to the catalog. Step 1 of 3 Update the NewRelicOneCLI to ensure you're working with the latest version. nr1 update Copy Step 2 of 3 Add catalog metadata and screenshots. Run nr1 create and then select catalog to add"
+ "title": "Get started with the NewRelicCLI",
+ "sections": "Get started with the NewRelicCLI",
+ "info": "Learn the essentials of the NewRelicCLI, from install and configuration to basic usage.",
+ "tags": "NewRelicCLI",
+ "body": " Now that you have the GUID, you can point the NewRelicCLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead"
},
- "id": "5efa999de7b9d283e67bab8f"
+ "id": "5efa999c196a67c4e1766461"
},
{
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
+ "image": "https://developer.newrelic.com/static/2d91ba8d23ca23b012f2ffb437acc09e/0086b/helloworld-automationdemo.png",
+ "url": "https://developer.newrelic.com/automate-workflows/automated-tagging/",
"sections": [
- "New Relic One CLI Nerdpack commands",
- "Command details",
- "nr1 nerdpack:build",
- "Builds a Nerdpack",
- "Usage",
- "Options",
- "nr1 nerdpack:clone",
- "Clone an existing Nerdpack",
- "nr1 nerdpack:serve",
- "Serve your Nerdpack locally",
- "nr1 nerdpack:uuid",
- "Get your Nerdpack's UUID",
- "nr1 nerdpack:publish",
- "Publish your Nerdpack",
- "nr1 nerdpack:deploy",
- "Deploy your Nerdpack to a channel",
- "nr1 nerdpack:undeploy",
- "Undeploy your Nerdpack",
- "nr1 nerdpack:clean",
- "Removes all built artifacts",
- "nr1 nerdpack:validate",
- "Validates artifacts inside your Nerdpack",
- "nr1 nerdpack:Info",
- "Shows the state of your Nerdpack in the New Relic's registry"
+ "Automate tagging of your entire stack",
+ "Before you begin",
+ "Collaborate with us",
+ "Build the deployer",
+ "Configure your credentials",
+ "Run the application",
+ "Tip",
+ "Locating the user configuration files",
+ "Understanding the deployment configuration file",
+ "Note",
+ "Generate some traffic",
+ "Check your tags",
+ "Tear down your resources",
+ "Next steps"
],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic One CLI Nerdpack commands",
- "updated_at": "2020-09-17T01:49:55Z",
+ "published_at": "2020-09-22T01:49:58Z",
+ "title": "Automate tagging of your entire stack",
+ "updated_at": "2020-09-19T01:54:15Z",
"type": "developer",
- "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
+ "external_id": "0c5d228b6bcee4b456b6ee36920e20da0df962d3",
"document_type": "page",
"popularity": 1,
- "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
- "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
+ "info": "A quick demo application that automates the provisioning, deployment, instrumentation, and tagging of a simple app.",
+ "body": "Automate tagging of your entire stack 30 min Organizing your services, hosts, and applications in New Relic can be challenging, especially as resources come and go. One strategy to overcome this challenge is to apply tags, consistently, across your stack. In this guide, you: Provision a host on AWS Deploy a small Node.js app on that host Instrument the host and the application with New Relic agents Apply consistent tags across all your entities Tear down everything you make when you're done The next section introduces you to tools for performing tasks in this guide. Before you begin Throughout this guide, you use three open source projects to automatically set up, instrument, and tear down your infrastructure: Demo Deployer: The engine that drives the automation Demo Nodetron: A Node.js app that you run on your host. It presents a web page and an API, which you use to generate traffic. Demo New Relic Instrumentation: A project that instruments your host and application Each project is distinct, and encapsulates its own behavior. This maintains a separation of concerns and allows you to compose complex scenarios using a modular approach. Collaborate with us The Demo Deployer is currently in development. Because of our commitment to open source, we are working in the open early in the process and invite you to collaborate with us. Drop any thoughts and comments in the Build on New Relic support thread, and let us know what you think! The last thing you need before you get started is to install Docker if you don't have it already. Now that you have a high-level understanding of the tools you'll use, you can begin by building the Demo Deployer! Step 1 of 6 Build the deployer To use the deployer, first clone its repository from GitHub. Then, build a Docker image using the local copy of the code. First, clone the repository from GitHub: git clone https://github.com/newrelic/demo-deployer.git Copy Second, build the deployer Docker image: docker build -t deployer demo-deployer Copy Now, you have a Docker image, named deployer, which you use throughout the rest of this guide. Step 2 of 6 Configure your credentials In this guide, you provision a host on AWS. The deployer uses a configuration file that contains your credentials for each service it communicates with so that it can invoke the necessary APIs. You can follow the User Config documentation in the deployer repository to set up each account and create your configuration file. In the end, you'll have a JSON file that contains credentials for AWS, New Relic, and GitHub: { \"credentials\": { \"aws\": { \"apiKey\": \"my_aws_api_key\", \"secretKey\": \"my_aws_secret_key\", \"secretKeyPath\": \"/path/to/my/secretkey.pem\", \"region\": \"my_aws_region\" }, \"newrelic\": { \"licenseKey\": \"my_new_relic_license_key\", \"accountId\": \"my_new_relic_account_id\" }, \"git\": { \"username\": \"my_git_access_token\" } } } Copy Name the credentials file creds.json, and store it—along with your [keypair filename].pem file—in a directory called $HOME/configs. Step 3 of 6 Run the application Now that everything is set up, you can run the deployer application in a Docker container: docker run -it\\ -v $HOME/configs/:/mnt/deployer/configs/\\ --entrypoint ruby deployer main.rb -c configs/creds.json -d documentation/tutorial/user_stories/Hello/hello.json Copy With this command, you're running the deployer Docker container with the following options: -v mounts the $HOME/configs volume (where you stored your configuration files) at /mnt/deployer/configs/ in the container --entrypoint sets the default command for Docker to ruby Finally, you pass a list of arguments to the entrypoint, including: -c configs/creds.json: The user credentials configuration file -d documentation/tutorial/user_stories/Hello/hello.json: The deployment configuration file Tip You can specify the log level for the deployer using -l. info is the default, but you can also use debug or error. This is a helpful option to use when something goes wrong. Once you run this command, the deployer will create and instrument some specific resources. This may take a few minutes. In the meantime, read on to learn more about what is actually happening during this process. Locating the user configuration files Notice, in the Docker command, that -c takes configs/creds.json. Also, you referenced your .pem file from configs/, as well. This is because you mounted $HOME/configs to /mnt/deployer/configs/ and /mnt/deployer/ is the working directory, according to the deployer's Dockerfile. So, you can access your user configuration files at configs/, which is a relative path from your working directory. Understanding the deployment configuration file The deployment configuration file, hello.json, which drives the deployer, contains four sections: services global_tags resources instrumentations These sections describe the actions the deployer executes. The first section is services: { \"services\": [ { \"id\": \"app1\", \"display_name\": \"Hello-App1\", \"source_repository\": \"-b main https://github.com/newrelic/demo-nodetron.git\", \"deploy_script_path\": \"deploy/linux/roles\", \"port\": 5001, \"destinations\": [\"host1\"], \"files\": [ { \"destination_filepath\": \"engine/data/index.json\", \"content\": } ] } ] } Copy services defines one service, app1, which lives on host1 at port 5001. It uses the Demo Nodetron you learned about earlier in this guide as its source. Note In this example, some HTML has been removed for clarity. To run the deployer, you need to use the real content in hello.json. The second section is global_tags: { \"global_tags\": { \"dxOwningTeam\": \"DemoX\", \"dxEnvironment\": \"development\", \"dxDepartment\": \"Area51\", \"dxProduct\": \"Hello\" } } Copy global_tags defines tags for the deployer to apply to all the resources in your stack. These tags are an important part of organizing your New Relic entities. The third section is resources: { \"resources\": [ { \"id\": \"host1\", \"display_name\": \"Hello-Host1\", \"provider\": \"aws\", \"type\": \"ec2\", \"size\": \"t3.micro\" } ], } Copy resources defines one host, host1, which is a small EC2 instance on AWS. This host is referred to in the services section. The fourth, and final, section is instrumentations: { \"instrumentations\": { \"resources\": [ { \"id\": \"nr_infra\", \"resource_ids\": [\"host1\"], \"provider\": \"newrelic\", \"source_repository\": \"-b main https://github.com/newrelic/demo-newrelic-instrumentation.git\", \"deploy_script_path\": \"deploy/linux/roles\", \"version\": \"1.12.1\" } ], \"services\": [ { \"id\": \"nr_node_agent\", \"service_ids\": [\"app1\"], \"provider\": \"newrelic\", \"source_repository\": \"-b main https://github.com/newrelic/demo-newrelic-instrumentation.git\", \"deploy_script_path\": \"deploy/node/linux/roles\", \"version\": \"6.11.0\" } ] } } Copy instrumentations configures, as the name implies, New Relic instrumentations for the host1 infrastructure and the app1 Node.js application. These definitions use the Demo New Relic Instrumentation project you learned about earlier. Step 4 of 6 Generate some traffic When deployer has run successfully, you will see a message that describes the resources deployed and services installed during the process: [INFO] Executing Deployment [✔] Parsing and validating Deployment configuration success [✔] Provisioner success [✔] Installing On-Host instrumentation success [✔] Installing Services and instrumentations success [INFO] Deployment successful! Deployed Resources: host1 (aws/ec2): ip: 52.90.86.109 services: [\"app1\"] instrumentation: nr_infra: newrelic v1.12.1 Installed Services: app1: url: http://52.90.86.109:5001 instrumentation: nr_node_agent: newrelic v6.11.0 Completed at 2020-08-20 15:11:14 +0000 Copy Visit your application by navigating to the app1 url in your browser: From there, you can follow the instructions to send traffic to New Relic. Note Your app1 url will be different than the url shown in this guide. Step 5 of 6 Check your tags After you've generated some traffic to your Node.js application, use the New Relic search redirect to find the resources you deployed: Once you have found your resources, select the service you deployed, Hello-App1. Then, click on the 'i' icon next to the name, which opens the metadata and tags modal: Notice that all the tags in the global_tags section of the deployment configuration show up under Tags: If you open the metadata modal for the host, you'll also see the global_tags. Step 6 of 6 Tear down your resources Because you've provisioned resources in your cloud account, you need to decommission them. You can do this with the deployer. Add the teardown flag, -t, to the end of your command: docker run -it\\ -v $HOME/configs/:/mnt/deployer/configs/\\ --entrypoint ruby deployer main.rb -c configs/creds.json -d documentation/tutorial/user_stories/Hello/hello.json -t Copy When the deployer has finished successfully, you'll see output that is similar to what you saw during deployment: [INFO] Executing Teardown [✔] Parsing and validating Teardown configuration success [✔] Provisioner success [✔] Uninstalling On-Host instrumentation success [✔] Uninstalling Services and instrumentations success [✔] Terminating infrastructure success [INFO] Teardown successful! Copy Next steps Congratulations! Throughout this guide, you used the Demo Deployer to provision and instrument a host and application in AWS and automatically configured those entities with a list of tags. Next, try creating your own deployment configuration and change the global tags! One cool thing you can do is pass in a configuration file URL to the deployer. Here's one that uses a gist on GitHub: docker run -it\\ -v $HOME/configs/:/mnt/deployer/configs/\\ --entrypoint ruby deployer main.rb -c configs/creds.json -d https://gist.githubusercontent.com/markweitzel/d281fde8ca572ced6346dc25470790a5/raw/373166eb50929a0dd23ba5136abf2fa5caf3d369/MarksHelloDemoConfig.json Copy",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 151.75645,
+ "_score": 95.1453,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelicOneCLI Nerdpack commands",
- "sections": "NewRelicOneCLI Nerdpack commands",
- "info": "An overview of the CLIcommands you can use to set up your NewRelicOne Nerdpacks.",
- "body": "NewRelicOneCLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
+ "title": "Automate tagging of your entire stack",
+ "sections": "Automate tagging of your entire stack",
+ "info": "A quick demo application that automates the provisioning, deployment, instrumentation, and tagging of a simple app.",
+ "body": "Automate tagging of your entire stack 30 min Organizing your services, hosts, and applications in NewRelic can be challenging, especially as resources come and go. One strategy to overcome this challenge is to apply tags, consistently, across your stack. In this guide, you: Provision a host on AWS"
},
- "id": "5f28bd6a64441f9817b11a38"
+ "id": "5f40792e196a6757721cd49c"
+ },
+ {
+ "category_2": "On-host integrations list",
+ "nodeid": 19216,
+ "sections": [
+ "On-host integrations",
+ "Get started",
+ "Installation",
+ "On-host integrations list",
+ "Understand and use data",
+ "Troubleshooting",
+ "VMware vSphere monitoring integration",
+ "Why it matters",
+ "Compatibility and requirements",
+ "Install and activate",
+ "Configure the integration",
+ "Example configuration",
+ "Update your integration",
+ "View and use data",
+ "Metric data",
+ "VSphereHost",
+ "VSphereVm",
+ "VSphereDatastore",
+ "VSphereDatacenter",
+ "VSphereResourcePool",
+ "VSphereCluster",
+ "VSphereSnapshotVm",
+ "For more help"
+ ],
+ "title": "VMware vSphere monitoring integration",
+ "category_0": "Integrations",
+ "type": "docs",
+ "category_1": "On-host integrations",
+ "external_id": "0fe30f87e8a0a8089f85397dd0d73fcc936ce545",
+ "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/image2.png",
+ "url": "https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/vmware-vsphere-monitoring-integration",
+ "published_at": "2020-09-20T17:26:21Z",
+ "updated_at": "2020-09-20T17:26:21Z",
+ "breadcrumb": "Contents / Integrations / On-host integrations / On-host integrations list",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "An introduction to New Relic's open-source VMware vSphere / ESXi integration. ",
+ "body": "New Relic's VMware vSphere integration helps you understand the health and performance of your vSphere environment. You can: Query data to get insights on the performance on your hypervisors, virtual machines, and more. Go from high level views down to the most granular data. vSphere data visualized in a New Relic dashboard: operating systems, status, average CPU and memory consumption, and more. Our integration uses the vSphere API to collect metrics and events generated by all vSphere's components, and forwards the data to our platform via the infrastructure agent. Why it matters With our vSphere integration you can: Instrument and monitor multiple vSphere instances using the same account. Collect data on snapshots, VMs, hosts, resource pools, clusters, and datastores, including tags. Monitor the health of your hypervisors and VMs using our charts and dashboards. Use the data retrieved to monitor key performance and key capacity scaling indicators. Set alerts based on any metrics collected from vCenter. Create workloads to group resources and focus on key data. You can create workloads using data collected via the vSphere integration. Compatibility and requirements Our integration is compatible with VMware vSphere 6.5 or higher. Before installing the integration, make sure that you meet the following requirements: Infrastructure agent installed on a host vCenter service account having at least read-only global permissions with the propagate to children option checked In large environments, where the number of virtual machines is bigger than 800, the integration is not currently able to report all data and might fail. There is a known workaround for these environments that will preserve all metrics and events, but it will disable entity registration. To apply the workaround add the following environment variable to the configuration file: EVENTS: true and METRICS: true. Install and activate To install the vSphere integration, choose your setup: Linux installation Follow the instructions for installing an integration, using the file name nri-vsphere. Change the directory to the integrations folder: cd /etc/newrelic-infra/integrations.d Copy of the sample configuration file: sudo cp vsphere-config.yml.sample vsphere-config.yml Edit the vsphere-config.yml file as described in the configuration settings. Restart the infrastructure agent. Windows installation Download the nri-vsphere MSI installer image from: https://download.newrelic.com/infrastructure_agent/windows/integrations/nri-vsphere/nri-vsphere-amd64.msi To install from the Windows command prompt, run: msiexec.exe /qn /i PATH\\TO\\nri-vsphere-amd64.msi In the Integrations directory, C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\, create a copy of the sample configuration file by running: cp vsphere-config.yml.sample vsphere-config.yml Edit the vsphere-config.yml file as described in the configuration settings. Restart the infrastructure agent. Tarball installation (advanced) You can also install the integration from a tarball file. This gives you full control over the installation and configuration process. Configure the integration An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference. To configure the vSphere integration, you must define the URL of the vSphere API endpoint, and your vSphere username and password. For configuration examples, see the sample configuration files. Some features of the vSphere integration are optional and can be enabled via configuration settings. With secrets management, you can configure on-host integrations with New Relic Infrastructure's agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management. Enable and configure performance metrics (Beta) Performance metrics provide a better understanding of the current status of VMware resources and can be collected in addition to the metrics collected by default;and included in the samples;described at the bottom of the page. All metrics collected are included in the corresponding sample with the perf. prefix attached to the name. For example, net.packetsRx.summation is collected and sent as perf.net.packetsRx.summation. To collect vSphere performance metrics, use the ENABLE_VSPHERE_PERF_METRICS environment variable. Data is collected according to the settings in the vsphere-performance.metrics configuration file. You can override the location of the performance metrics config file using PERF_METRIC_FILE environment variable. Notice that the integration follows VMware's data collection levels (1 to 4). When ENABLE_VSPHERE_PERF_METRICS is set, all level 1 metrics are collected. The data collection level of the performance metrics collected can be modified using PERF_LEVEL. Each metric in the config file can be commented out and new ones can be added if needed. Collection of performance data can increase the load in vCenter and the time needed by to collect data. We recommended to only include the metrics you need in the configuration file. To fine-tune data collection, the number of entities and metrics retrieved per request can be modified using BATCH_SIZE_PERF_ENTITIES and BATCH_SIZE_PERF_METRICS. For more information on vSphere performance metrics, see the VMware documentation. Collect vSphere events (Beta) To collect vSphere events, use the ENABLE_VSPHERE_EVENTS environment variable. The integration collects events between the current time and the last fetched event for each datacenter. It stores the information regarding the last fetched event in a cache that is updated after each execution. Events are only available if the integration is connected to a vCenter and not directly to an ESXi host. The number of events collected per request can be tuned by modifying EVENTS_PAGE_SIZE, which is set to 100 by default. Events are available in the Events page and can be queried via NRQL as InfrastructureEvent under vSphereEvent. Here is an example of vSphere events data: \"summary\": \"User dcui@127.0.0.1 logged out (login time: Tuesday, 14 July, 2020 08:32:09 AM, number of API invocations: 0, user agent: VMware-client/6.5.0)\", \"vSphereEvent.computeResource\": \"cluster1\", \"vSphereEvent.datacenter\": \"Prod Datacenter\", \"vSphereEvent.date\": \"Tue, 14 Jul 2020 09:03:51 UTC\", \"vSphereEvent.host\": \"192.168.0.230\", \"vSphereEvent.userName\": \"dcui\" Collect snapshots data (Beta) To collect snapshot data, use the ENABLE_VSPHERE_SNAPSHOTS environment variable. Snapshot data can be found in VSphereSnapshotVmSample. Collected data covers total and unique space occupied by disk and memory files, snapshot tree, and creation time. You can use this information to create NRQL queries, dashboards, and alerts, since it's linked to the corresponding virtual machine entity. Collect vSphere tags (Beta) To collect vSphere tags, use the ENABLE_VSPHERE_TAGS environment variable. Tags are available as attributes in the corresponding entity sample as label.tagCategory:tagName. If two tags of the same category are assigned to a resource, they are added to a unique attribute separated by a pipe character. For example: label.tagCategory:tagName|tagName2. Tags can be used to run NRQL queries, filter entities in the entity explorer, and to create dashboards and alerts. Filter resources by tags (Beta) Resource filtering allows you to specify which resources you want to monitor by declaring a set of tags that resources must have in order to be monitored. Resources require a match on any (one or more) of the filter tags in order to be included. If none of the resource tags match any of the filter tags, no information about that resource is sent to New Relic. To use filtering resources by tag you need to have the ENABLE_VSPHERE_TAGS environment variable enabled. A tag filter expression is a space-separated list of pairs of strings with the format category=name. For example, to only retrieve resources with a tag category region and include regions us and eu use a filter expression like: region=us region=eu INCLUDE_TAGS: > region=us region=eu To enable resource filtering by tag, edit your integration configuration file and add the option INCLUDE_TAGS with the filter expression you want. Note that datacenter resources acting as the root of the resource tree MUST have tags attached AND match the filter expression in order for other child resources to be fetched. If you connect the integration directly to the ESXi host, vCenter data is not available (for example, events, tags, or datacenter metadata). Example configuration Here are examples of the vSphere integration configuration, including performance metrics: vsphere-config.yml.sample (Linux) vsphere-config-win.yml.sample (Windows) vsphere-performance.metrics (Performance metrics) For more information, see our documentation about the general structure of on-host integration configurations. The configuration option inventory_source is not compatible with this integration. Update your integration On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent. View and use data Data from this service is reported to an integration dashboard. You can query this data for troubleshooting purposes or to create charts and dashboards. vSphere data is attached to these event types: VSphereHostSample VSphereClusterSample VSphereVmSample VSphereDatastoreSample VSphereDatacenterSample VSphereResourcePoolSample VSphereSnapshotVmSample Performance data is enabled and configured separately (see Enable and configure performance metrics). For more on how to view and use your data, see Understand integration data. Metric data The vSphere integration provides metric data attached to the following New Relic events: VSphereHost VSphereVm VSphereDatastore VSphereDatacenter VSphereResourcePool VSphereCluster VSphereSnapshotVm VSphereHost Name Description cpu.totalMHz Sum of the MHz for all the individual cores on the host cpu.coreMHz Speed of the CPU cores cpu.available Amount of free CPU MHz in the host cpu.overallUsage CPU usage across all cores on the host in MHz cpu.percent Percentage of CPU utilization in the host cpu.cores Number of physical CPU cores on the host. Physical CPU cores are the processors contained by a CPU package cpu.threads Number of physical CPU threads on the host disk.totalMiB Total capacity of disks mounted in host, in MiB mem.free Amount of available memory in the host, in MiB mem.usage Amount of used memory in the host, in MiB mem.size Total memory capacity of the host, in MiB vmCount Number of virtual machines in the host hypervisorHostname Name of the host uuid The hardware BIOS identification datacenterName Name of the datacenter related to the host clusterName Name of the cluster related to the host resourcePoolNameList List of names of the resource pools related to the host datastoreNameList List of names of datastores related to the host datacenterLocation Datacenter location networkNameList List of names of networks related to the host overallStatus gray: Status is unknown green: Entity is OK yellow: Entity might have a problem red: Entity definitely has a problem connectionState The host connection state: connected: Connected to the server. For ESX Server, this is the default setting. disconnected: The user has explicitly taken the host down. VirtualCenter does not expect to receive heartbeats from the host. The next time a heartbeat is received, the host is moved to the connected state again and an event is logged. notResponding: VirtualCenter is not receiving heartbeats from the server. The state automatically changes to connected once heartbeats are received again. This state is typically used to trigger an alarm on the host. inMaintenanceMode The flag to indicate whether or not the host is in maintenance mode. This flag is set when the host has entered the maintenance mode. It is not set during the entering phase of maintenance mode. inQuarantineMode The flag to indicate whether or not the host is in quarantine mode. InfraUpdateHa will recommend to set this flag based on the HealthUpdates received by the HealthUpdateProviders configured for the cluster. A host that is reported as degraded will be recommended to enter quarantine mode, while a host that is reported as healthy will be recommended to exit quarantine mode. Execution of these recommended actions will set this flag. Hosts in quarantine mode will be avoided by vSphere DRS as long as the increased consolidation in the cluster does not negatively affect VM performance. powerState The host power state: poweredOff: The host was specifically powered off by the user through VirtualCenter. This state is not a cetain state, because after VirtualCenter issues the command to power off the host, the host might crash, or kill all the processes but fail to power off. poweredOn: The host is powered on. A host that is entering standby mode entering is also in this state. standBy: The host was specifically put in standby mode, either explicitly by the user or automatically by DPM. This state is not a certain state, because after VirtualCenter issues the command to put the host in standby state, the host might crash, or kill all the processes but fail to power off. A host that is exiting standby mode s also in this state. unknown: If the host is disconnected or notResponding, we know its power state, so the host is marked as unknown. standbyMode The host’s standby mode. The property is only populated by vCenter server. If queried directly from the ESX host, the property is unset. entering: The host is entering standby mode. exiting: The host is exiting standby mode. in: The host is in standby mode. none: The host is not in standby mode, and it is not in the process of entering or exiting standby mode. cryptoState Encryption state of the host. Valid values are enumerated by the CryptoState type: incapable: The host is not safe for receiving sensitive material. prepared: The host is prepared for receiving sensitive material but does not have a host key set yet. safe: The host is crypto safe and has a host key set. bootTime The time when the host was booted. VSphereVm Name Description mem.size Memory size of the virtual machine, in MiB mem.usage Guest memory utilization statistics, in MiB. This is also known as active guest memory. The value can range between 0 and the configured memory size of the virtual machine. Valid while the virtual machine is running. mem.free Guest memory available, in MiB. The value can range between 0 and the configured memory size of the virtual machine. Valid while the virtual machine is running. mem.ballooned The size of the balloon driver in the virtual machine, in MiB. The host will inflate the balloon driver to reclaim physical memory from the virtual machine. This is a sign that there is memory pressure on the host. mem.swapped The portion of memory, in MiB, that is granted to this virtual machine from the host's swap space. This is a sign that there is memory pressure on the host. mem.swappedSsd The amount of memory swapped to fast disk device such as SSD, in MiB cpu.allocationLimit Resource limits for CPU, in MHz. If set to -1, there is no fixed allocation limit. cpu.overallUsage Basic CPU performance statistics, in MHz. Valid while the virtual machine is running. cpu.hostUsagePercent Percent of the host CPU used by the virtual machine. In case a limit is configured, the percentage is calculated by taking the limit as the total. cpu.cores Number of processors in the virtual machine disk.totalMiB Total storage space, committed to this virtual machine across all datastores, in MiB ipAddress Primary guest IP address, if available ipAddresses List of IPs associated with the VM (except ipAddress). A pipe or vertical bar character (|) is used as a separator. connectionState Indicates whether or not the virtual machine is available for management: connected: Server has access to the virtual machine. disconnected: Server is currently disconnected from the virtual machine, since its host is disconnected. inaccessible: One or more of the virtual machine configuration files are inaccessible. invalid: The virtual machine configuration format is invalid. orphaned: The virtual machine is no longer registered on its associated host. powerState The current power state of the virtual machine: poweredOff, poweredOn, or suspended. guestHeartbeatStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. operatingSystem Operating system of the virtual machine guestFullName Guest operating system full name, if available from guest tools hypervisorHostname Name of the host where the virtual machine is running instanceUuid Unique identification of the virtual machine datacenterName Name of the datacenter clusterName Name of the cluster resourcePoolNameList List of names of the resource pools datastoreNameList List of names of datastores networkNameList List of names of networks datacenterLocation Datacenter location overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. disk.suspendMemory Size of the snapshot file (bytes). disk.suspendMemoryUnique Size of the snapshot file, unique blocks (bytes). disk.totalUncommittedMiB Additional storage space potentially used by this virtual machine on all datastores. Essentially an aggregate of the property uncommitted across all datastores that this virtual machine is located on (Mebibytes). disk.totalUnsharedMiB Total storage space occupied by the virtual machine across all datastores, that is not shared with any other virtual machine (Mebibytes). mem.hostUsage Host memory usage (Mebibytes). resourcePoolName Resource Pool Name. vmConfigName Vm Config Name. vmHostname Vm Hostname. VSphereDatastore Name Description capacity Maximum capacity of this datastore, in GiB, if accessible is true freeSpace Available space of this datastore, in GiB, if accessible is true uncommitted Total additional storage space, potentially used by all virtual machines on this datastore, in GiB, if accessible is true vmCount Number of virtual machines attached to the datastore datacenterLocation Datacenter location datacenterName Datacenter name hostCount Number of hosts attached to the datastore overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. accessible Connectivity status of the datastore. If this is set to false, the datastore is not accessible. url Unique locator for the datastore, if accessible is true fileSystemType Type of file system volume, such as VMFS or NFS name Name of the datastore nas.remoteHost Host that runs the NFS/CIFS server nas.remotePath Remote path of NFS/CIFS mount point VSphereDatacenter Name Description datastore.totalUsedGiB Total used space in the datastores, in GiB datastore.totalFreeGiB Total free space in the datastores, in GiB datastore.totalGiB Total size of the datastores, in GiB cpu.cores Total CPU count per datacenter cpu.overallUsagePercentage Total CPU usage, in percentage cpu.overallUsage Total CPU usage, in MHz cpu.totalMHz Total CPU capacity, in MHz mem.usage Total memory usage, in MiB mem.size Total memory, in MiB mem.usagePercentage Total memory usage as percentage clusters Total cluster count per datacenter resourcePools Total resource pools per datacenter datastores Total datastores per datacenter networks Total network adapter count per datacenter overallStatus gray: Status is unknown green: Entity is OK yellow: Entity might have a problem red: Entity definitely has a problem hostCount Total host system count per datacenter vmCount Total virtual machines count per datacenter VSphereResourcePool Name Description cpu.TotalMHz Resource pool CPU total capacity, in MHz cpu.overallUsage Resource pool CPU usage, in MHz mem.size Resource pool total memory reserved, in MiB mem.usage Resource pool memory usage, in MiB mem.free Resource pool memory available, in MiB mem.ballooned Size of the balloon driver in the resource pool, in MiB mem.swapped Portion of memory, in MiB, that is granted to this resource pool from the host's swap space vmCount Number of virtual machines in the resource pool overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. resourcePoolName Name of the resource pool datacenterLocation Datacenter location datacenterName Name of the datacenter clusterName Name of the cluster VSphereCluster Name Description cpu.totalEffectiveMHz Effective CPU resources, in MHz, available to virtual machines. This is the aggregated effective resource level from all running hosts. Hosts that are in maintenance mode or are unresponsive are not counted. Resources used by the VMware Service Console are not included in the aggregate. This value represents the amount of resources available for the root resource pool for running virtual machines. cpu.totalMHz Aggregated CPU resources of all hosts, in MHz. It does not filter out cpu used by system or related to hosts under maintenance. cpu.cores Number of physical CPU cores. Physical CPU cores are the processors contained by a CPU package. cpu.threads Aggregated number of CPU threads. mem.size Aggregated memory resources of all hosts, in MiB. It does not filter out memory used by system or related to hosts under maintenance. mem.effectiveSize Effective memory resources, in MiB, available to run virtual machines. This is the aggregated effective resource level from all running hosts. Hosts that are in maintenance mode or are unresponsive are not counted. Resources used by the VMware Service Console are not included in the aggregate. This value represents the amount of resources available for the root resource pool for running virtual machines. effectiveHosts Total number of effective hosts. This number exclude hosts under maintenance. hosts Total number of hosts overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. datastoreList List of datastore used by the cluster. A pipe or vertical bar character (|) is used as a separator. hostList List of hosts belonging to the cluster. A pipe or vertical bar character (|) is used as a separator. networkList List of networks attached to the cluster. A pipe or vertical bar character (|) is used as a separator. drsConfig.vmotionRate Threshold for generated ClusterRecommendations. DRS generates only those recommendations that are above the specified vmotionRate. Ratings vary from 1 to 5. This setting applies to manual, partiallyAutomated, and fullyAutomated DRS clusters. dasConfig.restartPriorityTimeout Maximum time the lower priority VMs should wait for the higher priority VMs to be ready (Seconds). datacenterName Datacenter name. datacenterLocation Datacenter location. drsConfig.enabled Flag indicating whether or not the service is enabled. drsConfig.enableVmBehaviorOverrides Flag that dictates whether DRS Behavior overrides for individual virtual machines (ClusterDrsVmConfigInfo) are enabled. drsConfig.defaultVmBehavior Specifies the cluster-wide default DRS behavior for virtual machines. You can override the default behavior for a virtual machine by using the ClusterDrsVmConfigInfo object. dasConfig.enabled Flag to indicate whether or not vSphere HA feature is enabled. dasConfig.admissionControlEnabled Flag that determines whether strict admission control is enabled dasConfig.isolationResponse Indicates whether or not the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. dasConfig.restartPriority Restart priority for a virtual machine. dasConfig.hostMonitoring Determines whether HA restarts virtual machines after a host fails. dasConfig.vmMonitoring Level of HA Virtual Machine Health Monitoring Service. dasConfig.vmComponentProtecting This property indicates if vSphere HA VM Component Protection service is enabled. dasConfig.hbDatastoreCandidatePolicy The policy on what datastores will be used by vCenter Server to choose heartbeat datastores: allFeasibleDs, allFeasibleDsWithUserPreference, userSelectedDs VSphereSnapshotVm Name Description snapshotTreeInfo Tree info for the snapshot. Es: Cluster:Vm:Snapshot1:Snapshot2 name Snapshot name creationTime Snapshot creation time powerState The power state of the virtual machine when this snapshot was taken snapshotId The unique identifier that distinguishes this snapshot from other snapshots of the virtual machine quiesced Flag to indicate whether or not the snapshot was created with the \"quiesce\" option, ensuring a consistent state of the file system backupManifest The relative path from the snapshotDirectory pointing to the backup manifest. Available for certain quiesced snapshots only description Description of the snapshot replaySupported Flag to indicate whether this snapshot is associated with a recording session on the virtual machine that can be replayed totalMemoryInDisk Total size of memory in disk. totalUniqueMemoryInDisk Total size of the file corresponding to the file blocks that were allocated uniquely to store memory. In other words, if the underlying storage supports sharing of file blocks across disk files, the property corresponds to the size of the file blocks that were allocated only in context of this file, i.e. it does not include shared blocks that were allocated in other files. This property will be unset if the underlying implementation is unable to compute this information. totalDisk Total size of snapshot files in disk totalUniqueDisk Total size of the file corresponding to the file blocks that were allocated uniquely to store snapshot data in disk. In other words, if the underlying storage supports sharing of file blocks across disk files, the property corresponds to the size of the file blocks that were allocated only in context of this file, i.e. it does not include shared blocks that were allocated in other files. This property will be unset if the underlying implementation is unable to compute this information. datastorePathDisk Disk file path in the datastore datastorePathMemory Memory file path in the datastore For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 85.87805,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "info": "An introduction to NewRelic's open-source VMware vSphere / ESXi integration. ",
+ "body": ", no information about that resource is sent to NewRelic. To use filtering resources by tag you need to have the ENABLE_VSPHERE_TAGS environment variable enabled. A tag filter expression is a space-separated list of pairs of strings with the format category=name. For example, to only retrieve resources"
+ },
+ "id": "5f0d45e328ccbc76cbaf9d4d"
}
],
- "/explore-docs/nerdpack-file-structure": [
+ "/build-apps/set-up-dev-env": [
{
"sections": [
"New Relic One CLI reference",
@@ -6130,7 +6773,7 @@
"external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
"image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
"url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
+ "published_at": "2020-09-22T01:52:51Z",
"updated_at": "2020-09-17T01:51:10Z",
"document_type": "page",
"popularity": 1,
@@ -6138,7 +6781,7 @@
"body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 471.6394,
+ "_score": 316.4687,
"_version": null,
"_explanation": null,
"sort": null,
@@ -6147,520 +6790,175 @@
"sections": "NewRelicOneCLI reference",
"info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
"tags": "NewRelicOne app",
- "body": " CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the NewRelicOneCLI In NewRelic, click Apps and then in the NewRelicOne catalog area, click the Build"
+ "body": "NewRelicOneCLI reference To build a NewRelicOne app, you must install the NewRelicOneCLI. The CLI helps you build, publish, and manage your NewRelic app. We provide a variety of tools for building apps, including the NewRelicOneCLI (command line interface). This page explains how to use"
},
"id": "5efa989e28ccbc535a307dd0"
},
{
"sections": [
- "Create a \"Hello, World!\" application",
+ "Add tables to your New Relic One application",
"Before you begin",
- "Tip",
- "Create a local version of the \"Hello, World!\" application",
- "Publish your application to New Relic",
- "Add details to describe your project",
- "Subscribe accounts to your application",
- "Summary",
- "Related information"
+ "Clone and set up the example application",
+ "Work with table components",
+ "Next steps"
],
- "title": "Create a \"Hello, World!\" application",
+ "title": "Add tables to your New Relic One application",
"type": "developer",
"tags": [
- "nr1 cli",
- "Nerdpack file structure",
- "NR One Catalog",
- "Subscribe applications"
+ "table in app",
+ "Table component",
+ "TableHeaderc omponent",
+ "TableHeaderCell component",
+ "TableRow component",
+ "TableRowCell component"
],
- "external_id": "aa427030169067481fb69a3560798265b6b52b7c",
- "image": "https://developer.newrelic.com/static/cb65a35ad6fa52f5245359ecd24158ff/9466d/hello-world-output-local.png",
- "url": "https://developer.newrelic.com/build-apps/build-hello-world-app/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-08-21T01:45:19Z",
+ "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936",
+ "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png",
+ "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/",
+ "published_at": "2020-09-22T01:47:24Z",
+ "updated_at": "2020-09-17T01:48:42Z",
"document_type": "page",
"popularity": 1,
- "info": "Build a \"Hello, World!\" app and publish it to New Relic One",
- "body": "Create a \"Hello, World!\" application 15 min Here's how you can quickly build a \"Hello, World!\" application in New Relic One. In these steps, you create a local version of the New Relic One site where you can prototype your application. Then, when you're ready to share the application with others, you can publish it to New Relic One. See the video, which demonstrates the steps in this guide in five minutes. Before you begin To get started, make sure you have accounts in GitHub and New Relic. To develop projects, you need the New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete all the steps in the CLI quick start. For additional details about setting up your environment, see Set up your development environment. Tip Use the NR1 VS Code extension to build your apps. Create a local version of the \"Hello, World!\" application The CLI allows you to run a local version of New Relic One. You can develop your application locally before you publish it in New Relic One. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit those files to create a \"Hello, World!\" project: Step 1 of 9 Open a code editor and point it to the new directory named after your nerdpack project (for example, my-awesome-nerdpack). Your code editor displays two artifacts: launchers containing the homepage tile nerdlets containing your application code Step 2 of 9 Expand nerdlets in your code editor, and open index.js. Step 3 of 9 Change the default return message to \"Hello, World!\": import React from 'react'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class MyAwesomeNerdpackNerdletNerdlet extends React.Component { render() { return
\"Hello, World!\"
; } } Copy Step 4 of 9 As an optional step, you can add a custom launcher icon using any image file named icon.png. Replace the default icon.png file under launcher by dragging in your new image file: Step 5 of 9 To change the name of the launcher to something meaningful, in your code editor under launchers, open nr1.json. Step 6 of 9 Change the value for displayName to anything you want as the launcher label, and save the file: { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"INSERT_YOUR_TILE_LABEL_HERE\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy Step 7 of 9 To see your new changes locally, start the Node server with this command in your terminal: npm start Copy Step 8 of 9 Open a browser and go to https://one.newrelic.com/?nerdpacks=local (this url is also shown in the terminal). Step 9 of 9 When the browser opens, click Apps, and then in the Other apps section, click the new launcher for your application. Here's an example where we inserted a leaf icon: After you click the new launcher, your \"Hello, World!\" appears: Publish your application to New Relic Your colleagues can't see your local application, so when you are ready to share it, publish it to the New Relic One catalog. The catalog is where you can find any pre-existing custom applications, as well as any applications you create in your own organization. Step 1 of 4 Execute the following in your terminal: nr1 nerdpack:publish Copy Step 2 of 4 Close your local New Relic One development tab, and open New Relic One. Step 3 of 4 Click the Apps launcher. Step 4 of 4 Under New Relic One catalog, click the launcher for your new application. When your new application opens, notice that it doesn't display any helpful descriptive information. The next section shows you how to add descriptive metadata. Add details to describe your project Now that your new application is in the New Relic One catalog, you can add details that help users understand what your application does and how to use it. Step 1 of 5 Go to your project in the terminal and execute the following: nr1 create Copy Step 2 of 5 Select catalog, which creates a stub in your project under the catalog directory. Here's how the results might look in your code editor: Step 3 of 5 In the catalog directory of your project, add screenshots or various types of metadata to describe your project. For details about what you can add, see Add catalog metadata and screenshots. Step 4 of 5 After you add the screenshots and descriptions you want, execute the following to save your metadata to the catalog: nr1 catalog:submit Copy Step 5 of 5 Return to the catalog and refresh the page to see your new screenshots and metadata describing your project. Subscribe accounts to your application To make sure other users see your application in the catalog, you need to subscribe accounts to the application. Any user with the NerdPack manager or admin role can subscribe to an application from accounts that they have permission to manage. Step 1 of 3 If you're not already displaying your application's description page in the browser, click the launcher for the application in the catalog under Your company applications. Step 2 of 3 On your application's description page, click Add this app. Step 3 of 3 Select the accounts you want to subscribe to the application, and then click Update accounts to save your selections. When you return to the Apps page, you'll see the launcher for your new application. Summary Now that you've completed the steps in this example, you learned the basic steps to: Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can use it. Related information Create a local application. Publish the application to the New Relic One catalog so you can share it with your colleagues. Add details to the project in the catalog so users understand how to use it. Subscribe accounts to your application so other users can see it directly on their homepage.",
+ "info": "Add a table to your New Relic One app.",
+ "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial
component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). ApplicationSizeCompanyTeamCommit; { ({ item }) => ( {item.name}{item.value}{item.company}{item.team}{item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company}{item.team}{item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 450.83136,
+ "_score": 161.36597,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "sections": "Publish your application to NewRelic",
- "info": "Build a "Hello, World!" app and publish it to NewRelicOne",
- "tags": "Nerdpackfilestructure",
- "body": "!" application The CLI allows you to run a local version of NewRelicOne. You can develop your application locally before you publish it in NewRelicOne. If you followed all the steps in the CLI quick start, you now have files under a new directory named after your nerdpack project. Here's how you edit"
+ "title": "Add tables to your NewRelicOne application",
+ "sections": "Add tables to your NewRelicOne application",
+ "info": "Add a table to your NewRelicOne app.",
+ "body": " build your own tables into your NewRelicOne application. In this guide, you are going to build a sample table using various NewRelicOne components. Before you begin If you haven't already installed the NewRelicOneCLI, step through the quick start in NewRelicOne. This process also gets you"
},
- "id": "5efa9973196a67d16d76645c"
+ "id": "5efa989ee7b9d2ad567bab51"
},
{
+ "category_2": "Configuration",
+ "nodeid": 1766,
"sections": [
- "Map page views by region in a custom app",
- "Before you begin",
- "New Relic terminology",
- "Build a custom app with a table chart",
- "Query your browser data",
- "Create and serve a new Nerdpack",
- "Review your app files and view your app locally",
- "Hard code your account ID",
- "Import the TableChart component",
- "Add a table with a single row",
- "Customize the look of your table (optional)",
- "Get your data into that table",
- "Make your app interactive with a text field",
- "Import the TextField component",
- "Add a row for your text field",
- "Build the text field object",
- "Get your data on a map",
- "Install Leaflet",
- "Add a webpack config file for Leaflet",
- "Import modules from Leaflet",
- "Import additional modules from New Relic One",
- "Get data for the map",
- "Customize the map marker colors",
- "Set your map's default center point",
- "Add a row for your map",
- "Replace \"Hello\" with the Leaflet code"
- ],
- "title": "Map page views by region in a custom app",
- "type": "developer",
- "tags": [
- "custom app",
- "map",
- "page views",
- "region",
- "nerdpack"
- ],
- "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb",
- "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png",
- "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:48:42Z",
- "document_type": "page",
- "popularity": 1,
- "info": "Build a New Relic app showing page view data on a world map.",
- "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return
Hello, pageview-app-nerdlet Nerdlet!
; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 418.97836,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "sections": "Import additional modules from NewRelicOne",
- "info": "Build a NewRelic app showing page view data on a world map.",
- "tags": "nerdpack",
- "body": " look like a series of interactive charts or a map of the world. Nerdpack: NewRelic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpackfilestructure. Launcher: The button on NewRelicOne"
- },
- "id": "5efa993c196a67066b766469"
- },
- {
- "sections": [
- "Add tables to your New Relic One application",
- "Before you begin",
- "Clone and set up the example application",
- "Work with table components",
- "Next steps"
- ],
- "title": "Add tables to your New Relic One application",
- "type": "developer",
- "tags": [
- "table in app",
- "Table component",
- "TableHeaderc omponent",
- "TableHeaderCell component",
- "TableRow component",
- "TableRowCell component"
- ],
- "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936",
- "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png",
- "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:48:42Z",
- "document_type": "page",
- "popularity": 1,
- "info": "Add a table to your New Relic One app.",
- "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial
component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). ApplicationSizeCompanyTeamCommit; { ({ item }) => ( {item.name}{item.value}{item.company}{item.team}{item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company}{item.team}{item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 382.3602,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "Add tables to your NewRelicOne application",
- "sections": "Add tables to your NewRelicOne application",
- "info": "Add a table to your NewRelicOne app.",
- "body": " application, you need to update its unique id by invoking the NewRelicOneCLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install"
- },
- "id": "5efa989ee7b9d2ad567bab51"
- },
- {
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nr1-nerdpack/",
- "sections": [
- "New Relic One CLI Nerdpack commands",
- "Command details",
- "nr1 nerdpack:build",
- "Builds a Nerdpack",
- "Usage",
- "Options",
- "nr1 nerdpack:clone",
- "Clone an existing Nerdpack",
- "nr1 nerdpack:serve",
- "Serve your Nerdpack locally",
- "nr1 nerdpack:uuid",
- "Get your Nerdpack's UUID",
- "nr1 nerdpack:publish",
- "Publish your Nerdpack",
- "nr1 nerdpack:deploy",
- "Deploy your Nerdpack to a channel",
- "nr1 nerdpack:undeploy",
- "Undeploy your Nerdpack",
- "nr1 nerdpack:clean",
- "Removes all built artifacts",
- "nr1 nerdpack:validate",
- "Validates artifacts inside your Nerdpack",
- "nr1 nerdpack:Info",
- "Shows the state of your Nerdpack in the New Relic's registry"
- ],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic One CLI Nerdpack commands",
- "updated_at": "2020-09-17T01:49:55Z",
- "type": "developer",
- "external_id": "7c1050a6a8624664b90c15111f7c72e96b2fbe17",
- "document_type": "page",
- "popularity": 1,
- "info": "An overview of the CLI commands you can use to set up your New Relic One Nerdpacks.",
- "body": "New Relic One CLI Nerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from a git repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your development folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Command details nr1 nerdpack:build Builds a Nerdpack Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack. Usage $ nr1 nerdpack:build OPTION Options --extra-metadata-path=extra-metadata-path Specify a json file path with extra metadata. [default: extra-metadata.json] --prerelease=prerelease If specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be \"1.2.3-abc\". --profile=profile The authencation profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clone Clone an existing Nerdpack Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack: Clones the repository. Sets the repository as remote upstream. Installs all of its dependencies (using npm). Generates a new UUID using your profile, and commits it. Usage $ nr1 nerdpack:clone OPTION Options -r, --repo=REPO Repository location (either an HTTPS or SSH path). (Required) -p, --path=PATH Determines the directory to clone to (defaults to the repository name). -f, --force Replaces destination folder if it exists. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:serve Serve your Nerdpack locally Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live. To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation. Usage $ nr1 nerdpack:serve Options --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:uuid Get your Nerdpack's UUID Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option. For more details, see our GitHub workshop on GitHub. Usage $ nr1 nerdpack:uuid Options --profile=PROFILE The authentication profile you want to use. -f, --force If present, it will override the existing UUID without asking. -g, --generate Generates a new UUID if not available. --verbose Adds extra information to the output. nr1 nerdpack:publish Publish your Nerdpack Publishes your Nerdpack to New Relic. Please note: If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel. If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE. If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:publish Options -B, --skip-build Skips the previous build process. -D, --skip-deploy Skips the following deploy process. -c, --channel=DEV/BETA/STABLE Specifies the channel to deploys to. [default: STABLE] -f, --force Forces the publish, overriding any existing version in the registry. --dry-run Undergoes publishing process without actually publishing anything. --extra-metadata-path=extra-metadata-path Specifies a json file .path with extra metadata. [default: extra-metadata.json] --prerelease=STRING The value you enter will be appended to the current version of generated files. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:deploy Deploy your Nerdpack to a channel Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one. For more on publishing and deploying, see Deploy to New Relic One. Usage $ nr1 nerdpack:deploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to deploy to. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --from-version=VERSION Specifies which version to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:undeploy Undeploy your Nerdpack Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE). Usage $ nr1 nerdpack:undeploy OPTION Options -c, --channel=DEV/BETA/STABLE Specifies the channel to undeploy from. (required) -i, --nerdpack-id=NERDPACK_ID Specifies the Nerdpack to deploy. By default, the command will use the one in package.json. --profile=PROFILE The authentication profile you want to use. --verbose Adds extra information to the output. nr1 nerdpack:clean Removes all built artifacts Cleans and removes the content and the developtment folders (dist/, tmp/). Usage $ nr1 nerdpack:clean OPTION Options --profile=profile The authentication profile you want to use --verbose Adds extra information to the output. nr1 nerdpack:validate Validates artifacts inside your Nerdpack Validates artifacts inside your Nerdpack. Usage $ nr1 nerdpack:validate OPTION Options -l, --force-local The authentication profile you want to use. -r, --force-remote Force download of new schema files. --profile=profile The authentication profile you want to uset. --verbose Adds extra information to the output. nr1 nerdpack:Info Shows the state of your Nerdpack in the New Relic's registry Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used Usage $ nr1 nerdpack:info OPTION Options -a, --all Show all versions. -i, --nerdpack-id=nerdpack-id Get info from the specified Nerdpack instead of local one. --profile=profile The authentication profile you want to use. --verbose Adds extra information to the output.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 317.32666,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NewRelicOneCLINerdpack commands",
- "sections": "NewRelicOneCLINerdpack commands",
- "info": "An overview of the CLI commands you can use to set up your NewRelicOneNerdpacks.",
- "body": "NewRelicOneCLINerdpack commands To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command. Command Description nr1 nerdpack:build Assembles your Nerdpack into bundles nr1 nerdpack:clone Clones a Nerdpack from"
- },
- "id": "5f28bd6a64441f9817b11a38"
- }
- ],
- "/build-apps/add-nerdgraphquery-guide": [
- {
- "image": "",
- "url": "https://developer.newrelic.com/build-apps/",
- "sections": [
- "Build apps",
- "Guides to build apps",
- "Permissions for managing applications",
- "Create a \"Hello, World!\" application",
- "Set up your development environment",
- "Add, query, and mutate data using NerdStorage",
- "Add the NerdGraphQuery component to an application",
- "Add a time picker to your app",
- "Add a table to your app",
- "Publish and deploy apps",
- "Create a custom map view"
- ],
- "published_at": "2020-09-21T01:47:51Z",
- "title": "Build apps",
- "updated_at": "2020-09-21T01:47:51Z",
- "type": "developer",
- "external_id": "abafbb8457d02084a1ca06f3bc68f7ca823edf1d",
- "document_type": "page",
- "popularity": 1,
- "body": "Build apps You know better than anyone what information is crucial to your business, and how best to visualize it. Sometimes, this means going beyond dashboards to creating your own app. With React and GraphQL, you can create custom views tailored to your business. These guides are designed to help you start building apps, and dive into our library of components. We also have a growing number of open source apps that you can use to get started. The rest is up to you. Guides to build apps Permissions for managing applications Learn about permissions for subscribing to apps 15 min Create a \"Hello, World!\" application Build a \"Hello, World!\" app and publish it to New Relic One 20 min Set up your development environment Prepare to build apps and contribute to this site 45 min Add, query, and mutate data using NerdStorage NerdStorage is a document database accessible within New Relic One. It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuery component to an application The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application 20 min Add a time picker to your app Add a time picker to a sample application 30 min Add a table to your app Add a table to your New Relic One app 30 min Publish and deploy apps Start sharing the apps you build 30 min Create a custom map view Build an app to show page view data on a map",
- "info": "",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 772.36304,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "Build apps",
- "sections": "Add the NerdGraphQuerycomponent to an application",
- "body": ". It allows you to modify, save, and retrieve documents from one session to the next. 20 minutes Add the NerdGraphQuerycomponent to an application The NerdGraphQuerycomponent allows you to querydata from your account and add it to a dropdown menu in an application 20 min Add a time picker to your"
- },
- "id": "5efa999d64441fc0f75f7e21"
- },
- {
- "sections": [
- "Map page views by region in a custom app",
- "Before you begin",
- "New Relic terminology",
- "Build a custom app with a table chart",
- "Query your browser data",
- "Create and serve a new Nerdpack",
- "Review your app files and view your app locally",
- "Hard code your account ID",
- "Import the TableChart component",
- "Add a table with a single row",
- "Customize the look of your table (optional)",
- "Get your data into that table",
- "Make your app interactive with a text field",
- "Import the TextField component",
- "Add a row for your text field",
- "Build the text field object",
- "Get your data on a map",
- "Install Leaflet",
- "Add a webpack config file for Leaflet",
- "Import modules from Leaflet",
- "Import additional modules from New Relic One",
- "Get data for the map",
- "Customize the map marker colors",
- "Set your map's default center point",
- "Add a row for your map",
- "Replace \"Hello\" with the Leaflet code"
- ],
- "title": "Map page views by region in a custom app",
- "type": "developer",
- "tags": [
- "custom app",
- "map",
- "page views",
- "region",
- "nerdpack"
- ],
- "external_id": "6ff5d696556512bb8d8b33fb31732f22bab455cb",
- "image": "https://developer.newrelic.com/static/d87a72e8ee14c52fdfcb91895567d268/0086b/pageview.png",
- "url": "https://developer.newrelic.com/build-apps/map-pageviews-by-region/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:48:42Z",
- "document_type": "page",
- "popularity": 1,
- "info": "Build a New Relic app showing page view data on a world map.",
- "body": "Map page views by region in a custom app 30 min New Relic has powerful and flexible tools for building custom apps and populating them with data. This guide shows you how to build a custom app and populate it with page view data using New Relic's Query Language (NRQL - pronounced 'nurkle'). Then you make your data interactive. And last, if you have a little more time and want to install a third-party React library, you can display the page view data you collect on a map of the world. In this guide, you build an app to display page view data in two ways: In a table On a map Please review the Before you begin section to make sure you have everything you need and don't get stuck halfway through. Before you begin In order to get the most out of this guide, you must have: A New Relic developer account, API key, and the command-line tool. If you don't have these yet, see the steps in Setting up your development environment New Relic Browser page view data to populate the app. Without this data, you won't be able to complete this guide. To add your data to a world map in the second half of the guide: npm, which you'll use during this section of the guide to install Leaflet, a third-party JavaScript React library used to build interactive maps. If you're new to React and npm, you can go here to install Node.js and npm. New Relic terminology The following are some terms used in this guide: New Relic application: The finished product where data is rendered in New Relic One. This might look like a series of interactive charts or a map of the world. Nerdpack: New Relic's standard collection of JavaScript, JSON, CSS, and other files that control the functionality and look of your application. For more information, see Nerdpack file structure. Launcher: The button on New Relic One that launches your application. Nerdlets: New Relic React components used to build your application. The three default files are index.js, nr1.json, and styles.scss, but you can customize and add your own. Build a custom app with a table chart Step 1 of 8 Query your browser data Use Query builder to write a NRQL query to see your page view data, as follows. On New Relic One, select Query your data (in the top right corner). That puts you in NRQL mode. You'll use NRQL to test your query before dropping the data into your table. Copy and paste this query into a clear query field, and then select Run. FROM PageView SELECT count(*), average(duration) WHERE appName = 'WebPortal' FACET countryCode, regionCode SINCE 1 week ago LIMIT 1000 Copy If you have PageView data, this query shows a week of average page views broken down by country and limited to a thousand items. The table will be full width and use the \"chart\" class defined in the CSS. If you don't have any results at this point, ensure your query doesn't have any errors. If your query is correct, you might not have the Browser agent installed. Step 2 of 8 Create and serve a new Nerdpack To get started, create a new Nerdpack, and serve it up to New Relic from your local development environment: Create a new Nerdpack for this app: nr1 create --type nerdpack --name pageviews-app Copy Serve the project up to New Relic: cd pageviews-app && nr1 nerdpack:serve Copy Step 3 of 8 Review your app files and view your app locally Navigate to your pageviews-app to see how it's structured. It contains a launcher folder, where you can customize the description and icon that will be displayed on the app's launcher in New Relic One. It also contains nerdlets, which each contain three default files: index.js, nr1.json, and styles.scss. You'll edit some of these files as part of this guide. For more information, see Nerdpack file structure. Now in your browser, open https://one.newrelic.com/?nerdpacks=local, and then click Apps to see the pageview-apps Nerdpack that you served up. When you select the launcher, you see a Hello message. Step 4 of 8 Hard code your account ID For the purposes of this exercise and for your convenience, hard code your account ID. In the pageview-app-nerdlet directory, in the index.js file, add this code between the import and export lines. (Read about finding your account ID here). const accountId = [Replace with your account ID]; Copy Step 5 of 8 Import the TableChart component To show your data in a table chart, import the TableChart component from New Relic One. To do so, in index.js, add this code under import React. import { TableChart } from 'nr1'; Copy Step 6 of 8 Add a table with a single row To add a table with a single row, in the index.js file, replace this line: return
Hello, pageview-app-nerdlet Nerdlet!
; Copy with this export code: export default class PageViewApp extends React.Component { render() { return (
); } } Copy Step 7 of 8 Customize the look of your table (optional) You can use standard CSS to customize the look of your components. In the styles.scss file, add this CSS. Feel free to customize this CSS to your taste. .container { width: 100%; height: 99vh; display: flex; flex-direction: column; .row { margin: 10px; display: flex; flex-direction: row; } .chart { height: 250px; } } Copy Step 8 of 8 Get your data into that table Now that you've got a table, you can drop a TableChart populated with data from the NRQL query you wrote at the very beginning of this guide. Put this code into the row div. ; Copy Go to New Relic One and click your app to see your data in the table. (You might need to serve your app to New Relic again.) Congratulations! You made your app! Continue on to make it interactive and show your data on a map. Make your app interactive with a text field Once you confirm that data is getting to New Relic from your app, you can start customizing it and making it interactive. To do this, you add a text field to filter your data. Later, you use a third-party library called Leaflet to show that data on a world map. Step 1 of 3 Import the TextField component Like you did with the TableChart component, you need to import a TextField component from New Relic One. import { TextField } from 'nr1'; Copy Step 2 of 3 Add a row for your text field To add a text field filter above the table, put this code above the TableChart div. The text field will have a default value of \"US\".
; Copy Step 3 of 3 Build the text field object Above the render() function, add a constructor to build the text field object. constructor(props) { super(props); this.state = { countryCode: null } } Copy Then, add a constructor to your render() function. Above return, add: const { countryCode } = this.state; Copy Now add countryCode to your table chart query. ; Copy Reload your app to try out the text field. Get your data on a map To create the map, you use npm to install Leaflet. Step 1 of 9 Install Leaflet In your terminal, type: npm install --save leaflet react-leaflet Copy In your nerdlets styles.scss file, import the Leaflet CSS: @import `~leaflet/dist/leaflet.css`; Copy While you're in styles.scss, fix the width and height of your map: .containerMap { width: 100%; z-index: 0; height: 70vh; } Copy Step 2 of 9 Add a webpack config file for Leaflet Add a webpack configuration file .extended-webpackrc.js to the top-level folder in your nerdpack. This supports your use of map tiling information data from Leaflet. module.exports = { module: { rules: [ { test: /\\.(png|jpe?g|gif)$/, use: [ { loader: 'file-loader', options: {}, }, { loader: 'url-loader', options: { limit: 25000 }, }, ], }, ], }, }; Copy Step 3 of 9 Import modules from Leaflet In index.js, import modules from Leaflet. import { Map, CircleMarker, TileLayer } from 'react-leaflet'; Copy Step 4 of 9 Import additional modules from New Relic One You need several more modules from New Relic One to make the Leaflet map work well. Import them with this code: import { NerdGraphQuery, Spinner, Button, BlockText } from 'nr1'; Copy NerdGraphQuery lets you make multiple NRQL queries at once and is what will populate the map with data. Spinner adds a loading spinner. Button gives you button components. BlockText give you block text components. Step 5 of 9 Get data for the map Using latitude and longitude with country codes, you can put New Relic data on a map. mapData() { const { countryCode } = this.state; const query = `{ actor { account(id: 1606862) { mapData: nrql(query: \"SELECT count(*) as x, average(duration) as y, sum(asnLatitude)/count(*) as lat, sum(asnLongitude)/count(*) as lng FROM PageView FACET regionCode, countryCode WHERE appName = 'WebPortal' ${countryCode ? ` WHERE countryCode like '%${countryCode}%' ` : ''} LIMIT 1000 \") { results nrql } } } }`; return query; }; Copy Step 6 of 9 Customize the map marker colors Above the mapData function, add this code to customize the map marker colors. getMarkerColor(measure, apdexTarget = 1.7) { if (measure <= apdexTarget) { return '#11A600'; } else if (measure >= apdexTarget && measure <= apdexTarget * 4) { return '#FFD966'; } else { return '#BF0016'; } }; Copy Feel free to change the HTML color code values to your taste. In this example, #11A600 is green, #FFD966 is sort of yellow, and #BF0016 is red. Step 7 of 9 Set your map's default center point Set a default center point for your map using latitude and longitude. const defaultMapCenter = [10.5731, -7.5898]; Copy Step 8 of 9 Add a row for your map Between the text field row and the table chart row, insert a new row for the map content using NerdGraphQuery.
{({ loading, error, data }) => { if (loading) { return ; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }}
; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace \"Hello\" with the Leaflet code Replace return \"Hello\"; with: return ( ); Copy This code creates a world map centered on the latitude and longitude you chose using OpenStreetMap data and your marker colors. Reload your app to see the pageview data on the map!",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 533.32623,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "Map page views by region in a custom app",
- "sections": "Query your browser data",
- "info": "Build a New Relic app showing page view data on a world map.",
- "tags": "custom app",
- "body": " <Spinner fillContainer />; } if (error) { return 'Error'; } const { results } = data.actor.account.mapData; console.debug(results); return 'Hello'; }} </NerdGraphQuery> </div>; Copy Reload your application in New Relic One to test that it works. Step 9 of 9 Replace "Hello" with the Leaflet code Replace"
- },
- "id": "5efa993c196a67066b766469"
- },
- {
- "sections": [
- "Query and store data",
- "Components overview",
- "Query components",
- "Mutation components",
- "Static methods",
- "NrqlQuery"
- ],
- "title": "Query and store data",
- "type": "developer",
- "tags": [
- "nerdgraph query components",
- "mutation components",
- "static methods"
- ],
- "external_id": "cbbf363393edeefbc4c08f9754b43d38fd911026",
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/query-and-store-data/",
- "published_at": "2020-09-21T01:53:41Z",
- "updated_at": "2020-08-01T01:42:02Z",
- "document_type": "page",
- "popularity": 1,
- "info": "Reference guide for SDK query components using NerdGraph",
- "body": "Query and store data 10 min To help you build a New Relic One application, we provide you with the New Relic One SDK. Here you can learn how to use the SDK query components, which allow you to make queries and mutations via NerdGraph, our GraphQL endpoint. Query-related React components can be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query parameter, and a set of query variables passed as variables. Over this query, we have created an additional set of queries, which can be divided into four groups: User queries: These allow you to query the current user and its associated accounts. Components in this category: UserStorageQuery and AccountsQuery. Entities queries: Because New Relic One is entity-centric, we use queries to make access to your entities easier. You can count, search, list, query, and favorite them. Components in this category: EntityCountQuery, EntitySearchQuery, EntitiesByDomainTypeQuery, EntitiesByGuidsQuery, EntityByGuidQuery, EntityByNameQuery. Storage queries: New Relic One provides a simple storage mechanism that we call NerdStorage. This can be used by Nerdpack creators to store application configuration setting data, user-specific data, and other small pieces of data. Components in this category: UserStorageQuery, AccountStorageQuery, EntityStorageQuery, UserStorageMutation, AccountStorageMutation, and EntityStorageMutation. For details, see NerdStorage. NRQL queries: To be able to query your New Relic data via NRQL (New Relic Query Language), we provide a NrqlQuery component. This component can return data in different formats, so that you can use it for charting and not only for querying. Query components All query components accept a function as a children prop where the different statuses can be passed. This callback receives an object with the following properties: loading: Boolean that is set to true when data fetching is happening. Our components use the cache-and-network strategy, meaning that after the data has loaded, subsequent data reloads might be triggered first with stale data, then refreshed when the most recent data has arrived. data: Root property where the data requested is retrieved. The structure matches a root structure based on the NerdGraph schema. This is true even for highly nested data structures, which means you’ll have to traverse down to find the desired data. error: Contains an Error instance when the query fails. Set to undefined when data is loading or the fetch was successful. fetchMore: Callback function that can be called when the query is being loaded in chunks. The function will only be present when it’s feasible to do so, more data is available, and no fetchMore has already been triggered. Data is loaded in batches of 200 by default. Other components provided by the platform (like the Dropdown or the List) are capable of accepting fetchMore, meaning you can combine them easily. Mutation components Mutation components also accept a children as a function, like the query ones. The mutation can be preconfigured at the component level, and a function is passed back that you can use in your component. This is the standard React Apollo approach for performing mutations, but you might find it easier to use our static mutation method added to the component. More on this topic below. Static methods All of the described components also expose a static method so that they can be used imperatively rather than declaratively. All Query components have a static Query method, and all Mutation components have a mutation method. These static methods accept the same props as their query component, but passed as an object. For example: // Declarative way (using components). function renderAccountList() { return (
({data, error}) => { if (error) { return
Failed to retrieve list: {error.message}
; } return data.map((account) => {
{account.name}
}); }}
); } // Imperative way (using promises). async function getAccountList() { let data = {}; try { data = await AccountsQuery.query(); } catch (error) { console.log('Failed to retrieve list: ' + error.message); return; } return data.actor.accounts.map((account) => { return account.name; }); } Copy Similarly, a mutation can happen either way; either declaratively or imperatively. NrqlQuery NrqlQuery deserves additional explanation, because there are multiple formats in which you can return data from it. To provide maximum functionality, all three are exposed through a formatType property. You can find its different values under NrqlQuery.formatType: NERD_GRAPH: Returns the format in which it arrives from NerdGraph. RAW: The format exposed by default in Insights and dashboards when being plotted as JSON. This format is useful if you have a pre-existing script in this format that you're willing to migrate to or incorporate with. CHART: The format used by the charting engine that we also expose. You can find a more detailed explanation of how to manipulate this format in the guide to chart components, and some examples. If you are willing to push data, we currently do not expose NrqlMutation. To do that, see the Event API for how to add custom events.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 282.21332,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "Query and store data",
- "sections": "Componentsoverview",
- "info": "Reference guide for SDK querycomponents using NerdGraph",
- "tags": "nerdgraphquerycomponents",
- "body": " be identified by the Query suffix. Mutation-related components can be identified by the Mutation prefix. Components overview Our data components are based on React Apollo. The most basic component is NerdGraphQuery, which accepts any GraphQL (or GraphQL AST generated by the graphql-tag library as the query"
- },
- "id": "5efa989e28ccbc2f15307deb"
- },
- {
- "nodeid": 39216,
- "sections": [
- "New Relic Alerts",
- "Get started",
- "Alert policies",
- "Alert conditions",
- "Alert violations",
- "Alert Incidents",
- "Alert notifications",
- "Troubleshooting",
- "Rules, limits, and glossary",
- "Alerts and Nerdgraph",
- "REST API alerts",
- "NerdGraph API: Loss of signal and gap filling",
- "Customize your loss of signal detection",
- "View loss of signal settings for an existing condition",
- "Create a new condition with loss of signal settings",
- "Update the loss of signal settings of a condition",
- "Customize gap filling",
- "For more help"
- ],
- "title": "NerdGraph API: Loss of signal and gap filling",
- "category_0": "Alerts and Applied intelligence",
- "type": "docs",
- "category_1": "New Relic Alerts",
- "external_id": "30401b9a2c96886f6ac0a8f12682f5e0e626a659",
- "image": "",
- "url": "https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-loss-signal-gap-filling",
- "published_at": "2020-09-21T04:04:55Z",
- "updated_at": "2020-09-18T07:09:33Z",
- "breadcrumb": "Contents / Alerts and Applied intelligence / New Relic Alerts / Alerts and Nerdgraph",
- "document_type": "page",
- "popularity": 1,
- "info": "Customize how New Relic detects loss of signal and what values it should use for filling gaps in the data.",
- "body": "Limited release Loss of signal occurs when New Relic stops receiving data for a while; technically, we detect loss of signal after a significant amount of time has elapsed since data was last received in a time series. Loss of signal can be used to trigger or resolve a violation, which you can use to set up alerts. Gap filling can help you solve issues caused by lost data points. When gaps are detected between valid data points, we automatically fill those gaps with replacement values, such as the last known values or a static value. Gap filling can prevent alerts from triggering or resolving when they shouldn't. You can customize loss of signal detection and gap filling using NerdGraph. For example, you can configure how long to wait before considering the signal lost, or what value should be used for filling gaps in the time series. Here are some queries and examples you can use in our NerdGraph API explorer. In this guide we cover the following: Customize loss of signal detection Customize gap filling Customize your loss of signal detection Loss of signal detection opens or closes violations if no data is received after a certain amount of time. For example, if you set the duration of the expiration period to 60 seconds and an integration doesn't seem to send data for more than a minute, a loss of signal violation would be triggered. You can configure the duration of the signal loss and whether to open a violation or close it by using these three fields in NerdGraph: expiration.expirationDuration: How long to wait, in seconds, after the last data point is received by our platform before considering the signal as lost. This is based on the time when data arrives at our platform and not on data timestamps. The default is to leave this null, and therefore this wouldn't enable Loss of Signal Detection. expiration.openViolationOnExpiration: If true, a new violation is opened when a signal is lost. Default is false. To use this field, a duration must be specified. expiration.closeViolationsOnExpiration: If true, open violations related to the signal are closed on expiration. Default is false. To use this field, a duration must be specified. View loss of signal settings for an existing condition Existing NRQL conditions may have their loss of signal settings already configured. To view the existing condition settings, select the fields under nrqlCondition > expiration: { actor { account(id: YOUR_ACCOUNT_ID) { alerts { nrqlCondition(id: NRQL_CONDITION_ID) { ... on AlertsNrqlStaticCondition { id name nrql { query } expiration { closeViolationsOnExpiration expirationDuration openViolationOnExpiration } } } } } } } You should see a result like this: { \"data\": { \"actor\": { \"account\": { \"alerts\": { \"nrqlCondition\": { \"expiration\": { \" closeViolationsOnExpiration \": false, \" expirationDuration \": 300, \" openViolationOnExpiration \": true }, \"id\": \"YOUR_ACCOUNT_ID\", \"name\": \"Any less than - Extrapolation\", \"nrql\": { \"query\": \"SELECT average(value) FROM AlertsSmokeTestSignals WHERE wave_type IN ('min-max', 'single-gap') FACET wave_type\" } } } } } }, ... Create a new condition with loss of signal settings Let's say that you want to create a new create a NRQL static condition that triggers a loss of signal violation after no data is received for two minutes. You would set expirationDuration to 120 seconds and set openViolationOnExpiration to true, like in the example below. mutation { alertsNrqlConditionStaticCreate( accountId: YOUR_ACCOUNT_ID policyId: YOUR_POLICY_ID condition: { name: \"Low Host Count - Catastrophic\" enabled: true nrql: { query: \"SELECT uniqueCount(host) from Transaction where appName='my-app-name'\" evaluationOffset: 3 } terms: { threshold: 2 thresholdOccurrences: AT_LEAST_ONCE thresholdDuration: 600 operator: BELOW priority: CRITICAL } valueFunction: SINGLE_VALUE violationTimeLimit: TWENTY_FOUR_HOURS expiration : { expirationDuration : 120 openViolationOnExpiration : true } } ) { id name } } Update the loss of signal settings of a condition What if you want to update loss of signal parameters for an alert condition? The following mutation allows you to update a NRQL static condition with new expiration values. mutation { alertsNrqlConditionStaticUpdate( accountId: YOUR_ACCOUNT_ID id: YOUR_STATIC_CONDITION_ID condition: { expiration: { closeViolationsOnExpiration : BOOLEAN expirationDuration : DURATION_IN_SECONDS openViolationOnExpiration : BOOLEAN } } ) { id expiration { closeViolationsOnExpiration expirationDuration openViolationOnExpiration } } } Customize gap filling Gap filling replaces gap values in a time series with either the last value found or a static, arbitrary value of your choice. We fill gaps only after another data point has been received after the gaps in signal — that is, after data reception has been restored. You can configure both the type of filling and the value (if the type is set to static): signal.fillOption: Type of replacement value for lost data points. Values can be: NONE: Gap filling is disabled. LAST_VALUE: The last value seen in the time series. STATIC: An arbitrary value, defined in fillValue. signal.fillValue: Value to use for replacing lost data points when fillOption is set to STATIC. Gap filling is also affected by expiration.expirationDuration. When a gap is longer than the expiration duration, the signal is considered expired and the gap will no longer be filled. For example, here's how you would create a static NRQL condition with gap filling configured: mutation { alertsNrqlConditionStaticCreate( accountId: YOUR_ACCOUNT_ID policyId: YOUR_POLICY_ID condition: { enabled: true name: \"Example Gap Filling Condition\" nrql: { query: \"select count(*) from Transaction\" } terms: { operator: ABOVE priority: CRITICAL threshold: 1000 thresholdDuration: 300 thresholdOccurrences: ALL } valueFunction: SINGLE_VALUE violationTimeLimit: EIGHT_HOURS signal: { evaluationOffset: 3, fillOption: STATIC, fillValue: 1 } } ) { id } } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 278.1356,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NerdGraph API: Loss of signal and gap filling",
- "sections": "Alerts and Nerdgraph",
- "info": "Customize how New Relic detects loss of signal and what values it should use for filling gaps in the data.",
- "category_0": "Alerts and Applied intelligence",
- "body": " in our NerdGraph API explorer. In this guide we cover the following: Customize loss of signal detection Customize gap filling Customize your loss of signal detection Loss of signal detection opens or closes violations if no data is received after a certain amount of time. For example, if you set"
- },
- "id": "5f645d2d28ccbcd200337db9"
- },
- {
- "category_2": "Enable and configure",
- "nodeid": 38171,
- "sections": [
- "Distributed tracing",
- "Get started",
- "Enable and configure",
- "Other requirements",
- "UI and data",
- "Trace API",
+ ".NET agent",
+ "Getting started",
+ "Install",
+ "Azure installation",
+ "Other installation",
+ "Configuration",
+ "Other features",
+ "Custom instrumentation",
+ "API guides",
+ ".NET agent API",
+ "Attributes",
"Troubleshooting",
- "Integrations: Enable distributed tracing",
- "Step 1. Install the integration",
- "Step 2. (Infinite Tracing) Find or create a trace observer endpoint",
- "Step 3. (Infinite Tracing) Configure the integration",
- "Step 4. View traces",
- "For more help"
- ],
- "title": "Integrations: Enable distributed tracing",
- "category_0": "Understand dependencies",
- "type": "docs",
- "category_1": "Distributed tracing",
- "external_id": "6fd698d8077aa70b61b867bec09cac86be69214c",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/Infinite_Tracing_GraphiQL_URL_Results_0_0.png",
- "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/integrations-enable-distributed-tracing",
- "published_at": "2020-09-20T22:36:55Z",
- "updated_at": "2020-09-13T17:01:33Z",
- "breadcrumb": "Contents / Understand dependencies / Distributed tracing / Enable and configure",
- "document_type": "page",
- "popularity": 1,
- "info": "These are instructions for enabling distributed tracing for New Relic integrations with Istio, Open Census, and OpenTelemetry.",
- "body": "If you have telemetry data from Istio, Kamon, OpenCensus, and OpenTelemetry, you can view it in the New Relic UI by sending it through one of our telemetry integrations. To integrate your AWS X-Ray telemetry data, use the infrastructure integration. Since distributed systems can generate a lot of trace data, telemetry tools rely on data sampling (filtering) to find useful data. Our telemetry integrations offer you two sampling options: Use your tool’s native sampling (default): The default installation assumes you are relying on your telemetry tool to sample the data before the integration passes the data to our Trace API. Even though your tool may be sampling data, our Trace API may randomly sample out traces that exceed your rate limit. Use Infinite Tracing (limited release): This approach assumes you turn off sampling in your telemetry tool and then send all your data to a New Relic trace observer in AWS. The trace observer selects the most important and actionable traces using tail-based sampling and then sends your traces to our Trace API. To use this approach, complete the default installation but then configure a new endpoint for a trace observer. To start using Infinite Tracing, please go to our sign-up page. Here's an overview of the steps to enable distributed tracing: Install the integration (Infinite Tracing) Provision a trace observer on New Relic Edge (Infinite Tracing) Configure your open source integration View your traces in New Relic One Step 1. Install the integration If you haven't already installed one of these integrations in your services, follow the link for your integration and complete the installation. After the installation, if you are not enabling Infinite Tracing, skip to Step 4. View traces in New Relic One. Istio adapter Kamon reporter OpenCensus Go language exporter Python language exporter OpenTelemetry Go language exporter Java language exporter .NET language exporter Step 2. (Infinite Tracing) Find or create a trace observer endpoint Infinite Tracing collects your span data in a trace observer, which runs in a cluster of services in AWS called New Relic Edge. Integrations send all your spans to the trace observer so they can be assembled into traces for you to view in New Relic. If you send your data to a trace observer in one of our EU provider regions, you'll still need a US-based New Relic account because the tail-based sampling data is reported to data centers in the United States. If you have questions, contact your account representative. You can use GraphQL to see if someone has already created a trace observer endpoint for your account. If you can't find one, you need to create a new endpoint. Complete the following trace observer steps: 2a. Open NerdGraph API explorer Prepare to execute some GraphQL: Open NerdGraph API explorer. In the API key dropdown next to Tools, select your personal API key for your account under one of these options: Select an existing API Key Create a new API Key 2b. See if anyone in your organization has already created a trace observer endpoint The following steps show you how to execute a GraphQL query to find out if you can use an existing trace observer in your AWS region. If one isn't available, you can go to Step 2c. Create a new one. Copy the following query into the middle pane of the NerdGraph API explorer and replace YOUR_ACCOUNT_ID with your account ID (the number next to your account name in NerdGraph API explorer): { actor { account(id: YOUR_ACCOUNT_ID) { edge { tracing { traceObservers { errors { message type } traceObservers { endpoints { agent { host port } endpointType https { host port url } status } id name providerRegion } } } } } } } Click the triangle button to execute the query or press Ctrl+Enter. Check the right pane showing the results: In traceObservers, if you see an AWS region (providerRegion) appropriate for your location, copy its associated endpoint values. Here's an example of what to copy: (Required) https: host (save to use later as YOUR_TRACE_OBSERVER_HOST in Configure the integration) (Required)https: port (save to use later as YOUR_TRACE_OBSERVER_PORT in Configure the integration) (Optional) https: url (save to use later as YOUR_TRACE_OBSERVER_URL in Send test data to the trace observer) If you don't see any values in traceObservers as shown below, continue to Step 2c. Create a new one. 2c. If you can't find an existing trace observer endpoint, create a new one If you didn't find a trace observer after running the query in the previous section, you need to create one. To do this, you execute a GraphQL mutation that passes your configuration details. Copy the following into the middle pane of the NerdGraph API explorer. mutation { edgeCreateTraceObserver(accountId: YOUR_ACCOUNT_ID, traceObserverConfigs: {name: \"YOUR_DESCRIPTIVE_NAME\", providerRegion: YOUR_PROVIDER_REGION}) { responses { errors { message type } traceObserver { endpoints { agent { host port } endpointType https { host port url } status } id name providerRegion } } } } Insert your own values into the mutation: Value Description YOUR_ACCOUNT_ID Replace this with your account ID (the number next to your account name in NerdGraph API explorer). YOUR_DESCRIPTIVE_NAME Replace this with a name that describes the services that report to this trace observer (for example, production or query services). YOUR_PROVIDER_REGION Replace this with the provider region enum value for your location: AWS_EU_WEST_1 AWS_US_EAST_1 AWS_US_WEST_2 Click the triangle button to execute the mutation or press Ctrl+Enter. In the right pane showing the results, copy the following endpoint values to a text file so you can use them later: (Required) https: host (save to use later as YOUR_TRACE_OBSERVER_HOST in Configure the integration) (Required)https: port (save to use later as YOUR_TRACE_OBSERVER_PORT in Configure the integration) (Optional) https: url (save to use later as YOUR_TRACE_OBSERVER_URL in Send test data to the trace observer) 2d. (Optional) Send test data to the trace observer This test includes a sample payload with one trace and two spans from the same service: Test Service A. Follow these steps to send a test request: Get or generate your Insert API key so you can use it later in the test. Copy the following curl request into a text editor: curl request curl -i -H \"Content-Type: application/json\" \\ -H \"Api-Key: YOUR_INSERT_API_KEY\" \\ -H 'Data-Format: newrelic' \\ -H 'Data-Format-Version: 1' \\ -X POST \\ -d '[ { \"common\": { \"attributes\": { \"environment\": \"staging\" } }, \"spans\": [ { \"trace.id\": \"123456\", \"id\": \"ABC\", \"attributes\": { \"duration.ms\": 12.53, \"host\": \"host123.test.com\", \"name\": \"/home\", \"service.name\": \"Test Service A\" } }, { \"trace.id\": \"123456\", \"id\": \"DEF\", \"attributes\": { \"duration.ms\": 2.97, \"host\": \"host456.test.com\", \"error.message\": \"Invalid credentials\", \"name\": \"/auth\", \"parent.id\": \"ABC\", \"service.name\": \"Test Service B\" } } ] } ]' \\ 'YOUR_TRACE_OBSERVER_URL' Insert your own values into the curl request: Value Description YOUR_INSERT_API_KEY Replace this with your Insert API key (not the same as your personal API key for NerdGraph API explorer) YOUR_TRACE_OBSERVER_URL Replace this with the value under https: url from above. Copy the content of the text editor into a terminal, and then execute the request. If the test does not return HTTP/1.1 202 Accepted indicating success, check the following and try again: Confirm that you substituted the url (not host) value for YOUR_TRACE_OBSERVER_URL. Confirm that you only have single quotes around the value you inserted for YOUR_TRACE_OBSERVER_URL. Check that you are using the Insert API Key (not a license). If your test returned HTTP/1.1 202 Accepted, go to New Relic One to see a query of your test data using the span attribute service.name = Test Service A. Because the sample payload contains an error attribute, the error sampler will mark it for keeping. If you modify the payload to remove the error attributes, the random sampler may not choose to keep this particular trace. Traces may take up to one minute to be processed by both the trace observer and the Trace API. Step 3. (Infinite Tracing) Configure the integration To enable Infinite Tracing, configure your integration to send the telemetry data to the trace observer by using the results from Step 2. Find or create a trace observer endpoint. Find the section below describing these steps for your integration: Istio adapter Set the spansHost value with YOUR_TRACE_OBSERVER_URL when deploying the Helm chart. Kamon reporter Set the span-ingest-uri value with YOUR_TRACE_OBSERVER_URL in your kamon.newrelic configuration block. OpenCensus (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenCensus (Python language exporter) Pass the host and port parameters to the Trace Exporter using YOUR_TRACE_OBSERVER_HOST and YOUR_TRACE_OBSERVER_PORT. OpenTelemetry (Go language exporter) Set the SpansURLOverride field on the Config object with YOUR_TRACE_OBSERVER_URL when creating the Exporter. OpenTelemetry (Java language exporter) Complete the following: Create a java.net.URI with YOUR_TRACE_OBSERVER_URL. Pass the URI to com.newrelic.telemetry.opentelemetry.export.NewRelicSpanExporter builder’s uriOverride method. See an example where a NewRelicSpanExporter is created. OpenTelemetry (.NET language exporter) Configure the TraceUrlOverride parameter with YOUR_TRACE_OBSERVER_URL. Step 4. View traces After you configure your integration to send data to New Relic, you are ready to view traces. Here are two alternatives: View traces that include a specific service The Entity explorer helps you navigate to a specific service so you can see traces that include that service. Go to one.newrelic.com. Click Entity explorer in the top menu bar. Filter to the service you enabled for Infinite Tracing by typing the service name, and then press Enter. In the left navigation's Monitor section, click Distributed tracing. View traces across accounts This option allows you to search all traces across all New Relic accounts in your organization that you have access to. Go to one.newrelic.com. Click Apps in the top menu bar. Under Favorites click Distributed tracing. In the Find traces... search, type a search clause to find the service. For example, to query service.name or trace.id: service.name = YOUR_SERVICE_NAME trace.id = YOUR_TRACE_ID For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 261.60385,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "sections": "UI and data",
- "body": " the query in the previous section, you need to create one. To do this, you execute a GraphQL mutation that passes your configuration details. Copy the following into the middle pane of the NerdGraph API explorer. mutation { edgeCreateTraceObserver(accountId: YOUR_ACCOUNT_ID, traceObserverConfigs"
- },
- "id": "5ea0617064441ff137912311"
- }
- ],
- "/automate-workflows/5-mins-tag-resources": [
- {
- "image": "https://developer.newrelic.com/static/dev-champion-badge-0d8ad9c2e9bbfb32349ac4939de1151c.png",
- "url": "https://developer.newrelic.com/",
- "sections": [
- "Mark your calendar for Nerd Days 1.0",
- "Get coding",
- "Create custom events",
- "Add tags to apps",
- "Build a Hello, World! app",
- "Get inspired",
- "Add a table to your app",
- "Collect data - any source",
- "Automate common tasks",
- "Create a custom map view",
- "Add a time picker to your app",
- "Add custom attributes",
- "New Relic developer champions",
- "New Relic Podcasts"
+ "Azure troubleshooting",
+ ".NET agent configuration",
+ "Configuration overview",
+ "Configuration methods and precedence levels",
+ "Required environment variables",
+ "Setup options",
+ "Configuration element",
+ "Service element",
+ "Obscuring key element",
+ "Proxy element",
+ "Log element",
+ "Application element (required)",
+ "Data transmission element",
+ "Host name",
+ "Cloud platform utilization",
+ "Instrumentation options",
+ "Instrumentation element",
+ "Applications element (instrumentation)",
+ "Attributes element",
+ "Feature options",
+ "App pools",
+ "Cross application traces",
+ "Error collection",
+ "High security mode",
+ "Strip exception messages",
+ "Transaction events",
+ "Custom events",
+ "Custom parameters",
+ "Labels",
+ "Browser instrumentation",
+ "Slow queries",
+ "Transaction traces",
+ "Datastore tracer",
+ "Distributed tracing",
+ "Infinite Tracing",
+ "Span events",
+ "Settings in app.config or web.config",
+ "Settings in appsettings.json",
+ "For more help"
],
- "published_at": "2020-09-21T01:45:24Z",
- "title": "New Relic Developers",
- "updated_at": "2020-09-21T01:36:40Z",
- "type": "developer",
- "external_id": "214583cf664ff2645436a1810be3da7a5ab76fab",
+ "title": ".NET agent configuration",
+ "category_0": "APM agents",
+ "type": "docs",
+ "category_1": ".NET agent",
+ "external_id": "4fdfba60e3830d7bed15770bb5e749dbdd1feb6a",
+ "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/net-agent-config-settings-precedence_0.png",
+ "url": "https://docs.newrelic.com/docs/agents/net-agent/configuration/net-agent-configuration",
+ "published_at": "2020-09-20T17:23:14Z",
+ "updated_at": "2020-09-20T17:23:13Z",
+ "breadcrumb": "Contents / APM agents / .NET agent / Configuration",
"document_type": "page",
"popularity": 1,
- "body": "Mark your calendar for Nerd Days 1.0 Nerd Days is a FREE engineering conference that kicks off October 13 (Dates vary by region). Focused on building more perfect software, our goal is to spend less time looking at slides that tell you what software can do and more time on getting your hands on the software to solve problems efficiently. 22 Days : 14 Hours : 58 Minutes : 30 Seconds Register Get coding Create a free account 5 min Create custom events Define, visualize, and get alerts on the data you want using custom events Start the guide 7 min Add tags to apps Add tags to applications you instrument for easier filtering and organization Start the guide 12 min Build a Hello, World! app Build a Hello, World! app and publish it to your local New Relic One Catalog Start the guide Get inspired 30 min Add a table to your app Add a table to your New Relic One app 15 min Collect data - any source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add custom attributes Use custom attributes for deeper analysis Show 20 more guides Looking for more inspiration? Check out the open source projects built by the New Relic community. New Relic developer champions New Relic Champions are solving big problems using New Relic as their linchpin and are recognized as experts and leaders in the New Relic technical community. Nominate a developer champion Learn more about developer champions New Relic Podcasts We like to talk, especially to developers about developer things. Join us for conversations on open source, observability, software design and industry news. Listen",
- "info": "",
+ "info": "How to configure the New Relic .NET agent using newrelic.config, including startup and instrumentation options, and disabling unwanted features.",
+ "body": "This document contains the configuration options for the APM .NET agent. Configuration overview APM agent configuration options allow you to control some aspects of how the agent behaves. Some of these config options are part of the basic install process (like setting your license key and app name), but most are more advanced settings, such as: setting a log level, setting up proxy host access, excluding certain attributes, and enabling distributed tracing. The .NET agent gets its configuration from the newrelic.config file, which is generated as part of the install process. By default, only a global newrelic.config file is created, but you can also create app-local newrelic.config files for finer control over a multi-app system. Other ways to set config options include: using environment variables, or setting server-side configuration from the UI. For more on the various config options and what overrides what, see Config settings precedence. Support for both .NET Framework and .NET Core use the same configuration options and have the same APM features, unless otherwise stated. If you make changes to the config file and want to validate that it's in the right format, you can check it against the XSD file (for example, at C:\\ProgramData\\New Relic\\.NET Agent\\newrelic.xsd for Windows) with any XSD validator. For IIS: after you change your newrelic.config or app.config file, perform an IISRESET from an administrative command prompt. Log level adjustments do not require a reset. Configuration methods and precedence levels Upon installation, the .NET agent's configuration file (newrelic.config) applies to all monitored applications, but you can configure the agent in other ways. Here's a diagram showing how different configuration options take precedence over one another: This diagram explains the order of precedence for different ways you might configure the .NET agent. Here are details about the configuration methods shown in the diagram, and their precedence levels: .NET configuration Details and precedence web.config or app.config or appsettings.json Configuration settings set in these files take highest precedence. However, if the agent is disabled in the local or global newrelic.config, the NewRelic.AgentEnabled settings in these files will be ignored. Environment variables Second-highest precedence. For more about these, see .NET environment variables. Server-side configuration Third-highest precedence. A limited number of server-side configuration settings are available; the other settings will come from other configuration sources. App-local newrelic.config Fourth-highest precedence. You can create app-local newrelic.config files to configure individual apps on a multi-app system. These local configuration files override settings in the global newrelic.config file. The agent looks for app-local config files in the following directories, in this order: A directory specified in your web.config or app.config file with the NewRelic.ConfigFile property The web app's root directory (with the app.config or web.config) The directory containing your app's executable file Note that the app-local config file must be complete and validate against the XSD file (for example, at C:\\ProgramData\\New Relic\\.NET Agent\\newrelic.xsd for Windows). Default (global) newrelic.config Default source and the lowest precedence. Will configure all applications on a host in the absence of other config files. The global config file is located in the New Relic agent home directory: %PROGRAMDATA%\\New Relic\\.NET Agent Required environment variables New Relic's .NET agent relies on environment variables to tell the .NET Common Language Runtime (CLR) to attach New Relic to your processes. Some .NET agent install procedures (like the MSI installer) will automatically set these variables for you; some procedures will require you to manually set them. Security recommendation: You should consider what users can set system environment variables. You should also secure the accounts under which your applications execute to prevent user environment variables overriding system environment variables .NET Framework environment variables For .NET Framework, the following variables are required: COR_ENABLE_PROFILING=1 COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41} NEWRELIC_INSTALL_PATH=path\\to\\agent\\directory The .NET agent installer will add these to IIS or as system-wide environment variables. .NET Core environment variables For .NET Core, the following variables are required: Linux: CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} CORECLR_NEWRELIC_HOME=path/to/agent/directory CORECLR_PROFILER_PATH=\"${CORECLR_NEWRELIC_HOME}/libNewRelicProfiler.so\" Windows: CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} NEWRELIC_INSTALL_PATH=path\\to\\agent\\directory CORECLR_NEWRELIC_HOME=path\\to\\agent\\directory The .NET agent installer will add these to IIS or as system-wide environment variables. If your system has previously used monitoring services (non-New Relic), you may have a \"profiler conflict\" when trying to install and use the New Relic agent. More details: Profiler conflict explanation New Relic’s .NET agents rely on environment variables to tell the .NET Common Language Runtime (CLR) to load New Relic into your processes. The install-related environment variables are Microsoft variables, not New Relic variables. They can be used by other .NET profilers, and only one profiler can be attached to a process at a time. For this reason, if you have used previous application monitoring products, you may have profiler conflicts. For specific install instructions, see the .NET agent install documentation. Setup options Use these options to setup and configure your agent. The New Relic .NET agent supports the following categories of setup options: Multiple applications Configuration element Service element Obscuring key element Proxy element Log element Application element (configuration) Data transmission element Host name Configuration element The root element of the configuration document is a configuration element. The configuration element supports the following attributes: agentEnabled Type Boolean Default true Enable or disable the New Relic agent. maxStackTraceLines Type Integer Default 80 The maximum number of stack frames to trace in any stack dump. timingPrecision Type String Default low Controls the precision of the timers. High precision will provide better data, but at a lower execution speed. Possible values are high and low. Service element The first child of the configuration element is a service element. The service element configures the agent's connection to the New Relic service. The service element supports the following attributes: licenseKey (required) Type String Default (none) Your New Relic license key. New Relic uses the license key to match your app's data to the correct account in the UI. sendEnvironmentInfo Type Boolean Default true Instructs the agent to record execution environment information. Environment information includes operating system, agent version, and which assemblies are available. syncStartup Type Boolean Default false Block application startup until the agent connects to New Relic. If set to true, the first transaction may take substantially longer to complete, because it is blocked until the connection to New Relic is finished. sendDataOnExit Type Boolean Default false Block application shutdown until the agent sends all data from the latest harvest cycle. sendDataOnExitThreshold Type Integer Default 60000 Unit Milliseconds The minimum amount of time the process must run before the agent blocks it from shutting down. This setting only applies when sendDataOnExit is true. requestTimeout Type Integer Default 2000 (sendDataOnExit enabled) 120000 (sendDataOnExit disabled) Unit Milliseconds The agent's request timeout when communicating with New Relic. autoStart Type Boolean Default True Automatically start the .NET agent when the first instrumented method is hit. ssl (DEPRECATED) Type Boolean Default true The option to disable SSL is valid only for .NET agent versions 7.x and earlier. .NET agent version 8.x and higher communicate only via SSL. The agent communicates with New Relic via HTTPS by default, and New Relic requires HTTPS for all traffic to APM and the New Relic REST API. Obscuring key element The obscuringKey element is an optional child of the service element. The .NET Agent uses this value to deobfuscate supported configuration values. For example, when an obfuscated proxy password is supplied, it will be deobfuscated using this key. OBSCURING_KEY The obscuring key may also be configured by setting the NEW_RELIC_CONFIG_OBSCURING_KEY environment variable. Security Recommendation: The placement of the obscuring Key in the same configuration file as an obfuscated value may pose a security risk. Consider placing the obscuring key in an environment variable and limiting access to environment variables within your environment. Proxy element The proxy element is an optional child of the service element. The proxy element is used when the agent communicates to the New Relic back-end service via a proxy. The proxy element supports the following attributes: host Type String Default (none) Defines the proxy host. port Type Integer Default 8080 Defines the proxy port. uriPath Type String Default (none) Optionally define a proxy URI path. domain Type String Default (none) Optionally define a domain to use when authenticating with the proxy server. user Type String Default (none) Optionally define a user name for authentication. password Type String Default (none) Optionally define a password for authentication. passwordObfuscated Type String Default (none) For additional security, the .NET Agent supports the use of an obfuscated proxy password with the passwordObfuscated attribute. The obfuscated proxy password is generated using the following New Relic CLI command: newrelic agent config obfuscate --key OBSCURING_KEY --value \"CLEAR_TEXT_PROXY_PASSWORD\" When using an obfuscated proxy password, the obscuring key must also be configured. Log element The log element is a child of the configuration element. The log element configures New Relic's logging . The agent generates its own log file to keep its logging information separate from your application's logs. The log element supports the following attributes: level Type String Default info Defines the level of detail recorded in the log file. Possible values, in increasing order of detail, are: off error warn info debug finest all Increasing the log level will increase New Relic's performance impact. auditLog Type Boolean Default false Records all data sent to and received from New Relic in both an auditlog log file and the standard log file. console Type Boolean Default false Send log messages to the console, in addition to the log file. directory Type String Default C:\\ProgramData\\New Relic\\.NET Agent\\Logs The directory to hold log files generated by the agent. If this is omitted, then a directory named logs in the New Relic agent install area will be used by default. fileName Type String Default (none) Defines a name for the log file. If you do not define a fileName, the name is derived from the name of the monitored process. Application element (required) The application element is a child of the configuration element. This required element defines your application name, and disables or enables sampling. name Type String Default My Application The name of your .NET application is a child of the application element. New Relic will aggregate your data according to this name. For example, if you have two running applications named AppA and AppB, you will see two applications in the New Relic interface: AppA and AppB. You can also assign up to three names to your app. The first name is the primary name. For example: MY APPLICATION PRIMARYSECOND APP NAMETHIRD APP NAME disableSamplers Type Boolean Default false Samplers collect information about memory and CPU consumption. Set this to true to disable sampling. Data transmission element The dataTransmission element is a child of the configuration element. This element affects how data is sent to New Relic and can be used if you have specific data transmission requirements. The dataTransmission element supports the following attributes: putForDataSend Type Boolean Default false Defines the HTTP method used when sending data to New Relic. Set this to true to enable using the PUT method when sending data. The POST method is used by default. Host name If the default host name label in the APM UI is not useful, you can decorate that name in the New Relic UI with a display name. After the application process is restarted and the .NET agent is reporting again, the display name will appear in the Servers dropdown list. This host name setting does not affect the list of hosts on your application's Summary page. To set a display name, choose one of the following options. The environment variable takes precedence over the config file value. Then restart your application to see your changes in the New Relic UI. Set using config file Set the displayName attribute in the processHost element in newrelic.config. The processHost element is a child of the configuration element. Set using environment variable Set the NEW_RELIC_PROCESS_HOST_DISPLAY_NAME environment variable: NEW_RELIC_PROCESS_HOST_DISPLAY_NAME = \"CUSTOM_NAME\" Cloud platform utilization Configures the utilization configuration element to control how the agent collects utilization information and sends it to the New Relic service to determine pricing. The agent can collect information from Amazon Web Services (AWS) EC2 instances, Docker containers, Azure, Google Cloud Platform, Pivotal Cloud Foundry, and Kubernetes. detectAws Type Boolean Default true Determines whether the agent polls AWS metadata API. detectAzure Type Boolean Default true Determines whether the agent polls Azure metadata API. detectGcp Type Boolean Default true Determines whether the agent polls GCP metadata API. detectPcf Type Boolean Default true Determines whether the agent polls PCF information from environment variables. detectDocker Type Boolean Default true Determines whether the agent reads Docker information from the file system. detectKubernetes Type Boolean Default true Determines whether the agent polls Kubernetes information from environment variables. Instrumentation options Use these options to configure which elements of your application and environment to instrument. New Relic for .NET supports the following categories of instrumentation options: Instrumentation element Applications element (instrumentation) Attributes element Instrumentation element The instrumentation element is a child of the configuration element. By default, the .NET agent instruments IIS asp worker processes and Azure web and worker roles. To instrument other processes, see Instrumenting custom applications. Applications element (instrumentation) The applications element is a child of the instrumentation element. The applications element specifies which non-web apps to instrument. It contains a name attribute. This is not the same as the application (configuration) element, which is a child of the configuration element. Attributes element An attribute is a key/value pair that determines the properties of an event or transaction. Each attribute is sent to APM transaction traces, APM error traces, Transaction events, TransactionError events, or PageView events. The primary attributes element enables or disables attribute collection for the .NET agent, and defines specific attributes to collect or exclude. You can also configure attribute settings based on their destination: Error collection, transaction traces, Browser instrumentation, and transaction events. In this example, the agent excludes all attributes whose key begins with myApiKey (myApiKey.bar, myApiKey.value), but collects the custom attribute myApiKey.foo. myApiKey.*myApiKey.foo You can view the .NET APM attributes on the .NET agent attributes page. You can also define custom attributes with the agent API call AddCustomParameter. enabled Type Boolean Default true Enable or disable attribute collection. When set to false in the primary attribute element, this setting overrides all attribute settings for individual destinations. include Type String Default (none) If attributes are enabled, the agent will collect all attribute keys specified in this list. To specify multiple attribute keys, specify each individually. You can also use a * wildcard character at the end of a key to match multiple attributes (for example, myApiKey.*). For more information, see Attribute rules. exclude Type String Default (none) If attributes are enabled, the agent will not collect attribute keys specified in this list. To specify multiple attribute keys, specify each individually. You can also use a * wildcard character at the end of a key to match multiple attributes (for example, myApiKey.*). For more information, see Attribute rules. Feature options Use these options to enable, disable, and configure New Relic features. New Relic for .NET allows you to configure the following features: App pools Cross application traces Error collection High security mode Strip exception messages Transaction events Custom events Custom parameters Labels Browser instrumentation Slow Queries Transaction traces Datastore tracer Distributed tracing Span events App pools This is only applicable to a system's global config file. The applicationPools element is a child of the configuration element. The applicationPools element specifies for the profiler exactly which application pools to instrument and uses the same name as the IIS application pool name. This configuration element is useful when you may need to instrument only a small subset of your app pools. For example, a given server might have several hundred application pools, but only a few of those pools need to be instrumented by the .NET agent. Here is an example of disabling instrumentation for specific application pools: Here is an example of disabling instrumentation for all application pools currently executing on the server and enabling instrumentation for specific application pools: The applicationPools element supports the following elements: defaultBehavior Type Boolean Default false Defines how the .NET agent will behave on a \"global\" level for application pools served via IIS. The .NET agent instruments all application pools by default. When true, application pools listed under applicationPool with an instrument attribute set to false will not be instrumented. Essentially, when set to false, the application pool list acts as an allow list. When set to true, the application pool list acts as a deny list. applicationPool Defines instrumentation behavior for a specific application pool. The name attribute is the name of an application pool. Enable or disable profiling in the instrument attribute. Define this application in the name attribute. Cross application traces The crossApplicationTracer element is a child of the configuration element. crossApplicationTracer links transaction traces across applications. When linked in a service-oriented architecture, all instrumented applications that communicate with each other via HTTP will now \"link\" transaction traces with the applications that they call and the applications they are called by. Cross application tracing makes it easier to understand the performance relationship between services and applications. The crossApplicationTracer element supports the following attribute: enabled Type Boolean Default true Enable or disable cross application tracing Error collection The errorCollector element is a child of the configuration element. errorCollector configures error collection, which captures information about uncaught exceptions and sends them to New Relic. System.IO.FileNotFoundExceptionSystem.Threading.ThreadAbortExceptionIgnore messageIgnore too401404System.ArgumentNullExceptionSystem.ArgumentOutOfRangeExceptionExpected messageExpected too403,500-505myApiKey.*myApiKey.foo For an overview of error configuration in APM, see Manage errors in APM. The errorCollector element supports the following elements and attributes: enabled Type Boolean Default true Enable or disable the error collector. captureEvents Type Boolean Default true Enable or disable the capturing of error events. maxEventSamplesStored Type Integer Default 100 Reservoir limit for error events. ignoreClasses A list of fully qualified class names to be ignored. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used ignoreMessages An optional map of fully qualified class names to list of strings matching a substring of the message of an error. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used ignoreErrors (DEPRECATED) Type String Default (none) Lists specific exceptions to not report to New Relic. The full name of the exception should be used, such as System.IO.FileNotFoundException. ignoreStatusCodes Type String Default (none) Lists specific HTTP error codes to not report to New Relic. You can use standard integral HTTP error codes, such as just 401, or you may use Microsoft full status codes with decimal points, such as 401.4 or 403.18. expectedClasses A list of fully qualified class names to be marked as expected. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used expectedMessages An optional map of fully qualified class names to list of strings matching a substring of the message of an error. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used expectedStatusCodes A comma separated list of status codes. The list may include integer ranges, using a single dash (-) and will be inclusive of both the starting and ending integer in the range. attributes Use this sub-element to customize your agent attribute settings for error traces. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. High security mode The highSecurity element is a child of the configuration element. To enable high security mode, set this property to true and enable high security property in the New Relic user interface. Enabling high security means SSL is turned on, request parameters and custom parameters are not collected, strip exception messages is enabled, and queries cannot be sent to New Relic in their raw form. enabled Type Boolean Default false Enable or disable high security mode. Example: Strip exception messages The stripExceptionMessages element is a child of the configuration element. To enable strip exception messages, set this property to true. By default, this is set to false, which means that the agent sends messages from all exceptions to the New Relic collector. If you enable high security mode, this is automatically changed to true, and the agent strips the messages from exceptions. enabled Type Boolean Default false Enable or disable strip exception messages. Example: Transaction events The transactionEvents element is a child of the configuration element. Use transactionEvents to configure transaction events. myApiKey.*myApiKey.foo The transactionEvents element supports the following attributes: enabled Type Boolean Default true Enable or disable the event recorder. maximumSamplesStored Type Integer Default 10000 The maximum number of samples to store in memory at once. attributes Use this sub-element to customize your agent attribute settings for transaction events. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. These attribute settings are specific to transaction events. Attribute settings may be applied globally to all event types to with this configuration setting. When distributed tracing and/or Infinite Tracing are enabled, information from transaction events is applied to the root Span Event of the transaction. Consider applying any attribute settings for transaction events to span events and/or apply them as Global Attribute settings. Custom events The customEvents element is a child of the configuration element. Use customEvents to configure custom events. The CustomEvents element supports the following attributes: enabled Type Boolean Default true Enable or disable the event recorder. maximumSamplesStored Type Integer Default 10000 The maximum number of samples to store in memory at once. Custom parameters The customParameters element is a child of the configuration element. Use customParameters to configure custom parameters. The CustomParameters element supports the following attributes: enabled Type Boolean Default true Enable or disable the capture of custom parameters. Labels The labels element is a child of the configuration element. This sets the label names and values to associate with the application. The list is a semicolon delimited list of colon-separated name and value pairs. You can also use with the NEW_RELIC_LABELS environment variable. Example: foo:bar;zip:zap Browser instrumentation The browserMonitoring element is a child of the configuration element. browserMonitoring configures Browser monitoring in your .NET application. Browser gives you insight your end users' performance experience. This is accomplished by measuring the time it takes for your users' browsers to download and render your webpages by injecting a small amount of JavaScript code into the header and footer of each page. // If you use both the Exclude and Attribute elements // the Exclude element must be listed first. ... myApiKey.*myApiKey.foo The browserMonitoring element supports the following attributes: autoInstrument Type Boolean Default true By default the agent automatically injects the Browser agent JavaScript. To turn off automatic injection, set this attribute to false. attributes Use this sub-element to customize your agent attribute settings for Browser. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. requestPathsExcluded Use this sub-element to prevent the Browser agent from being injected in specific pages. The element is used as follows: ... The agent will not inject the Browser agent into pages whose URL matches one of the specified regular expressions. The regular expression should follow Microsoft guidelines for the Regex class. It is a reference to the virtual directory of the path in your application and not the full URL of the path you wish to exclude. For example, to exclude the pages in https://www.mywebsite.com/mywebpages/ you would simply insert /mywebpages/ as the path regex value. The requestPathsExcluded element should be used in cases where it is impossible or undesirable to use the DisableBrowserMonitoring() call. To minimize a possible performance impact try to use as few regular expressions as possible and keep them as simple as possible. Slow queries The slowSql element is a child of the configuration element. slowSql configures capturing information about slow query executions, and captures and obfuscates explain plans for these queries. The slowSql element supports the following attribute: enabled Type Boolean Default true Enable or disable slow query tracing. Transaction traces The transactionTracer element is a child of the configuration element. transactionTracer configures transaction traces. Included in the trace is the exact call sequence of the transactions, including any query statements issued. myApiKey.*myApiKey.foo The transactionTracer element supports the following attributes: enabled Type Boolean Default true Enable or disable transaction traces. transactionThreshold Type String Default apdex_f Defines the threshold for transaction traces. If a transaction takes longer than the threshold, it is eligible for being traced. See transaction trace basics for more about the rules governing traces. The default value is apdex_f, which sets the threshold to four times the application's apdex_t value. For more information about apdex_t, see Apdex. You can also set the threshold to be a specific time value in milliseconds. recordSql Type String Default obfuscated Select a query tracing policy. Options are off, which records nothing; obfuscated, which records an obfuscated version of the query; or raw, which records the query exactly as it is issued to the database. Recording raw queries may capture sensitive information. explainEnabled Type Boolean Default false When true, the agent captures EXPLAIN statements for slow queries. explainThreshold Type Integer Default 500 Unit Milliseconds The agent collects slow query data for queries that exceed this threshold, along with any available explain plans, as part of transaction traces. maxSegments Type Integer Default 3000 The maximum number of segments to collect in a transaction trace. maxExplainPlans Type Integer Default 20 The maximum number of explain plans to collect during a harvest cycle. attributes Use this sub-element to customize your agent attribute settings for transaction traces. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. Datastore tracer The datastoreTracer element is a child of the configuration element. The datastoreTracer element supports the following sub-elements: instanceReporting Use this sub-element to enable collection of datastore instance metrics (such as the host and port) for some database drivers. These are reported on slow query traces and transaction traces. The default value of attribute enabled is true. databaseNameReporting Use this sub-element to enable collection of the database name on slow query traces and transaction traces for some database drivers. The default value of attribute enabled is true. queryParameters Use this sub-element to enable collection of the SQL query parameters on slow query traces. The default value of attribute enabled is false. Recording query parameters may capture sensitive information. The transactionTracer.recordSql configuration option must be set to raw or this option is ignored. Distributed tracing The distributedTracing element is a child of the configuration element. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. Enabling distributed tracing disables cross application tracing, and has other effects on APM features. Before enabling, read the planning guide. Requires .NET agent version 8.6.45.0 or higher. The distributedTracing element supports the following attributes: enabled Type Boolean Default false To enable or disable, see Enable distributed tracing. excludeNewrelicHeader Type Boolean Default false By default, supported versions of the agent utilize both the newrelic header and W3C Trace Context headers for distributed tracing. The newrelic distributed tracing header allows interoperability with older agents that don't support W3C Trace Context headers. Agent versions that support W3C Trace Context headers will prioritize them over newrelic headers for distributed tracing. If you do not want to utilize the newrelic header, setting this to true will result in the agent excluding the newrelic header and only using W3C Trace Context headers for distributed tracing. Enable distributed tracing via environment variable Set the NEW_RELIC_DISTRIBUTED_TRACING_ENABLED environment variable in the application's environment. NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Distributed tracing reports span events. Span event reporting is enabled by default, but distributed tracing must be enabled for spans to be reported. To disable span events, choose one of the following options: Disable span events via config file Set the element to false to disable via the newrelic.config file. This element is a child of the element. Disable span events via environment variable Set the NEW_RELIC_SPAN_EVENTS_ENABLED environment variable in the application's environment. NEW_RELIC_SPAN_EVENTS_ENABLED=false Infinite Tracing Infinite Tracing extends the distributed tracing service by employing a trace observer that is external to the agent. It observes 100% of your application traces across various services and provides actionable data so you can solve issues faster. Infinite Tracing requires .NET Agent version 8.30 or higher. To turn on Infinite Tracing, enable distributed tracing and add the additional settings below The infiniteTracing element supports the following elements: trace_observer The trace_observer element identifies an observer host that is independent from the agent. For help getting a valid Infinite Tracing trace observer host entry, see Find or create a trace observer endpoint. The trace observer may be configured using the NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST environment variable as well. When configuring the trace observer, you should not supply the protocol as part of the host. For example, use myhost.infinitetracing.com instead of https://myhost.infinitetracing.com. Span events The spanEvents element is a child of the configuration element. Use spanEvents to configure span events. myApiKey.*myApiKey.foo The spanEvents element supports the following attributes: enabled Type Boolean Default true Enable or disable the event recorder. attributes Use this sub-element to customize your agent attribute settings for span events. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. These attribute settings are specific to span events. Attribute settings may be applied globally to all event types to with this configuration setting. Settings in app.config or web.config For ASP.NET and .NET Framework console apps you can also configure the following settings in your app's app.config or web.config, within the outermost element, : Enable and disable the agent If the agent is disabled in the local or global newrelic.config, the NewRelic.AgentEnabled settings in these files will be ignored. Application name For more information, see Name your .NET application. License key Change newrelic.config location Designates an alternative location for the config file outside of the local root of the app or global config location. The location entered must be an absolute path. Settings in appsettings.json For .NET Core apps, you can configure the following settings in appsettings.json if the following is true: The appsettings.json file must be located in the current working directory of the application. The application must have the following dependencies: Microsoft.Extensions.Configuration Microsoft.Extensions.Configuration.Json Microsoft.Extensions.Configuration.EnvironmentVariables Enable and disable the agent { \"NewRelic.AgentEnabled\":\"false\" } If the agent is disabled in the local or global newrelic.config, the NewRelic.AgentEnabled setting in this file will be ignored. Application name For more information, see Name your .NET application. { \"NewRelic.AppName\": \"Descriptive Name\" } License key { \"NewRelic.LicenseKey\": \"XXXXXXXX\" } Change newrelic.config location Designates an alternative location for the config file outside of the local root of the app or global config location. The location entered must be an absolute path. { \"NewRelic.ConfigFile\": \"C:\\\\Path-to-alternate-config-dir\\\\newrelic.config\" } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 181.54572,
+ "_score": 124.9523,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "title": "NewRelic Developers",
- "sections": "NewRelic developer champions",
- "body": " source APIs, agents, OS emitters - get any data 20 min Automate common tasks Use the NewRelicCLI to tag apps and create deployment markers 30 min Create a custom map view Build an app to show page view data on a map 20 min Add a time picker to your app Add a time picker to a sample application Add"
+ "sections": "API guides",
+ "info": "How to configure the NewRelic .NET agent using newrelic.config, including startup and instrumentation options, and disabling unwanted features.",
+ "body": " to disable SSL is valid only for .NET agent versions 7.x and earlier. .NET agent version 8.x and higher communicate only via SSL. The agent communicates with NewRelic via HTTPS by default, and NewRelic requires HTTPS for all traffic to APM and the NewRelic REST API. Obscuring key element"
},
- "id": "5d6fe49a64441f8d6100a50f"
+ "id": "5404cb460755234d1b00000d"
},
{
- "image": "",
- "url": "https://developer.newrelic.com/automate-workflows/",
"sections": [
- "Automate workflows",
- "Guides to automate workflows",
- "Quickly tag resources",
- "Set up New Relic using Helm charts",
- "Automatically tag a simple \"Hello World\" Demo across the entire stack",
- "Automate common tasks",
- "Set up New Relic using the Kubernetes operator",
- "Set up New Relic using Terraform"
+ "Add the NerdGraphQuery component to an application",
+ "Note",
+ "Before you begin",
+ "Prepare the sample code",
+ "Add the NerdGraphQuery component",
+ "How to use NerdGraphQuery.query",
+ "Review the results of the NerdGraph query",
+ "Summary"
],
- "published_at": "2020-09-21T01:47:52Z",
- "title": "Automate workflows",
- "updated_at": "2020-09-21T01:47:51Z",
+ "title": "Add the NerdGraphQuery component to an application",
"type": "developer",
- "external_id": "d4f408f077ed950dc359ad44829e9cfbd2ca4871",
+ "tags": [
+ "nerdgraphquery component",
+ "transaction overview app",
+ "query account data",
+ "drop-down menu",
+ "NerdGraphQuery.query method"
+ ],
+ "external_id": "6bd6c8a72eab352a3e8f4332570e286c7831ba84",
+ "image": "https://developer.newrelic.com/static/5dcf6e45874c1fa40bb6f21151af0c24/b01d9/no-name.png",
+ "url": "https://developer.newrelic.com/build-apps/add-nerdgraphquery-guide/",
+ "published_at": "2020-09-22T01:50:00Z",
+ "updated_at": "2020-09-17T01:51:10Z",
"document_type": "page",
"popularity": 1,
- "body": "Automate workflows When building today's complex systems, you want an easy, predictable way to verify that your configuration is defined as expected. This concept, Observability as Code, is brought to life through a collection of New Relic-supported orchestration tools, including Terraform, AWS CloudFormation, and a command-line interface. These tools enable you to integrate New Relic into your existing workflows, easing adoption, accelerating deployment, and returning focus to your main job — getting stuff done. In addition to our Terraform and CLI guides below, find more automation solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up New Relic using Helm charts Learn how to set up New Relic using Helm charts 30 min Automatically tag a simple \"Hello World\" Demo across the entire stack See how easy it is to leverage automation in your DevOps environment! 20 min Automate common tasks Use the New Relic CLI to tag apps and create deployment markers 20 min Set up New Relic using the Kubernetes operator Learn how to provision New Relic resources using the Kubernetes operator 20 min Set up New Relic using Terraform Learn how to provision New Relic resources using Terraform",
- "info": "",
+ "info": "The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application",
+ "body": "Add the NerdGraphQuery component to an application 20 minutes This guide steps you through the process of adding the `NerdGraphQuery` component to a sample transaction overview application. This allows you to query data from your New Relic account and add it to a dropdown menu. NerdGraph is our GraphQL implementation. GraphQL has some key differences when compared to REST: The client, not the server, determines what data is returned. You can easily collect data from multiple sources. For example, in a single query, you can get account information, infrastructure data, and issue a NRQL request. Note Before completing this exercise, you can experiment with GraphQL queries in our NerdGraph API explorer. We also have a 14-minute video that covers the steps below. Before you begin To develop projects, you need our New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete steps 1–4 of our CLI quick start, and be sure to make a copy of your account ID from step 1 because you’ll need it later. Note If you've already installed the New Relic One CLI, but you can't remember your account ID, start the CLI quick start again, and then click the Get your API key down arrow. The account ID is the number preceding your account name. For additional details, see Set up your development environment. Prepare the sample code To get started, complete these steps to update the application UUID (unique ID) and run the sample application locally: Step 1 of 8 If you haven't already done so, clone the example applications from our how-to GitHub repo. Here's an example using HTTPS: git clone https://github.com/newrelic/nr1-how-to.git Copy Step 2 of 8 Change to the directory use-nerdgraph-nerdlet: cd nr1-how-to/use-nerdgraph/nerdlets/use-nerdgraph-nerdlet Copy Step 3 of 8 In your preferred text editor, open index.js. Step 4 of 8 Replace with your account id: Note Your account ID is available in the CLI quick start (see Before you begin). this.accountId = ; Copy Step 5 of 8 Change to the /nr1-howto/use-nerdgraph directory: cd ../.. Copy Step 6 of 8 If this is your first time executing this code run the below command to install all the required modules: npm install Copy Step 7 of 8 Execute these commands to update the UUID and serve the sample application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 8 of 8 Once the sample application is successfully served, go to the local New Relic One homepage (https://one.newrelic.com/?nerdpacks=local), click Apps, and then click Use NerdGraph. After launching the Use NerdGraph application, you see a dashboard that gives an overview of the transactions in your account: Add the NerdGraphQuery component Now you can create a dropdown menu for changing the account the application is viewing. The first step is to import the NerdGraphQuery component into the application's index.js file. Note If you need more details about our example below, see the APIs and components page on https://developer.newrelic.com Step 1 of 3 Add the NerdGraphQuery component into the first StackItem inside of the return in the index.js file: {({ loading, error, data }) => { console.log({ loading, error, data }); if (loading) { return ; } if (error) { return 'Error!'; } return null; }} ; Copy Step 2 of 3 The NerdGraphQuery component takes a query object that states the source you want to access and the data you want returned. Add the following code to your index.js file in the render method: Note In the browser console, you can see the data from your query returned in an object that follows the same structure of the object in the initial query. const query = ` query($id: Int!) { actor { account(id: $id) { name } } } `; Copy Step 3 of 3 To take the data returned by the NerdGraph query and display it in the application, replace the return null in the current NerdGraphQuery component with this return statement: return {data.actor.account.name} Apps:; Copy When you go back to the browser and view your application, you see a new headline showing the name of your account returned from NerdGraph: How to use NerdGraphQuery.query At this point, you have implemented the NerdGraphQuery component with the application's render method and displayed the return data within the transaction overview application. Here's what you need to do next: Query NerdGraph inside of the componentDidMount lifecycle method. Save the returned data for later use in the application. Step 1 of 2 This code takes the response from NerdGraph and makes sure the results are processed, stored into the application state, and logged to the browser console for viewing. Add this code into the index.js file just under the constructor: componentDidMount() { const accountId = this.state; const gql = `{ actor { accounts { id name } } }`; const accounts = NerdGraphQuery.query({query: gql}) //The NerdGraphQuery.query method called with the query object to get your account data is stored in the accounts variable. accounts.then(results => { console.log('Nerdgraph Response:', results); const accounts = results.data.actor.accounts.map(account => { return account; }); const account = accounts.length > 0 && accounts[0]; this.setState({ selectedAccount: account, accounts }); }).catch((error) => { console.log('Nerdgraph Error:', error); }) } Copy Step 2 of 2 After the data is stored into state, display a selection so users can change accounts and update the application. To do this, add this code to index.js for the second StackItem in the return statement: { accounts && ( ); } Copy Review the results of the NerdGraph query After you complete these steps, look at the application in your browser, and note the following: The dropdown menu now displays the data returned from the NerdGraphQuery.query and allows you to select an account. After you select a new account, the application shows data from the new selection. The final index.js file should have code similar to the code below. This completed sample is in your nerdlet final.js. import React from 'react'; import { PlatformStateContext, NerdGraphQuery, Spinner, HeadingText, Grid, GridItem, Stack, StackItem, Select, SelectItem, AreaChart, TableChart, PieChart } from 'nr1' import { timeRangeToNrql } from '@newrelic/nr1-community'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class UseNerdgraphNerdletNerdlet extends React.Component { constructor(props){ super(props) this.state = { accountId: , accounts: null, selectedAccount: null, } } componentDidMount() { const accountId = this.state; const gql = `{ actor { accounts { id name } } }`; const accounts = NerdGraphQuery.query({ query: gql }) accounts.then(results => { console.log('Nerdgraph Response:', results); const accounts = results.data.actor.accounts.map(account => { return account; }); const account = accounts.length > 0 && accounts[0]; this.setState({ selectedAccount: account, accounts }); }).catch((error) => { console.log('Nerdgraph Error:', error); }) } selectAccount(option) { this.setState({ accountId: option.id, selectedAccount: option }); } render() { const { accountId, accounts, selectedAccount } = this.state; console.log({ accountId, accounts, selectedAccount }); const query = ` query($id: Int!) { actor { account(id: $id) { name } } } `; const variables = { id: accountId, }; const avgResTime = `SELECT average(duration) FROM Transaction FACET appName TIMESERIES AUTO `; const trxOverview = `FROM Transaction SELECT count(*) as 'Transactions', apdex(duration) as 'apdex', percentile(duration, 99, 95) FACET appName `; const errCount = `FROM TransactionError SELECT count(*) as 'Transaction Errors' FACET error.message `; const responseCodes = `SELECT count(*) as 'Response Code' FROM Transaction FACET httpResponseCode `; return ( {({loading, error, data}) => { if (loading) { return ; } if (error) { return 'Error!'; } return {data.actor.account.name} Apps:; }} {accounts && } {(PlatformState) => { /* Taking a peek at the PlatformState */ const since = timeRangeToNrql(PlatformState); return ( <> Transaction Overview Average Response Time Response Code Transaction Errors > ); }} ) } } Copy Summary Now that you've completed all the steps in this example, you've successfully queried data from your account using the NerdGraphQuery component in two methods: Using the NerdGraphQuery component inside the application's render method and then passing the returned data into the children's components. Using the NerdGraphQuery.query method to query data before the application renders.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 161.03044,
+ "_score": 124.57145,
"_version": null,
"_explanation": null,
"sort": null,
"highlight": {
- "sections": "Set up NewRelic using Helm charts",
- "body": " solutions in our Developer Toolkit. Guides to automate workflows 5 min Quickly tag resources Add tags to apps for easy filtering 20 min Set up NewRelic using Helm charts Learn how to set up NewRelic using Helm charts 30 min Automatically tag a simple "Hello World" Demo across the entire stack See how easy"
+ "info": "The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application",
+ "tags": "query account data",
+ "body": ". Note Before completing this exercise, you can experiment with GraphQL queries in our NerdGraph API explorer. We also have a 14-minute video that covers the steps below. Before you begin To develop projects, you need our NewRelicOneCLI (command line interface). If you haven't already installed"
},
- "id": "5efa999c196a67dfb4766445"
+ "id": "5efa993c64441ff4865f7e32"
},
{
"sections": [
@@ -6688,7 +6986,7 @@
"external_id": "531f2f3985bf64bb0dc92a642445887095048882",
"image": "",
"url": "https://developer.newrelic.com/automate-workflows/get-started-new-relic-cli/",
- "published_at": "2020-09-21T01:51:14Z",
+ "published_at": "2020-09-22T01:47:24Z",
"updated_at": "2020-08-08T01:41:47Z",
"document_type": "page",
"popularity": 1,
@@ -6696,7 +6994,7 @@
"body": "Get started with the New Relic CLI 20 min Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your New Relic personal API Key, which you can create from the Account settings of your New Relic account An instrumented application in your New Relic account Step 1 of 10 Install the New Relic CLI The New Relic CLI can be downloaded via Homebrew (macOS), Scoop (Windows), and Snapcraft (Linux). You can also download pre-built binaries for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. Linux With Snapcraft installed, run: sudo snap install newrelic-cli macOS With Homebrew installed, run: brew install newrelic-cli Windows With Scoop installed, run: scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git scoop install newrelic-cli Step 2 of 10 Create your New Relic CLI profile Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts. To create your first CLI profile, run the profiles add command. Note that you need to set the region of your New Relic account: use -r to set either us or eu (this is required). # Create the tutorial account for the US region newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_API_KEY -r YOUR_REGION # Set the profile as defaults newrelic profiles default -n tutorial Copy Step 3 of 10 Get your application details In this example, you are going to add tags to the application you've instrumented with New Relic. Tags are key-value pairs that can help you organize and filter your entities. An entity (for example, an application) can have a maximum of 100 key-value pairs tied to it. Before searching for your application using the New Relic CLI, write down or copy your Account ID and the name of your application in New Relic - you need both to find applications in the New Relic platform. Step 4 of 10 The New Relic CLI can retrieve your application details as a JSON object. To search for your APM application use the apm application search command. If you get an error, check that the account ID and application name you provided are correct. newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP Copy Step 5 of 10 If the account ID is valid, and the application name exists in your account, apm application search yields data similar to this example. When you've successfully searched for your application, look for the guid value. It's a unique identifier for your application. You should copy it or write it down. [ { accountId: YOUR_ACCOUNT_ID, applicationId: YOUR_APP_ID, domain: 'APM', entityType: 'APM_APPLICATION_ENTITY', guid: 'A_LONG_GUID', name: 'NAME_OF_YOUR_APP', permalink: 'https://one.newrelic.com/redirect/entity/A_LONG_GUID', reporting: true, type: 'APPLICATION', }, ]; Copy Step 6 of 10 Add a simple tag to your application Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead and add the dev:testing tag (or any other key-value pair) to your application using the entities tags create command. newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing Copy Step 7 of 10 What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example: tag1:value1,tag2:value2 To add multiple tags at once to your application, modify and run the following snippet. newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test Copy Adding tags is an asynchronous operation: this means it could take a while for the tags to get created. Step 8 of 10 You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags. To retrieve your application's tags, use the entity tags get command. newrelic entity tags get --guid YOUR_APP_GUID All tags associated with your application are retrieved as a JSON array. [ { Key: 'tag1', Values: ['true'], }, { Key: 'tag2', Values: ['test'], }, { Key: 'tag3', Values: ['testing'], }, // ... ]; Copy Step 9 of 10 Bonus step: Create a deployment marker Deployments of applications often go wrong. Deployment markers are labels that, when attached to your application data, help you track deployments and troubleshoot what happened. To create a deployment marker, run the apm deployment create command using the same Application ID from your earlier search. newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always) Copy Step 10 of 10 Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments. Here is an example. { \"id\": 37075986, \"links\": { \"application\": 204261368 }, \"revision\": \"v1.2.4\", \"timestamp\": \"2020-03-04T15:11:44-08:00\", \"user\": \"Developer Toolkit Test Account\" } Copy Next steps Have a look at all the available commands. For example, you could create a New Relic workflow using workload create If you'd like to engage with other community members, visit our New Relic Explorers Hub page. We welcome feature requests or bug reports on GitHub.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 106.30681,
+ "_score": 122.638214,
"_version": null,
"_explanation": null,
"sort": null,
@@ -6705,105 +7003,9 @@
"sections": "Get started with the NewRelicCLI",
"info": "Learn the essentials of the NewRelicCLI, from install and configuration to basic usage.",
"tags": "NewRelicCLI",
- "body": " Now that you have the GUID, you can point the NewRelicCLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using entity tags delete). Let's suppose that you want to add an environment tag to your application. Go ahead"
+ "body": ". This guide walks you through the essentials of NewRelicCLI, from install and configuration to basic usage. Before you begin For this guide you just need: Your NewRelic personal APIKey, which you can create from the Account settings of your NewRelicaccount An instrumented application in your"
},
"id": "5efa999c196a67c4e1766461"
- },
- {
- "image": "https://developer.newrelic.com/static/2d91ba8d23ca23b012f2ffb437acc09e/0086b/helloworld-automationdemo.png",
- "url": "https://developer.newrelic.com/automate-workflows/automated-tagging/",
- "sections": [
- "Automate tagging of your entire stack",
- "Before you begin",
- "Collaborate with us",
- "Build the deployer",
- "Configure your credentials",
- "Run the application",
- "Tip",
- "Locating the user configuration files",
- "Understanding the deployment configuration file",
- "Note",
- "Generate some traffic",
- "Check your tags",
- "Tear down your resources",
- "Next steps"
- ],
- "published_at": "2020-09-21T01:52:19Z",
- "title": "Automate tagging of your entire stack",
- "updated_at": "2020-09-19T01:54:15Z",
- "type": "developer",
- "external_id": "0c5d228b6bcee4b456b6ee36920e20da0df962d3",
- "document_type": "page",
- "popularity": 1,
- "info": "A quick demo application that automates the provisioning, deployment, instrumentation, and tagging of a simple app.",
- "body": "Automate tagging of your entire stack 30 min Organizing your services, hosts, and applications in New Relic can be challenging, especially as resources come and go. One strategy to overcome this challenge is to apply tags, consistently, across your stack. In this guide, you: Provision a host on AWS Deploy a small Node.js app on that host Instrument the host and the application with New Relic agents Apply consistent tags across all your entities Tear down everything you make when you're done The next section introduces you to tools for performing tasks in this guide. Before you begin Throughout this guide, you use three open source projects to automatically set up, instrument, and tear down your infrastructure: Demo Deployer: The engine that drives the automation Demo Nodetron: A Node.js app that you run on your host. It presents a web page and an API, which you use to generate traffic. Demo New Relic Instrumentation: A project that instruments your host and application Each project is distinct, and encapsulates its own behavior. This maintains a separation of concerns and allows you to compose complex scenarios using a modular approach. Collaborate with us The Demo Deployer is currently in development. Because of our commitment to open source, we are working in the open early in the process and invite you to collaborate with us. Drop any thoughts and comments in the Build on New Relic support thread, and let us know what you think! The last thing you need before you get started is to install Docker if you don't have it already. Now that you have a high-level understanding of the tools you'll use, you can begin by building the Demo Deployer! Step 1 of 6 Build the deployer To use the deployer, first clone its repository from GitHub. Then, build a Docker image using the local copy of the code. First, clone the repository from GitHub: git clone https://github.com/newrelic/demo-deployer.git Copy Second, build the deployer Docker image: docker build -t deployer demo-deployer Copy Now, you have a Docker image, named deployer, which you use throughout the rest of this guide. Step 2 of 6 Configure your credentials In this guide, you provision a host on AWS. The deployer uses a configuration file that contains your credentials for each service it communicates with so that it can invoke the necessary APIs. You can follow the User Config documentation in the deployer repository to set up each account and create your configuration file. In the end, you'll have a JSON file that contains credentials for AWS, New Relic, and GitHub: { \"credentials\": { \"aws\": { \"apiKey\": \"my_aws_api_key\", \"secretKey\": \"my_aws_secret_key\", \"secretKeyPath\": \"/path/to/my/secretkey.pem\", \"region\": \"my_aws_region\" }, \"newrelic\": { \"licenseKey\": \"my_new_relic_license_key\", \"accountId\": \"my_new_relic_account_id\" }, \"git\": { \"username\": \"my_git_access_token\" } } } Copy Name the credentials file creds.json, and store it—along with your [keypair filename].pem file—in a directory called $HOME/configs. Step 3 of 6 Run the application Now that everything is set up, you can run the deployer application in a Docker container: docker run -it\\ -v $HOME/configs/:/mnt/deployer/configs/\\ --entrypoint ruby deployer main.rb -c configs/creds.json -d documentation/tutorial/user_stories/Hello/hello.json Copy With this command, you're running the deployer Docker container with the following options: -v mounts the $HOME/configs volume (where you stored your configuration files) at /mnt/deployer/configs/ in the container --entrypoint sets the default command for Docker to ruby Finally, you pass a list of arguments to the entrypoint, including: -c configs/creds.json: The user credentials configuration file -d documentation/tutorial/user_stories/Hello/hello.json: The deployment configuration file Tip You can specify the log level for the deployer using -l. info is the default, but you can also use debug or error. This is a helpful option to use when something goes wrong. Once you run this command, the deployer will create and instrument some specific resources. This may take a few minutes. In the meantime, read on to learn more about what is actually happening during this process. Locating the user configuration files Notice, in the Docker command, that -c takes configs/creds.json. Also, you referenced your .pem file from configs/, as well. This is because you mounted $HOME/configs to /mnt/deployer/configs/ and /mnt/deployer/ is the working directory, according to the deployer's Dockerfile. So, you can access your user configuration files at configs/, which is a relative path from your working directory. Understanding the deployment configuration file The deployment configuration file, hello.json, which drives the deployer, contains four sections: services global_tags resources instrumentations These sections describe the actions the deployer executes. The first section is services: { \"services\": [ { \"id\": \"app1\", \"display_name\": \"Hello-App1\", \"source_repository\": \"-b main https://github.com/newrelic/demo-nodetron.git\", \"deploy_script_path\": \"deploy/linux/roles\", \"port\": 5001, \"destinations\": [\"host1\"], \"files\": [ { \"destination_filepath\": \"engine/data/index.json\", \"content\": } ] } ] } Copy services defines one service, app1, which lives on host1 at port 5001. It uses the Demo Nodetron you learned about earlier in this guide as its source. Note In this example, some HTML has been removed for clarity. To run the deployer, you need to use the real content in hello.json. The second section is global_tags: { \"global_tags\": { \"dxOwningTeam\": \"DemoX\", \"dxEnvironment\": \"development\", \"dxDepartment\": \"Area51\", \"dxProduct\": \"Hello\" } } Copy global_tags defines tags for the deployer to apply to all the resources in your stack. These tags are an important part of organizing your New Relic entities. The third section is resources: { \"resources\": [ { \"id\": \"host1\", \"display_name\": \"Hello-Host1\", \"provider\": \"aws\", \"type\": \"ec2\", \"size\": \"t3.micro\" } ], } Copy resources defines one host, host1, which is a small EC2 instance on AWS. This host is referred to in the services section. The fourth, and final, section is instrumentations: { \"instrumentations\": { \"resources\": [ { \"id\": \"nr_infra\", \"resource_ids\": [\"host1\"], \"provider\": \"newrelic\", \"source_repository\": \"-b main https://github.com/newrelic/demo-newrelic-instrumentation.git\", \"deploy_script_path\": \"deploy/linux/roles\", \"version\": \"1.12.1\" } ], \"services\": [ { \"id\": \"nr_node_agent\", \"service_ids\": [\"app1\"], \"provider\": \"newrelic\", \"source_repository\": \"-b main https://github.com/newrelic/demo-newrelic-instrumentation.git\", \"deploy_script_path\": \"deploy/node/linux/roles\", \"version\": \"6.11.0\" } ] } } Copy instrumentations configures, as the name implies, New Relic instrumentations for the host1 infrastructure and the app1 Node.js application. These definitions use the Demo New Relic Instrumentation project you learned about earlier. Step 4 of 6 Generate some traffic When deployer has run successfully, you will see a message that describes the resources deployed and services installed during the process: [INFO] Executing Deployment [✔] Parsing and validating Deployment configuration success [✔] Provisioner success [✔] Installing On-Host instrumentation success [✔] Installing Services and instrumentations success [INFO] Deployment successful! Deployed Resources: host1 (aws/ec2): ip: 52.90.86.109 services: [\"app1\"] instrumentation: nr_infra: newrelic v1.12.1 Installed Services: app1: url: http://52.90.86.109:5001 instrumentation: nr_node_agent: newrelic v6.11.0 Completed at 2020-08-20 15:11:14 +0000 Copy Visit your application by navigating to the app1 url in your browser: From there, you can follow the instructions to send traffic to New Relic. Note Your app1 url will be different than the url shown in this guide. Step 5 of 6 Check your tags After you've generated some traffic to your Node.js application, use the New Relic search redirect to find the resources you deployed: Once you have found your resources, select the service you deployed, Hello-App1. Then, click on the 'i' icon next to the name, which opens the metadata and tags modal: Notice that all the tags in the global_tags section of the deployment configuration show up under Tags: If you open the metadata modal for the host, you'll also see the global_tags. Step 6 of 6 Tear down your resources Because you've provisioned resources in your cloud account, you need to decommission them. You can do this with the deployer. Add the teardown flag, -t, to the end of your command: docker run -it\\ -v $HOME/configs/:/mnt/deployer/configs/\\ --entrypoint ruby deployer main.rb -c configs/creds.json -d documentation/tutorial/user_stories/Hello/hello.json -t Copy When the deployer has finished successfully, you'll see output that is similar to what you saw during deployment: [INFO] Executing Teardown [✔] Parsing and validating Teardown configuration success [✔] Provisioner success [✔] Uninstalling On-Host instrumentation success [✔] Uninstalling Services and instrumentations success [✔] Terminating infrastructure success [INFO] Teardown successful! Copy Next steps Congratulations! Throughout this guide, you used the Demo Deployer to provision and instrument a host and application in AWS and automatically configured those entities with a list of tags. Next, try creating your own deployment configuration and change the global tags! One cool thing you can do is pass in a configuration file URL to the deployer. Here's one that uses a gist on GitHub: docker run -it\\ -v $HOME/configs/:/mnt/deployer/configs/\\ --entrypoint ruby deployer main.rb -c configs/creds.json -d https://gist.githubusercontent.com/markweitzel/d281fde8ca572ced6346dc25470790a5/raw/373166eb50929a0dd23ba5136abf2fa5caf3d369/MarksHelloDemoConfig.json Copy",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 101.22557,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "Automate tagging of your entire stack",
- "sections": "Automate tagging of your entire stack",
- "info": "A quick demo application that automates the provisioning, deployment, instrumentation, and tagging of a simple app.",
- "body": "Automate tagging of your entire stack 30 min Organizing your services, hosts, and applications in NewRelic can be challenging, especially as resources come and go. One strategy to overcome this challenge is to apply tags, consistently, across your stack. In this guide, you: Provision a host on AWS"
- },
- "id": "5f40792e196a6757721cd49c"
- },
- {
- "category_2": "On-host integrations list",
- "nodeid": 19216,
- "sections": [
- "On-host integrations",
- "Get started",
- "Installation",
- "On-host integrations list",
- "Understand and use data",
- "Troubleshooting",
- "VMware vSphere monitoring integration",
- "Why it matters",
- "Compatibility and requirements",
- "Install and activate",
- "Configure the integration",
- "Example configuration",
- "Update your integration",
- "View and use data",
- "Metric data",
- "VSphereHost",
- "VSphereVm",
- "VSphereDatastore",
- "VSphereDatacenter",
- "VSphereResourcePool",
- "VSphereCluster",
- "VSphereSnapshotVm",
- "For more help"
- ],
- "title": "VMware vSphere monitoring integration",
- "category_0": "Integrations",
- "type": "docs",
- "category_1": "On-host integrations",
- "external_id": "0fe30f87e8a0a8089f85397dd0d73fcc936ce545",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/image2.png",
- "url": "https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/vmware-vsphere-monitoring-integration",
- "published_at": "2020-09-20T17:26:21Z",
- "updated_at": "2020-09-20T17:26:21Z",
- "breadcrumb": "Contents / Integrations / On-host integrations / On-host integrations list",
- "document_type": "page",
- "popularity": 1,
- "info": "An introduction to New Relic's open-source VMware vSphere / ESXi integration. ",
- "body": "New Relic's VMware vSphere integration helps you understand the health and performance of your vSphere environment. You can: Query data to get insights on the performance on your hypervisors, virtual machines, and more. Go from high level views down to the most granular data. vSphere data visualized in a New Relic dashboard: operating systems, status, average CPU and memory consumption, and more. Our integration uses the vSphere API to collect metrics and events generated by all vSphere's components, and forwards the data to our platform via the infrastructure agent. Why it matters With our vSphere integration you can: Instrument and monitor multiple vSphere instances using the same account. Collect data on snapshots, VMs, hosts, resource pools, clusters, and datastores, including tags. Monitor the health of your hypervisors and VMs using our charts and dashboards. Use the data retrieved to monitor key performance and key capacity scaling indicators. Set alerts based on any metrics collected from vCenter. Create workloads to group resources and focus on key data. You can create workloads using data collected via the vSphere integration. Compatibility and requirements Our integration is compatible with VMware vSphere 6.5 or higher. Before installing the integration, make sure that you meet the following requirements: Infrastructure agent installed on a host vCenter service account having at least read-only global permissions with the propagate to children option checked In large environments, where the number of virtual machines is bigger than 800, the integration is not currently able to report all data and might fail. There is a known workaround for these environments that will preserve all metrics and events, but it will disable entity registration. To apply the workaround add the following environment variable to the configuration file: EVENTS: true and METRICS: true. Install and activate To install the vSphere integration, choose your setup: Linux installation Follow the instructions for installing an integration, using the file name nri-vsphere. Change the directory to the integrations folder: cd /etc/newrelic-infra/integrations.d Copy of the sample configuration file: sudo cp vsphere-config.yml.sample vsphere-config.yml Edit the vsphere-config.yml file as described in the configuration settings. Restart the infrastructure agent. Windows installation Download the nri-vsphere MSI installer image from: https://download.newrelic.com/infrastructure_agent/windows/integrations/nri-vsphere/nri-vsphere-amd64.msi To install from the Windows command prompt, run: msiexec.exe /qn /i PATH\\TO\\nri-vsphere-amd64.msi In the Integrations directory, C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\, create a copy of the sample configuration file by running: cp vsphere-config.yml.sample vsphere-config.yml Edit the vsphere-config.yml file as described in the configuration settings. Restart the infrastructure agent. Tarball installation (advanced) You can also install the integration from a tarball file. This gives you full control over the installation and configuration process. Configure the integration An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference. To configure the vSphere integration, you must define the URL of the vSphere API endpoint, and your vSphere username and password. For configuration examples, see the sample configuration files. Some features of the vSphere integration are optional and can be enabled via configuration settings. With secrets management, you can configure on-host integrations with New Relic Infrastructure's agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management. Enable and configure performance metrics (Beta) Performance metrics provide a better understanding of the current status of VMware resources and can be collected in addition to the metrics collected by default;and included in the samples;described at the bottom of the page. All metrics collected are included in the corresponding sample with the perf. prefix attached to the name. For example, net.packetsRx.summation is collected and sent as perf.net.packetsRx.summation. To collect vSphere performance metrics, use the ENABLE_VSPHERE_PERF_METRICS environment variable. Data is collected according to the settings in the vsphere-performance.metrics configuration file. You can override the location of the performance metrics config file using PERF_METRIC_FILE environment variable. Notice that the integration follows VMware's data collection levels (1 to 4). When ENABLE_VSPHERE_PERF_METRICS is set, all level 1 metrics are collected. The data collection level of the performance metrics collected can be modified using PERF_LEVEL. Each metric in the config file can be commented out and new ones can be added if needed. Collection of performance data can increase the load in vCenter and the time needed by to collect data. We recommended to only include the metrics you need in the configuration file. To fine-tune data collection, the number of entities and metrics retrieved per request can be modified using BATCH_SIZE_PERF_ENTITIES and BATCH_SIZE_PERF_METRICS. For more information on vSphere performance metrics, see the VMware documentation. Collect vSphere events (Beta) To collect vSphere events, use the ENABLE_VSPHERE_EVENTS environment variable. The integration collects events between the current time and the last fetched event for each datacenter. It stores the information regarding the last fetched event in a cache that is updated after each execution. Events are only available if the integration is connected to a vCenter and not directly to an ESXi host. The number of events collected per request can be tuned by modifying EVENTS_PAGE_SIZE, which is set to 100 by default. Events are available in the Events page and can be queried via NRQL as InfrastructureEvent under vSphereEvent. Here is an example of vSphere events data: \"summary\": \"User dcui@127.0.0.1 logged out (login time: Tuesday, 14 July, 2020 08:32:09 AM, number of API invocations: 0, user agent: VMware-client/6.5.0)\", \"vSphereEvent.computeResource\": \"cluster1\", \"vSphereEvent.datacenter\": \"Prod Datacenter\", \"vSphereEvent.date\": \"Tue, 14 Jul 2020 09:03:51 UTC\", \"vSphereEvent.host\": \"192.168.0.230\", \"vSphereEvent.userName\": \"dcui\" Collect snapshots data (Beta) To collect snapshot data, use the ENABLE_VSPHERE_SNAPSHOTS environment variable. Snapshot data can be found in VSphereSnapshotVmSample. Collected data covers total and unique space occupied by disk and memory files, snapshot tree, and creation time. You can use this information to create NRQL queries, dashboards, and alerts, since it's linked to the corresponding virtual machine entity. Collect vSphere tags (Beta) To collect vSphere tags, use the ENABLE_VSPHERE_TAGS environment variable. Tags are available as attributes in the corresponding entity sample as label.tagCategory:tagName. If two tags of the same category are assigned to a resource, they are added to a unique attribute separated by a pipe character. For example: label.tagCategory:tagName|tagName2. Tags can be used to run NRQL queries, filter entities in the entity explorer, and to create dashboards and alerts. Filter resources by tags (Beta) Resource filtering allows you to specify which resources you want to monitor by declaring a set of tags that resources must have in order to be monitored. Resources require a match on any (one or more) of the filter tags in order to be included. If none of the resource tags match any of the filter tags, no information about that resource is sent to New Relic. To use filtering resources by tag you need to have the ENABLE_VSPHERE_TAGS environment variable enabled. A tag filter expression is a space-separated list of pairs of strings with the format category=name. For example, to only retrieve resources with a tag category region and include regions us and eu use a filter expression like: region=us region=eu INCLUDE_TAGS: > region=us region=eu To enable resource filtering by tag, edit your integration configuration file and add the option INCLUDE_TAGS with the filter expression you want. Note that datacenter resources acting as the root of the resource tree MUST have tags attached AND match the filter expression in order for other child resources to be fetched. If you connect the integration directly to the ESXi host, vCenter data is not available (for example, events, tags, or datacenter metadata). Example configuration Here are examples of the vSphere integration configuration, including performance metrics: vsphere-config.yml.sample (Linux) vsphere-config-win.yml.sample (Windows) vsphere-performance.metrics (Performance metrics) For more information, see our documentation about the general structure of on-host integration configurations. The configuration option inventory_source is not compatible with this integration. Update your integration On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent. View and use data Data from this service is reported to an integration dashboard. You can query this data for troubleshooting purposes or to create charts and dashboards. vSphere data is attached to these event types: VSphereHostSample VSphereClusterSample VSphereVmSample VSphereDatastoreSample VSphereDatacenterSample VSphereResourcePoolSample VSphereSnapshotVmSample Performance data is enabled and configured separately (see Enable and configure performance metrics). For more on how to view and use your data, see Understand integration data. Metric data The vSphere integration provides metric data attached to the following New Relic events: VSphereHost VSphereVm VSphereDatastore VSphereDatacenter VSphereResourcePool VSphereCluster VSphereSnapshotVm VSphereHost Name Description cpu.totalMHz Sum of the MHz for all the individual cores on the host cpu.coreMHz Speed of the CPU cores cpu.available Amount of free CPU MHz in the host cpu.overallUsage CPU usage across all cores on the host in MHz cpu.percent Percentage of CPU utilization in the host cpu.cores Number of physical CPU cores on the host. Physical CPU cores are the processors contained by a CPU package cpu.threads Number of physical CPU threads on the host disk.totalMiB Total capacity of disks mounted in host, in MiB mem.free Amount of available memory in the host, in MiB mem.usage Amount of used memory in the host, in MiB mem.size Total memory capacity of the host, in MiB vmCount Number of virtual machines in the host hypervisorHostname Name of the host uuid The hardware BIOS identification datacenterName Name of the datacenter related to the host clusterName Name of the cluster related to the host resourcePoolNameList List of names of the resource pools related to the host datastoreNameList List of names of datastores related to the host datacenterLocation Datacenter location networkNameList List of names of networks related to the host overallStatus gray: Status is unknown green: Entity is OK yellow: Entity might have a problem red: Entity definitely has a problem connectionState The host connection state: connected: Connected to the server. For ESX Server, this is the default setting. disconnected: The user has explicitly taken the host down. VirtualCenter does not expect to receive heartbeats from the host. The next time a heartbeat is received, the host is moved to the connected state again and an event is logged. notResponding: VirtualCenter is not receiving heartbeats from the server. The state automatically changes to connected once heartbeats are received again. This state is typically used to trigger an alarm on the host. inMaintenanceMode The flag to indicate whether or not the host is in maintenance mode. This flag is set when the host has entered the maintenance mode. It is not set during the entering phase of maintenance mode. inQuarantineMode The flag to indicate whether or not the host is in quarantine mode. InfraUpdateHa will recommend to set this flag based on the HealthUpdates received by the HealthUpdateProviders configured for the cluster. A host that is reported as degraded will be recommended to enter quarantine mode, while a host that is reported as healthy will be recommended to exit quarantine mode. Execution of these recommended actions will set this flag. Hosts in quarantine mode will be avoided by vSphere DRS as long as the increased consolidation in the cluster does not negatively affect VM performance. powerState The host power state: poweredOff: The host was specifically powered off by the user through VirtualCenter. This state is not a cetain state, because after VirtualCenter issues the command to power off the host, the host might crash, or kill all the processes but fail to power off. poweredOn: The host is powered on. A host that is entering standby mode entering is also in this state. standBy: The host was specifically put in standby mode, either explicitly by the user or automatically by DPM. This state is not a certain state, because after VirtualCenter issues the command to put the host in standby state, the host might crash, or kill all the processes but fail to power off. A host that is exiting standby mode s also in this state. unknown: If the host is disconnected or notResponding, we know its power state, so the host is marked as unknown. standbyMode The host’s standby mode. The property is only populated by vCenter server. If queried directly from the ESX host, the property is unset. entering: The host is entering standby mode. exiting: The host is exiting standby mode. in: The host is in standby mode. none: The host is not in standby mode, and it is not in the process of entering or exiting standby mode. cryptoState Encryption state of the host. Valid values are enumerated by the CryptoState type: incapable: The host is not safe for receiving sensitive material. prepared: The host is prepared for receiving sensitive material but does not have a host key set yet. safe: The host is crypto safe and has a host key set. bootTime The time when the host was booted. VSphereVm Name Description mem.size Memory size of the virtual machine, in MiB mem.usage Guest memory utilization statistics, in MiB. This is also known as active guest memory. The value can range between 0 and the configured memory size of the virtual machine. Valid while the virtual machine is running. mem.free Guest memory available, in MiB. The value can range between 0 and the configured memory size of the virtual machine. Valid while the virtual machine is running. mem.ballooned The size of the balloon driver in the virtual machine, in MiB. The host will inflate the balloon driver to reclaim physical memory from the virtual machine. This is a sign that there is memory pressure on the host. mem.swapped The portion of memory, in MiB, that is granted to this virtual machine from the host's swap space. This is a sign that there is memory pressure on the host. mem.swappedSsd The amount of memory swapped to fast disk device such as SSD, in MiB cpu.allocationLimit Resource limits for CPU, in MHz. If set to -1, there is no fixed allocation limit. cpu.overallUsage Basic CPU performance statistics, in MHz. Valid while the virtual machine is running. cpu.hostUsagePercent Percent of the host CPU used by the virtual machine. In case a limit is configured, the percentage is calculated by taking the limit as the total. cpu.cores Number of processors in the virtual machine disk.totalMiB Total storage space, committed to this virtual machine across all datastores, in MiB ipAddress Primary guest IP address, if available ipAddresses List of IPs associated with the VM (except ipAddress). A pipe or vertical bar character (|) is used as a separator. connectionState Indicates whether or not the virtual machine is available for management: connected: Server has access to the virtual machine. disconnected: Server is currently disconnected from the virtual machine, since its host is disconnected. inaccessible: One or more of the virtual machine configuration files are inaccessible. invalid: The virtual machine configuration format is invalid. orphaned: The virtual machine is no longer registered on its associated host. powerState The current power state of the virtual machine: poweredOff, poweredOn, or suspended. guestHeartbeatStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. operatingSystem Operating system of the virtual machine guestFullName Guest operating system full name, if available from guest tools hypervisorHostname Name of the host where the virtual machine is running instanceUuid Unique identification of the virtual machine datacenterName Name of the datacenter clusterName Name of the cluster resourcePoolNameList List of names of the resource pools datastoreNameList List of names of datastores networkNameList List of names of networks datacenterLocation Datacenter location overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. disk.suspendMemory Size of the snapshot file (bytes). disk.suspendMemoryUnique Size of the snapshot file, unique blocks (bytes). disk.totalUncommittedMiB Additional storage space potentially used by this virtual machine on all datastores. Essentially an aggregate of the property uncommitted across all datastores that this virtual machine is located on (Mebibytes). disk.totalUnsharedMiB Total storage space occupied by the virtual machine across all datastores, that is not shared with any other virtual machine (Mebibytes). mem.hostUsage Host memory usage (Mebibytes). resourcePoolName Resource Pool Name. vmConfigName Vm Config Name. vmHostname Vm Hostname. VSphereDatastore Name Description capacity Maximum capacity of this datastore, in GiB, if accessible is true freeSpace Available space of this datastore, in GiB, if accessible is true uncommitted Total additional storage space, potentially used by all virtual machines on this datastore, in GiB, if accessible is true vmCount Number of virtual machines attached to the datastore datacenterLocation Datacenter location datacenterName Datacenter name hostCount Number of hosts attached to the datastore overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. accessible Connectivity status of the datastore. If this is set to false, the datastore is not accessible. url Unique locator for the datastore, if accessible is true fileSystemType Type of file system volume, such as VMFS or NFS name Name of the datastore nas.remoteHost Host that runs the NFS/CIFS server nas.remotePath Remote path of NFS/CIFS mount point VSphereDatacenter Name Description datastore.totalUsedGiB Total used space in the datastores, in GiB datastore.totalFreeGiB Total free space in the datastores, in GiB datastore.totalGiB Total size of the datastores, in GiB cpu.cores Total CPU count per datacenter cpu.overallUsagePercentage Total CPU usage, in percentage cpu.overallUsage Total CPU usage, in MHz cpu.totalMHz Total CPU capacity, in MHz mem.usage Total memory usage, in MiB mem.size Total memory, in MiB mem.usagePercentage Total memory usage as percentage clusters Total cluster count per datacenter resourcePools Total resource pools per datacenter datastores Total datastores per datacenter networks Total network adapter count per datacenter overallStatus gray: Status is unknown green: Entity is OK yellow: Entity might have a problem red: Entity definitely has a problem hostCount Total host system count per datacenter vmCount Total virtual machines count per datacenter VSphereResourcePool Name Description cpu.TotalMHz Resource pool CPU total capacity, in MHz cpu.overallUsage Resource pool CPU usage, in MHz mem.size Resource pool total memory reserved, in MiB mem.usage Resource pool memory usage, in MiB mem.free Resource pool memory available, in MiB mem.ballooned Size of the balloon driver in the resource pool, in MiB mem.swapped Portion of memory, in MiB, that is granted to this resource pool from the host's swap space vmCount Number of virtual machines in the resource pool overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. resourcePoolName Name of the resource pool datacenterLocation Datacenter location datacenterName Name of the datacenter clusterName Name of the cluster VSphereCluster Name Description cpu.totalEffectiveMHz Effective CPU resources, in MHz, available to virtual machines. This is the aggregated effective resource level from all running hosts. Hosts that are in maintenance mode or are unresponsive are not counted. Resources used by the VMware Service Console are not included in the aggregate. This value represents the amount of resources available for the root resource pool for running virtual machines. cpu.totalMHz Aggregated CPU resources of all hosts, in MHz. It does not filter out cpu used by system or related to hosts under maintenance. cpu.cores Number of physical CPU cores. Physical CPU cores are the processors contained by a CPU package. cpu.threads Aggregated number of CPU threads. mem.size Aggregated memory resources of all hosts, in MiB. It does not filter out memory used by system or related to hosts under maintenance. mem.effectiveSize Effective memory resources, in MiB, available to run virtual machines. This is the aggregated effective resource level from all running hosts. Hosts that are in maintenance mode or are unresponsive are not counted. Resources used by the VMware Service Console are not included in the aggregate. This value represents the amount of resources available for the root resource pool for running virtual machines. effectiveHosts Total number of effective hosts. This number exclude hosts under maintenance. hosts Total number of hosts overallStatus gray: Status is unknown. green: Entity is OK. yellow: Entity might have a problem. red: Entity definitely has a problem. datastoreList List of datastore used by the cluster. A pipe or vertical bar character (|) is used as a separator. hostList List of hosts belonging to the cluster. A pipe or vertical bar character (|) is used as a separator. networkList List of networks attached to the cluster. A pipe or vertical bar character (|) is used as a separator. drsConfig.vmotionRate Threshold for generated ClusterRecommendations. DRS generates only those recommendations that are above the specified vmotionRate. Ratings vary from 1 to 5. This setting applies to manual, partiallyAutomated, and fullyAutomated DRS clusters. dasConfig.restartPriorityTimeout Maximum time the lower priority VMs should wait for the higher priority VMs to be ready (Seconds). datacenterName Datacenter name. datacenterLocation Datacenter location. drsConfig.enabled Flag indicating whether or not the service is enabled. drsConfig.enableVmBehaviorOverrides Flag that dictates whether DRS Behavior overrides for individual virtual machines (ClusterDrsVmConfigInfo) are enabled. drsConfig.defaultVmBehavior Specifies the cluster-wide default DRS behavior for virtual machines. You can override the default behavior for a virtual machine by using the ClusterDrsVmConfigInfo object. dasConfig.enabled Flag to indicate whether or not vSphere HA feature is enabled. dasConfig.admissionControlEnabled Flag that determines whether strict admission control is enabled dasConfig.isolationResponse Indicates whether or not the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. dasConfig.restartPriority Restart priority for a virtual machine. dasConfig.hostMonitoring Determines whether HA restarts virtual machines after a host fails. dasConfig.vmMonitoring Level of HA Virtual Machine Health Monitoring Service. dasConfig.vmComponentProtecting This property indicates if vSphere HA VM Component Protection service is enabled. dasConfig.hbDatastoreCandidatePolicy The policy on what datastores will be used by vCenter Server to choose heartbeat datastores: allFeasibleDs, allFeasibleDsWithUserPreference, userSelectedDs VSphereSnapshotVm Name Description snapshotTreeInfo Tree info for the snapshot. Es: Cluster:Vm:Snapshot1:Snapshot2 name Snapshot name creationTime Snapshot creation time powerState The power state of the virtual machine when this snapshot was taken snapshotId The unique identifier that distinguishes this snapshot from other snapshots of the virtual machine quiesced Flag to indicate whether or not the snapshot was created with the \"quiesce\" option, ensuring a consistent state of the file system backupManifest The relative path from the snapshotDirectory pointing to the backup manifest. Available for certain quiesced snapshots only description Description of the snapshot replaySupported Flag to indicate whether this snapshot is associated with a recording session on the virtual machine that can be replayed totalMemoryInDisk Total size of memory in disk. totalUniqueMemoryInDisk Total size of the file corresponding to the file blocks that were allocated uniquely to store memory. In other words, if the underlying storage supports sharing of file blocks across disk files, the property corresponds to the size of the file blocks that were allocated only in context of this file, i.e. it does not include shared blocks that were allocated in other files. This property will be unset if the underlying implementation is unable to compute this information. totalDisk Total size of snapshot files in disk totalUniqueDisk Total size of the file corresponding to the file blocks that were allocated uniquely to store snapshot data in disk. In other words, if the underlying storage supports sharing of file blocks across disk files, the property corresponds to the size of the file blocks that were allocated only in context of this file, i.e. it does not include shared blocks that were allocated in other files. This property will be unset if the underlying implementation is unable to compute this information. datastorePathDisk Disk file path in the datastore datastorePathMemory Memory file path in the datastore For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 92.65259,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "info": "An introduction to NewRelic's open-source VMware vSphere / ESXi integration. ",
- "body": ", no information about that resource is sent to NewRelic. To use filtering resources by tag you need to have the ENABLE_VSPHERE_TAGS environment variable enabled. A tag filter expression is a space-separated list of pairs of strings with the format category=name. For example, to only retrieve resources"
- },
- "id": "5f0d45e328ccbc76cbaf9d4d"
}
],
"/collect-data/query-data-nrql": [
@@ -6839,7 +7041,7 @@
"body": "You can report custom events to New Relic in several ways, including the New Relic Event API, APM agent APIs, Browser agent APIs, and the Mobile SDK. This document contains general requirements and rules for inserting and using custom events and their associated attributes. Additional requirements may apply based on the method you use. General requirements How long custom data is retained depends on your Insights subscription and its associated data retention. When reporting custom events and attributes, follow these general requirements for supported data types, naming syntax, and size: Requirement Description Payload Total maximum size or length: 1 MB maximum per POST. We highly recommend using compression. The Event API has additional HTTP rate limits. Attribute data types Attribute values can be either a string or a numeric integer or float. If your attribute values contain date information, define it as an unformatted Unix timestamp (in seconds or milliseconds) by using the Insights data formatter. Attribute size Maximum name size: 255 bytes. Maximum attribute value size: Custom attributes sent by the agent: 255 bytes Attributes attached to custom events sent using the Event API: 4096 characters Charts may only display the first 255 characters of attribute values. For complete attribute values, use the JSON chart type or Query API. Maximum total attributes per event: 254. Exception: If you use an APM agent API, the max is 64. Maximum total attributes per event type: 48,000. Naming syntax Attribute names can be a combination of alphanumeric characters, colons (:), periods (.), and underscores (_). Event types (using the eventType attribute) can be a combination of alphanumeric characters, colons (:), and underscores (_). Do not use words reserved for use by NRQL. Null values The database does not store any data with a null value. Reserved words Avoid using the following reserved words as names for events and attributes. Otherwise, unexpected results may occur. This is not a complete list. In general, it's a good practice to avoid using MySQL-reserved words to avoid collision with future New Relic functionality. Keyword Description accountId This is a reserved attribute name. If it's included, it will be dropped during ingest. appId Value must be an integer. If it is not an integer, the attribute name and value will be dropped during ingest. eventType The event type as stored in New Relic. New Relic agents and scripts normally report this as eventType. Can be a combination of alphanumeric characters, colons (:), and underscores (_). Be sure to review the prohibited eventType values and eventType limits. Prohibited eventType values For your eventType value, avoid using: Metric, MetricRaw, and strings prefixed with Metric[0-9] (such as Metric2 or Metric1Minute). Public_ and strings prefixed with Public_. These event types are reserved for use by New Relic. Events passed in with these eventType values will be dropped. timestamp Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds. It must be +/-1 day (24 hours) of the current time on the server. Log forwarding terms The following keys are reserved by the Infrastructure agent's log forwarding feature: entity.guid, log, hostname, plugin.type, fb.input. If used, they are dropped during ingest and a warning is added to the logs. NRQL syntax terms If you need to use NRQL syntax terms as attribute names, including dotted attributes, they must be enclosed in backticks; for example, `LIMIT` or `consumer.offset`. Otherwise, avoid using these reserved words: ago, and, as, auto, begin, begintime, compare, day, days, end, endtime, explain, facet, from, hour, hours, in, is, like, limit, minute, minutes, month, months, not, null, offset, or, raw, second, seconds, select, since, timeseries, until, week, weeks, where, with Additional Browser PageAction requirements For additional requirements for using New Relic Browser's custom PageAction event, see Insert custom data via New Relic Browser agent. Additional Event API requirements For more requirements and details for the Event API, see Event API. Event type limits The current limit for total number of eventType values is 250 per sub-account in a given 24-hour time period. If a user exceeds this limit, New Relic may filter or drop data. Event types include: Default events from New Relic agents Custom events from New Relic agents Custom events from Insights custom event inserter For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 161.65799,
+ "_score": 152.05235,
"_version": null,
"_explanation": null,
"sort": null,
@@ -6853,55 +7055,6 @@
},
"id": "59f4354f4bb81c2ea8b80d0a"
},
- {
- "category_2": "Get started",
- "nodeid": 1136,
- "sections": [
- "NRQL: New Relic Query Language",
- "Get started",
- "NRQL query tools",
- "NRQL query tutorials",
- "NRQL syntax, clauses, and functions",
- "Syntax",
- "Query components",
- "Query metric data",
- "Aggregator functions",
- "Type conversion",
- "For more help"
- ],
- "title": "NRQL syntax, clauses, and functions",
- "category_0": "Query your data",
- "type": "docs",
- "category_1": "NRQL: New Relic Query Language",
- "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions",
- "external_id": "a748f594f32d72e0cbd0bca97e4cedc4e398dbab",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/percentile_0.png",
- "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions",
- "published_at": "2020-09-20T16:38:51Z",
- "updated_at": "2020-09-20T16:38:51Z",
- "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started",
- "document_type": "page",
- "popularity": 1,
- "info": "New Relic Query Language (NRQL) dictionary of clauses and aggregator functions. ",
- "body": "NRQL is a query language you can use to query the New Relic database. This document explains NRQL syntax, clauses, components, and functions. Syntax This document is a reference for the functions and clauses used in a NRQL query. Other resources for understanding NRQL: Intro to NRQL: explains what NRQL is used for, what data you can query with it, and basic NRQL syntax Examine NRQL queries used to build New Relic charts Simulate SQL JOIN functions Use funnels to evaluate a series of related data Format NRQL for querying with the Event API Query components Every NRQL query will begin with a SELECT statement or a FROM clause. All other clauses are optional. The clause definitions below also contain example NRQL queries. Required: SELECT statement SELECT attribute ... SELECT function(attribute) ... The SELECT specifies what portion of a data type you want to query by specifying an attribute or a function. It's followed by one or more arguments separated by commas. In each argument you can: Get the values of all available attributes by using * as a wildcard. For example: SELECT * from Transaction. Get values associated with a specified attribute or multiple attributes specified in a comma separated list. Get aggregated values from specified attributes by selecting an aggregator function. Label the results returned in each argument with the AS clause. You can also use SELECT with basic math functions. Avg response time since last week This query returns the average response time since last week. SELECT average(duration) FROM PageView SINCE 1 week ago Required: FROM clause SELECT ... FROM data type ... Use the FROM clause to specify the data type you wish to query. You can start your query with FROM or with SELECT. You can merge values for the same attributes across multiple data types in a comma separated list. Query one data type This query returns the count of all APM transactions over the last three days: SELECT count(*) FROM Transaction SINCE 3 days ago Query multiple data types This query returns the count of all APM transactions and Browser events over the last three days: SELECT count(*) FROM Transaction, PageView SINCE 3 days ago SHOW EVENT TYPES clause SHOW EVENT TYPES... SHOW EVENT TYPES will return a list of all the data types present in your account for a specific time range. It is used as the first clause in a query instead of SELECT. In this context, \"event types\" refers to the data types you can access with a NRQL query. Data types in the last day This query will return all the data types present over the past day: SHOW EVENT TYPES SINCE 1 day ago WHERE clause Use the WHERE clause to filter results. NRQL returns the results that fulfill the condition(s) you specify in the clause. SELECT function(attribute) ... WHERE attribute [operator 'value' | IN ('value' [, 'value]) | IS [NOT] NULL ] [AND|OR ...] ... If you specify more than one condition, separate the conditions by the operators AND or OR. If you want to simulate a SQL join, use custom attributes in a WHERE or FACET clause. Operators that the WHERE clause accepts Description =, !=, <, <=, >, >= NRQL accepts standard comparison operators. Example: state = 'WA' AND Used to define an intersection of two conditions. OR Used to define a union of two conditions. IS NULL Determines if an attribute has a null value. IS NOT NULL Determines if an attribute does not have a null value. IN Determines if the string value of an attribute is in a specified set. Using this method yields better performance than stringing together multiple WHERE clauses. Example: animalType IN ('cat', 'dog', 'fish') NOT IN Determines if the string value of an attribute is not in a specified set. Using this method yields better performance than stringing together multiple WHERE clauses. Values must be in parentheses, separated by commas. For example: SELECT * FROM PageView WHERE countryCode NOT IN ('CA', 'WA') LIKE Determines if an attribute contains a specified sub-string. The string argument for the LIKE operator accepts the percent sign (%) as a wildcard anywhere in the string. If the substring does not begin or end the string you are matching against, the wildcard must begin or end the string. Examples: userAgentName LIKE 'IE%' IE IE Mobile userAgentName LIKE 'o%a%' Opera Opera Mini userAgentName LIKE 'o%a' Opera userAgentName LIKE '%o%a%' Opera Opera Mini Mozilla Gecko NOT LIKE Determines if an attribute does not contain a specified sub-string. RLIKE Determines if an attribute contains a specified Regex sub-string. Uses RE2 syntax. Examples: appName RLIKE 'z.*|q.*'' z-app q-app hostname RLIKE 'ip-10-351-[0-2]?[0-9]-.*' ip-10-351-19-237 ip-10-351-2-41 ip-10-351-24-238 ip-10-351-14-15 Note: Slashes must be escaped in the Regex pattern. For example, \\d must be \\\\d. Regex defaults to full-string matching, therefore ^ and $ are implicit and you do not need to add them. If the Regex pattern contains a capture group, the group will be ignored. That is, the group will not be captured for use later in the query. NOT RLIKE Determines if an attribute does not contain a specified Regex sub-string. Uses RE2 syntax. Example query with three conditions This query returns the browser response time for pages with checkout in the URL for Safari users in the United States and Canada over the past 24 hours. SELECT histogram(duration, 50, 20) FROM PageView WHERE countryCode IN ('CA', 'US') AND userAgentName='Safari' AND pageUrl LIKE '%checkout%' SINCE 1 day ago AS clause SELECT ... AS 'label' ... Use the AS clause to label an attribute, aggregator, step in a funnel, or the result of a math function with a string delimited by single quotes. The label is used in the resulting chart. Query using math function and AS This query returns the number of page views per session: SELECT count(*)/uniqueCount(session) AS 'Pageviews per Session' FROM PageView Query using funnel and AS This query returns a count of people who have visited both the main page and the careers page of a site over the past week: SELECT funnel(SESSION, WHERE name='Controller/about/main' AS 'Step 1', WHERE name = 'Controller/about/careers' AS 'Step 2') FROM PageView SINCE 1 week ago FACET clause SELECT ... FACET attribute ... Use FACET to separate and group your results by attribute values. For example, you could FACET your PageView data by deviceType to figure out what percentage of your traffic comes from mobile, tablet, and desktop devices. Use the LIMIT clause to specify how many facets appear (default is 10). For more complex grouping, use FACET CASES. FACET clauses support up to five attributes, separated by commas. The facets are sorted in descending order by the first field you provide in the SELECT clause. If you are faceting on attributes with more than 1,000 unique values, a subset of facet values is selected and sorted according to the query type. When selecting min(), max(), or count(), FACET uses those functions to determine how facets are picked and sorted. When selecting any other function, FACET uses the frequency of the attribute you are faceting on to determine how facets are picked and sorted. For more on faceting on multiple attributes, with some real-world examples, see this New Relic blog post. Faceted query using count() This query shows cities with the highest pageview counts. This query uses the total number of pageviews per city to determine how facets are picked and ordered. SELECT count(*) FROM PageView FACET city Faceted query using uniqueCount() This query shows the cities that access the highest number of unique URLs. This query uses the total number of times a particular city appears in the results to determine how facets are picked and ordered. SELECT uniqueCount(pageUrl) FROM PageView FACET city Grouping results across time Advanced segmentation and cohort analysis allow you to facet on bucket functions to more effectively break out your data. Cohort analysis is a way to group results together based on timestamps. You can separate them into buckets that cover a specified range of dates and times. FACET ... AS clause Use FACET ... AS to name facets using the AS keyword in queries. This clause is helpful for adding clearer or simplified names for facets in your results. It can also be used to rename facets in nested aggregation queries. FACET ... AS queries will change the facet names in results (when they appear as headers in tables, for example), but not the actual facet names themselves. FROM Transaction SELECT count(*) FACET response.headers.contentType AS 'content type' FACET CASES clause SELECT ... FACET CASES ( WHERE attribute operator value, WHERE attribute operator value, ... ) ... Use FACET CASES to break out your data by more complex conditions than possible with FACET. Separate multiple conditions with a comma ,. For example, you could query your PageView data and FACET CASES into categories like less than 1 second, from 1 to 10 seconds, and greater than 10 seconds. You can combine multiple attributes within your cases, and label the cases with the AS selector. Data points will be added to at most one facet case, the first facet case that they match. You may also use a time function with your attribute. Basic usage with WHERE SELECT count(*) FROM PageView FACET CASES (WHERE duration < 1, WHERE duration > 1 and duration < 10, WHERE duration > 10) Group based on multiple attributes This example groups results into one bucket where the transaction name contains login, and another where the URL contains login and a custom attribute indicates that the user was a paid user: SELECT count(*) FROM Transaction FACET CASES (WHERE name LIKE '%login%', WHERE name LIKE '%feature%' AND customer_type='Paid') Label groups with AS This example uses the AS selector to give your results a human-readable name: SELECT count(*) FROM Transaction FACET CASES (WHERE name LIKE '%login%' AS 'Total Logins', WHERE name LIKE '%feature%' AND customer_type='Paid' AS 'Feature Visits from Paid Users') FACET ... ORDER BY clause In NRQL, the default is for the first aggregation in the SELECT clause to guide the selection of facets in a query. FACET ... ORDER BY allows you to override this default behavior by adding an aggregate function with the ORDER BY modifier to specify how facets are selected. Specifically, the clause will override the priority by which facets are chosen to be in the final result before being limited by the LIMIT clause. This clause can be used in querying but not for alerts or streaming. This example shows how to use FACET ... ORDER BY to find the average durations of app transactions, showing the top 10 (default limit) highest durations by apps which have the highest response size. In this case, if FACET ... ORDER BY is not used, the query results will instead show the top 10 by highest durations, with response size being irrelevant to the app selection. FROM Transaction SELECT average(duration) TIMESERIES FACET appName ORDER BY max(responseSize) Because the operations are performed before the LIMIT clause is applied, FACET ... ORDER BY does not impact the sort of the final query results, which will be particularly noticeable in the results for non-timeseries queries. The ORDER BY modifier in this case works differently than the ORDER BY clause. When parsing queries that follow the format FACET attribute1 ORDER BY attribute2, New Relic will read these as FACET ... ORDER BY queries, but only if ORDER BY appears immediately after FACET. Otherwise ORDER BY will be interpreted by New Relic as a clause. LIMIT clause SELECT ... LIMIT count ... Use the LIMIT clause to control the maximum number of facet values returned by FACET queries or the maximum number of items returned by SELECT * queries. This clause takes a single integer value as an argument. If the LIMIT clause is not specified, or no value is provided, the limit defaults to 10 for FACET queries and 100 in the case of SELECT * queries. The maximum allowed value for the LIMIT clause is 2,000. Query using LIMIT This query shows the top 20 countries by session count and provides 95th percentile of response time for each country for Windows users only. SELECT uniqueCount(session), percentile(duration, 95) FROM PageView WHERE userAgentOS = 'Windows' FACET countryCode LIMIT 20 SINCE YESTERDAY OFFSET clause SELECT ... LIMIT count OFFSET count ... Use the OFFSET clause with LIMIT to control the portion of rows returned by SELECT * or SELECT column queries. Like the LIMIT clause, OFFSET takes a single integer value as an argument. OFFSET sets the number of rows to be skipped before the selected rows of your query are returned. This is constrained by LIMIT. OFFSET rows are skipped starting from the most recent record. For example, the query SELECT interestingValue FROM Minute_Report LIMIT 5 OFFSET 1 returns the last 5 values from Minute_Report except for the most recent one. ORDER BY clause The ORDER BY clause allows you to specify how you want to sort your query results in queries that select event attributes by row. This query orders transactions by duration. FROM Transaction SELECT appName, duration ORDER BY duration The default sort order is ascending, but this can be changed by adding the ASC or DESC modifiers. SINCE clause SELECT ... SINCE [numerical units AGO | phrase] ... The default value is 1 hour ago. Use the SINCE clause to define the beginning of a time range for the returned data. When using NRQL, you can set a UTC timestamp or relative time range. You can specify a timezone for the query but not for the results. NRQL results are based on your system time. See Set time range on dashboards and charts for detailed information and examples. UNTIL clause SELECT ... UNTIL integer units AGO ... The default value is NOW. Only use UNTIL to specify an end point other than the default. Use the UNTIL clause to define the end of a time range across which to return data. Once a time range has been specified, the data will be preserved and can be reviewed after the time range has ended. You can specify a UTC timestamp or relative time range. You can specify a time zone for the query but not for the results. The returned results are based on your system time. See Set time range on dashboards and charts for detailed information and examples. WITH TIMEZONE clause SELECT ... WITH TIMEZONE (selected zone) ... By default, query results are displayed in the timezone of the browser you're using. Use the WITH TIMEZONE clause to select a time zone for a date or time in the query that hasn't already had a time zone specified for it. For example, the query clause SINCE Monday UNTIL Tuesday WITH TIMEZONE 'America/New_York' will return data recorded from Monday at midnight, Eastern Standard Time, until midnight Tuesday, Eastern Standard Time. Available Time Zone Selections Africa/Abidjan Africa/Addis_Ababa Africa/Algiers Africa/Blantyre Africa/Cairo Africa/Windhoek America/Adak America/Anchorage America/Araguaina America/Argentina/Buenos_Aires America/Belize America/Bogota America/Campo_Grande America/Cancun America/Caracas America/Chicago America/Chihuahua America/Dawson_Creek America/Denver America/Ensenada America/Glace_Bay America/Godthab America/Goose_Bay America/Havana America/La_Paz America/Los_Angeles America/Miquelon America/Montevideo America/New_York America/Noronha America/Santiago America/Sao_Paulo America/St_Johns Asia/Anadyr Asia/Bangkok Asia/Beirut Asia/Damascus Asia/Dhaka Asia/Dubai Asia/Gaza Asia/Hong_Kong Asia/Irkutsk Asia/Jerusalem Asia/Kabul Asia/Katmandu Asia/Kolkata Asia/Krasnoyarsk Asia/Magadan Asia/Novosibirsk Asia/Rangoon Asia/Seoul Asia/Tashkent Asia/Tehran Asia/Tokyo Asia/Vladivostok Asia/Yakutsk Asia/Yekaterinburg Asia/Yerevan Atlantic/Azores Atlantic/Cape_Verde Atlantic/Stanley Australia/Adelaide Australia/Brisbane Australia/Darwin Australia/Eucla Australia/Hobart Australia/Lord_Howe Australia/Perth Chile/EasterIsland Etc/GMT+10 Etc/GMT+8 Etc/GMT-11 Etc/GMT-12 Europe/Amsterdam Europe/Belfast Europe/Belgrade Europe/Brussels Europe/Dublin Europe/Lisbon Europe/London Europe/Minsk Europe/Moscow Pacific/Auckland Pacific/Chatham Pacific/Gambier Pacific/Kiritimati Pacific/Marquesas Pacific/Midway Pacific/Norfolk Pacific/Tongatapu UTC See Set time range on dashboards and charts for detailed information and examples. WITH METRIC_FORMAT clause For information on querying metric data, see Query metrics. COMPARE WITH clause SELECT ... (SINCE or UNTIL) (integer units) AGO COMPARE WITH (integer units) AGO ... Use the COMPARE WITH clause to compare the values for two different time ranges. COMPARE WITH requires a SINCE or UNTIL statement. The time specified by COMPARE WITH is relative to the time specified by SINCE or UNTIL. For example, SINCE 1 day ago COMPARE WITH 1 day ago compares yesterday with the day before. The time range for theCOMPARE WITH value is always the same as that specified by SINCE or UNTIL. For example, SINCE 2 hours ago COMPARE WITH 4 hours ago might compare 3:00pm through 5:00pm against 1:00 through 3:00pm. COMPARE WITH can be formatted as either a line chart or a billboard: With TIMESERIES, COMPARE WITH creates a line chart with the comparison mapped over time. Without TIMESERIES, COMPARE WITH generates a billboard with the current value and the percent change from the COMPARE WITH value. Example: This query returns data as a line chart showing the 95th percentile for the past hour compared to the same range one week ago. First as a single value, then as a line chart. SELECT percentile(duration) FROM PageView SINCE 1 week ago COMPARE WITH 1 week AGO SELECT percentile(duration) FROM PageView SINCE 1 week ago COMPARE WITH 1 week AGO TIMESERIES AUTO TIMESERIES clause SELECT ... TIMESERIES integer units ... Use the TIMESERIES clause to return data as a time series broken out by a specified period of time. Since TIMESERIES is used to trigger certain charts, there is no default value. To indicate the time range, use integer units. For example: TIMESERIES 1 minute TIMESERIES 30 minutes TIMESERIES 1 hour TIMESERIES 30 seconds Use a set interval The value provided indicates the units used to break out the graph. For example, to present a one-day graph showing 30 minute increments: SELECT ... SINCE 1 day AGO TIMESERIES 30 minutes Use automatically set interval TIMESERIES can also be set to AUTO, which will divide your graph into a reasonable number of divisions. For example, a daily chart will be divided into 30 minute intervals and a weekly chart will be divided into 6 hour intervals. This query returns data as a line chart showing the 50th and 90th percentile of client-side transaction time for one week with a data point every 6 hours. SELECT average(duration), percentile(duration, 50, 90) FROM PageView SINCE 1 week AGO TIMESERIES AUTO Use max interval You can set TIMESERIES to MAX, which will automatically adjust your time window to the maximum number of intervals allowed for a given time period. This allows you to update your time windows without having to manually update your TIMESERIES buckets and ensures your time window is being split into the peak number of intervals allowed. The maximum number of TIMESERIES buckets that will be returned is 366. For example, the following query creates 4-minute intervals, which is the ceiling for a daily chart. SELECT average(duration) FROM Transaction since 1 day ago TIMESERIES MAX For functions such as average( ) or percentile( ), a large interval can have a significant smoothing effect on outliers. EXTRAPOLATE clause You can use this clause with these data types: Transaction TransactionError Custom events reported via APM agent APIs The purpose of EXTRAPOLATE is to mathematically compensate for the effects of APM agent sampling of event data so that query results more closely represent the total activity in your system. This clause will be useful when a New Relic APM agent reports so many events that it often passes its harvest cycle reporting limits. When that occurs, the agent begins to sample events. When EXTRAPOLATE is used in a NRQL query that supports its use, the ratio between the reported events and the total events is used to extrapolate a close approximation of the total unsampled data. When it is used in a NRQL query that doesn’t support its use or that hasn’t used sampled data, it has no effect. Note that EXTRAPOLATE is most useful for homogenous data (like throughput or error rate). It's not effective when attempting to extrapolate a count of distinct things (like uniqueCount() or uniques()). This clause works only with NRQL queries that use one of the following aggregator functions: apdex average count histogram sum percentage (if function it takes as an argument supports EXTRAPOLATE) rate (if function it takes as an argument supports EXTRAPOLATE) stddev Example of extrapolating throughput A query that will show the extrapolated throughput of a service named interestingApplication. SELECT count(*) FROM Transaction WHERE appName='interestingApplication' SINCE 60 minutes ago EXTRAPOLATE Example of extrapolating throughput as a time series A query that will show the extrapolated throughput of a service named interestingApplication by transaction name, displayed as a time series. SELECT count(*) FROM Transaction WHERE appName='interestingApplication' SINCE 60 minutes ago FACET name TIMESERIES 1 minute EXTRAPOLATE Query metric data There are several ways to query metric data using NRQL: Query metric timeslice data, which is reported by New Relic APM, Mobile, Browser Query the Metric data type, which is reported by some of our integrations and Telemetry SDKs For more on understanding metrics in New Relic, see Metric data types. Aggregator functions Use aggregator functions to filter and aggregate data in a NRQL query. Some helpful information about using aggregator functions: See the New Relic University tutorials for Filter queries, Apdex queries, and Percentile queries. Or, go to the full online course Writing NRQL queries. Data type \"coercion\" is not supported. Read about available type conversion functions. Cohort analysis functions appear on the New Relic Insights Cohort analysis page. The cohort functions aggregate transactions into time segments. Here are the available aggregator functions. The definitions below contain example NRQL queries. Examples: SELECT histogram(duration, 10, 20) FROM PageView SINCE 1 week ago apdex(attribute, t: ) Use the apdex function to return an Apdex score for a single transaction or for all your transactions. The attribute can be any attribute based on response time, such as duration or backendDuration. The t: argument defines an Apdex T threshold in seconds. The Apdex score returned by the apdex( ) function is based only on execution time. It does not account for APM errors. If a transaction includes an error but completes in Apdex T or less, that transaction will be rated satisfying by the apdex ( ) function. Get Apdex for specific customers If you have defined custom attributes, you can filter based on those attributes. For example, you could monitor the Apdex for a particularly important customer: SELECT apdex(duration, t: 0.4) FROM Transaction WHERE customerName='ReallyImportantCustomer' SINCE 1 day ago Get Apdex for specific transaction Use the name attribute to return a score for a specific transaction, or return an overall Apdex by omitting name. This query returns an Apdex score for the Controller/notes/index transaction over the last hour: SELECT apdex(duration, t: 0.5) from Transaction WHERE name='Controller/notes/index' SINCE 1 hour ago The apdex function returns an Apdex score that measures user satisfaction with your site. Arguments are a response time attribute and an Apdex T threshold in seconds. Get overall Apdex for your app This example query returns an overall Apdex for the application over the last three weeks: SELECT apdex(duration, t: 0.08) FROM Transaction SINCE 3 week ago average(attribute) Use the average( ) function to return the average value for an attribute. It takes a single attribute name as an argument. If a value of the attribute is not numeric, it will be ignored when aggregating. If data matching the query's conditions is not found, or there are no numeric values returned by the query, it will return a value of null. buckets(attribute, ceiling [,number of buckets]) Use the buckets() function to aggregate data split up by a FACET clause into buckets based on ranges. You can bucket by any attribute that is stored as a numerical value in the New Relic database. It takes three arguments: Attribute name Maximum value of the sample range. Any outliers will appear in the final bucket. Total number of buckets For more information and examples, see Split your data into buckets. bucketPercentile(attribute) The bucketPercentile( ) function is the NRQL equivalent of the histogram_quantile function in Prometheus. It is intended to be used with dimensional metric data. Instead of the quantile, New Relic returns the percentile, which is the quantile * 100. Use the bucketPercentile( ) function to calculate the quantile from the histogram data in a Prometheus format. It takes the bucket name as an argument and reports percentiles along the bucket's boundaries: SELECT bucketPercentile(duration_bucket) FROM Metric SINCE 1 day ago Optionally, you can add percentile specifications as an argument: SELECT bucketPercentile(duration_bucket, 50, 75, 90) FROM Metric SINCE 1 day ago Because multiple metrics are used to make up Prometheus histogram data, you must query for specific Prometheus metrics in terms of the associated . For example, to compute percentiles from a Prometheus histogram, with the prometheus_http_request_duration_seconds using NRQL, use bucketPercentile(prometheus_http_request_duration_seconds_bucket, 50). Note how _bucket is added to the end of the as a suffix. See the Prometheus.io documentation for more information. cardinality(attribute) Use the cardinality( ) function to obtain the number of combinations of all the dimensions (attributes) on a metric. It takes three arguments, all optional: Metric name: if present, cardinality( ) only computes the metric specified. Include: if present, the include list restricts the cardinality computation to those attributes. Exclude: if present, the exclude list causes those attributes to be ignored in the cardinality computation. SELECT cardinality(metric_name, include:{attribute_list}, exclude:{attribute_list}) count(*) Use the count( ) function to return a count of available records. It takes a single argument; either *, an attribute, or a constant value. Currently, it follows typical SQL behavior and counts all records that have values for its argument. Since count(*) does not name a specific attribute, the results will be formatted in the default \"humanize\" format. derivative(attribute [,time interval]) derivative() finds the rate of change for a given dataset. The rate of change is calculated using a least-squares regression to approximate the derivative. The time interval is the period for which the rate of change is calculated. For example, derivative(attributeName, 1 minute) will return the rate of change per minute. dimensions(include: {attributes}, exclude: {attributes}) Use the dimensions( ) function to return all the dimensional values on a data type. You can explicitly include or exclude specific attributes using the optional arguments: Include: if present, the include list limits dimensions( ) to those attributes. Exclude: if present, the dimensions( ) calculation ignores those attributes. FROM Metric SELECT count(node_filesystem_size) TIMESERIES FACET dimensions() When used with a FACET clause, dimensions( ) produces a unique timeseries for all facets available on the event type, similar to how Prometheus behaves with non-aggregated queries. earliest(attribute) Use the earliest( ) function to return the earliest value for an attribute over the specified time range. It takes a single argument. Arguments after the first will be ignored. If used in conjunction with a FACET it will return the most recent value for an attribute for each of the resulting facets. Get earliest country per user agent from PageView This query returns the earliest country code per each user agent from the PageView event. SELECT earliest(countryCode) FROM PageView FACET userAgentName eventType() ...WHERE eventType() = 'EventNameHere'... ...FACET eventType()... Use the eventType() function in a FACET clause to break out results by the selected data type or in a WHERE clause to filter results to a specific data type. This is particularly useful for targeting specific data types with the filter() and percentage() functions. In this context, \"event type\" refers to the types of data you can access with a NRQL query. Use eventType() in filter() function This query returns the percentage of total TransactionError results out of the total Transaction results. You can use the eventType() function to target specific types of data with the filter() function. SELECT 100 * filter(count(*), where eventType() = 'TransactionError') / filter(count(*), where eventType() = 'Transaction') FROM Transaction, TransactionError WHERE appName = 'App.Prod' TIMESERIES 2 Minutes SINCE 6 hours ago Use eventType() with FACET This query displays a count of how many records each data type (Transaction and TransactionError) returns. SELECT count(*) FROM Transaction, TransactionError FACET eventType() TIMESERIES filter(function(attribute), WHERE condition) Use the filter( ) function to limit the results for one of the aggregator functions in your SELECT statement. You can use filter() in conjunction with FACET or TIMESERIES. Analyze purchases that used offer codes You could use filter() to compare the items bought in a set of transactions for those using an offer code versus those who aren't: Use the filter( ) function to limit the results for one of the aggregator functions in your SELECT statement. funnel(attribute, steps) Use the funnel() function to generate a funnel chart. It takes an attribute as its first argument. You then specify steps as WHERE clauses (with optional AS clauses for labels) separated by commas. For details and examples, see the funnels documentation. getField(attribute, field) Use the getField() function to extract a field from complex metrics. It takes the following arguments: Metric type Supported fields summary count, total, max, min gauge count, total, max, min, latest distribution count, total, max, min counter count Examples: SELECT max(getField(mySummary, count)) from Metric SELECT sum(mySummary) from Metric where getField(mySummary, count) > 10 histogram(attribute, ceiling [,number of buckets]) Use the histogram( ) function to generate histograms. It takes three arguments: Attribute name Maximum value of the sample range Total number of buckets Histogram of response times from PageView events This query results in a histogram of response times ranging up to 10 seconds over 20 buckets. SELECT histogram(duration, 10, 20) FROM PageView SINCE 1 week ago Prometheus histogram buckets histogram( ) accepts Prometheus histogram buckets: SELECT histogram(duration_bucket, 10, 20) FROM Metric SINCE 1 week ago New Relic distribution metric histogram( ) accepts Distribution metric as an input: SELECT histogram(myDistributionMetric, 10, 20) FROM Metric SINCE 1 week ago keyset() Using keyset() will allow you to see all of the attributes for a given data type over a given time range. It takes no arguments. It returns a JSON structure containing groups of string-typed keys, numeric-typed keys, boolean-typed keys, and all keys. See all attributes for a data type This query returns the attributes found for PageView events from the last day: SELECT keyset() FROM PageView SINCE 1 day ago latest(attribute) Use the latest( ) function to return the most recent value for an attribute over a specified time range. It takes a single argument. Arguments after the first will be ignored. If used in conjunction with a FACET it will return the most recent value for an attribute for each of the resulting facets. Get most recent country per user agent from PageView This query returns the most recent country code per each user agent from the PageView event. SELECT latest(countryCode) FROM PageView FACET userAgentName max(attribute) Use the max( ) function to return the maximum recorded value of a numeric attribute over the time range specified. It takes a single attribute name as an argument. If a value of the attribute is not numeric, it will be ignored when aggregating. If data matching the query's conditions is not found, or there are no numeric values returned by the query, it will return a value of null. median(attribute) Use the median( ) function to return an attribute's median, or 50th percentile. For more information about percentile queries, see percentile(). The median( ) query is only available when using the query builder. Median query This query will generate a line chart for the median value. SELECT median(duration) FROM PageView TIMESERIES AUTO min(attribute) Use the min( ) function to return the minimum recorded value of a numeric attribute over the time range specified. It takes a single attribute name as an argument. If a value of the attribute is not numeric, it will be ignored when aggregating. If data matching the query's conditions is not found, or there are no numeric values returned by the query, it will return a value of null. percentage(function(attribute), WHERE condition) Use the percentage( ) function to return the percentage of a target data set that matches some condition. The first argument requires an aggregator function against the desired attribute. Use exactly two arguments (arguments after the first two will be ignored). If the attribute is not numeric, this function returns a value of 100%. percentile(attribute [, percentile [, ...]]) Use the percentile( ) function to return an attribute's approximate value at a given percentile. It requires an attribute and can take any number of arguments representing percentile points. The percentile() function enables percentiles to displays with up to three digits after the decimal point, providing greater precision. Percentile thresholds may be specified as decimal values, but be aware that for most data sets, percentiles closer than 0.1 from each other will not be resolved. Percentile display examples Use TIMESERIES to generate a line chart with percentiles mapped over time. Omit TIMESERIES to generate a billboard and attribute sheet showing aggregate values for the percentiles. If no percentiles are listed, the default is the 95th percentile. To return only the 50th percentile value, the median, you can also use median(). Basic percentile query This query will generate a line chart with lines for the 5th, 50th, and 95th percentile. SELECT percentile(duration, 5, 50, 95) FROM PageView TIMESERIES AUTO predictLinear(attribute, [,time interval]) predictLinear() is an extension of the derivative() function. It uses a similar method of least-squares linear regression to predict the future values for a dataset. The time interval is how far the query will look into the future. For example, predictLinear(attributeName, 1 hour) is a linear prediction 1 hour into the future of the query time window. Generally, predictLinear() is helpful for continuously growing values like disk space, or predictions on large trends. Since predictLinear() is a linear regression, familiarity with the dataset being queried helps to ensure accurate long-term predictions. Any dataset which grows exponentially, logarithmically, or by other nonlinear means will likely only be successful in very short-term predictions. New Relic recommends against using predictLinear in TIMESERIES queries. This is because each bucket will be making an individual prediction based on its relative timeframe within the query, meaning that such queries will not show predictions from the end of the timeseries forward. rate(function(attribute) [,time interval]) Use the rate( ) function to visualize the frequency or rate of a given query per time interval. For example, you might want to know the number of pageviews per minute over an hour-long period or the count of unique sessions on your site per hour over a day-long period. Use TIMESERIES to generate a line chart with rates mapped over time. Omit TIMESERIES to generate a billboard showing a single rate value averaged over time. Basic rate query This query will generate a line chart showing the rate of throughput for APM transactions per 10 minutes over the past 6 hours. SELECT rate(count(*), 10 minute) FROM Transaction SINCE 6 hours ago TIMESERIES round(attribute) Use the round( ) function to return the rounded value of an attribute. Optionally round( ) can take a second argument, to_nearest, to round the first argument to the closest multiple of the second one. to_nearest can be fractional. SELECT round(n [, to_nearest]) stddev(attribute) Use the stddev( ) function to return one standard deviation for a numeric attribute over the time range specified. It takes a single argument. If the attribute is not numeric, it will return a value of zero. stdvar(attribute) Use the stdvar( ) function to return the standard variance for a numeric attribute over the time range specified. It takes a single argument. If the attribute is not numeric, it will return a value of zero. sum(attribute) Use the sum( ) function to return the sum recorded values of a numeric attribute over the time range specified. It takes a single argument. Arguments after the first will be ignored. If the attribute is not numeric, it will return a value of zero. uniqueCount(attribute) Use the uniqueCount( ) function to return the number of unique values recorded for an attribute over the time range specified. To optimize query performance, this function returns approximate results for queries that inspect more than 256 unique values. uniques(attribute [,limit]) Use the uniques( ) function to return a list of unique values recorded for an attribute over the time range specified. When used along with the facet clause, a list of unique attribute values will be returned per each facet value. The limit parameter is optional. When it is not provided, the default limit of 1,000 unique attribute values per facet is applied. You may specify a different limit value, up to a maximum of 10,000. The uniques( ) function will return the first set of unique attribute values discovered, until the limit is reached. Therefore, if you have 5,000 unique attribute values in your data set, and the limit is set to 1,000, the operator will return the first 1,000 unique values that it discovers, regardless of their frequency. The maximum number of values that can be returned in a query result is the product of the uniques( ) limit times the facet limit. In the following query, the theoretical maximum number of values that can be returned is 5 million (5,000 x 1,000). From Transaction SELECT uniques(host,5000) FACET appName LIMIT 1000 However, depending on the data set being queried, and the complexity of the query, memory protection limits may prevent a very large query from being executed. Type conversion NRQL does not support \"coercion.\" This means that a float stored as a string is treated as a string and cannot be operated on by functions expecting float values. You can convert a string with a numeric value or a boolean with a string value to their numeric and boolean types with these functions: Use the numeric() function to convert a number with a string format to a numeric function. The function can be built into a query that uses math functions on query results or NRQL aggregator functions, such as average(). Use the boolean() function to convert a string value of \"true\" or \"false\" to the corresponding boolean value. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 98.63871,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NRQLsyntax, clauses, and functions",
- "sections": "NRQLsyntax, clauses, and functions",
- "info": "New Relic Query Language (NRQL) dictionary of clauses and aggregator functions. ",
- "category_0": "Query your data",
- "category_1": "NRQL: New Relic Query Language",
- "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions",
- "body": " NRQL is used for, what data you can query with it, and basic NRQLsyntax Examine NRQL queries used to build New Relic charts Simulate SQL JOIN functions Use funnels to evaluate a series of related data Format NRQL for querying with the Event API Query components Every NRQL query will begin",
- "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started"
- },
- "id": "5f2abcef28ccbcb0ee0c3aed"
- },
{
"category_2": "Alert conditions",
"nodeid": 9231,
@@ -6944,7 +7097,7 @@
"body": "You can create alert conditions using NRQL queries. Create NRQL alert condition To create a NRQL alert condition: When you start to create a condition, where it prompts you to Select a product, click NRQL. Tips for creating and using a NRQL condition: Topic Tips Condition types NRQL condition types include static, baseline, and outlier. Create a description For some condition types, you can create a Description. Query results Queries must return a number. The condition works by evaluating that returned number against the thresholds you set. Time period As with all alert conditions, NRQL conditions evaluate one single minute at a time. The implicit SINCE ... UNTIL clause specifying which minute to evaluate is controlled by your Evaluation offset setting. Since very recent data may be incomplete, you may want to query data from 3 minutes ago or longer, especially for: Applications that run on multiple hosts. SyntheticCheck data: Timeouts can take 3 minutes, so 5 minutes or more is recommended. Also, if a query will generate intermittent data, consider using the sum of query results option. Condition settings Use the Condition settings to: Configure whether and how open violations are force-closed. Adjust the evaluation offset. Create a concise and descriptive condition name. (NerdGraph API Only) Provide a text description for the condition that will be included in violations and notifications. Troubleshooting procedures Optional: To include your organization's procedures for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQL syntax Examples of NRQL condition queries Alert threshold types When you create a NRQL alert, you can choose from different types of thresholds: NRQL alert threshold types Description Static This is the simplest type of NRQL threshold. It allows you to create a condition based on a NRQL query that returns a numeric value. Optional: Include a FACET clause. Baseline Uses a self-adjusting condition based on the past behavior of the monitored values. Uses the same NRQL query form as the static type, except you cannot use a FACET clause. Outlier Looks for group behavior and values that are outliers from those groups. Uses the same NRQL query form as the static type, but requires a FACET clause. NRQL alert syntax Here is the basic syntax for creating all NRQL alert conditions. Depending on the threshold type, also include a FACET clause as applicable. SELECT function(attribute) FROM Event WHERE attribute [comparison] [AND|OR ...] Clause Notes SELECT function(attribute) Required Supported functions that return numbers include: apdex average count latest max min percentage percentile sum uniqueCount If you use the percentile aggregator in a faceted alert condition with many facets, this may cause the following error to appear: An error occurred while fetching chart data. If you see this error, use average instead. FROM data type Required Only one data type can be targeted. Supported data types: Event Metric (RAW data points will be returned) WHERE attribute [comparison] [AND|OR ...] Optional Use the WHERE clause to specify a series of one or more conditions. All the operators are supported. FACET attribute Static: Optional Baseline: Not allowed Outlier: Required Including a FACET clause in your NRQL syntax depends on the threshold type: static, baseline, or outlier. Use the FACET clause to separate your results by attribute and alert on each attribute independently. Faceted queries can return a maximum of 5000 values for static conditions and a maximum of 500 values for outlier conditions. If the query returns more than this number of values, the alert condition cannot be created. If you create the condition and the query returns more than this number later, the alert will fail. Sum of query results (limited or intermittent data) Available only for static (basic) threshold types. If a query returns intermittent or limited data, it may be difficult to set a meaningful threshold. Missing or limited data will sometimes generate false positives or false negatives. To avoid this problem when using the static threshold type, you can set the selector to sum of query results. This lets you set the alert on an aggregated sum instead of a value from a single harvest cycle. Up to two hours of the one-minute data checks can be aggregated. The duration you select determines the width of the rolling sum, and the preview chart will update accordingly. Offset the query time window Every minute, we evaluate the NRQL query in one-minute time windows. The start time depends on the value you select in the NRQL condition's Advanced settings > Evaluation offset. Example: Using the default time window to evaluate violations With the Evaluation offset at the default setting of three minutes, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago If the event type is sourced from an APM language agent and aggregated from many app instances (for example, Transactions, TransactionErrors, etc.), we recommend evaluating data from three minutes ago or longer. An offset of less than 3 minutes will trigger violations sooner, but you might see more false positives and negatives due to data latency. For cloud data, such as AWS integrations, you may need an offset longer than 3 minutes. Check our AWS polling intervals documentation to determine your best setting. NRQL alert threshold examples Here are some common use cases for NRQL alert conditions. These queries will work for static and baseline threshold types. The outlier threshold type will require additional FACET clauses. Alert on specific segments of your data Create constrained alerts that target a specific segment of your data, such as a few key customers or a range of data. Use the WHERE clause to define those conditions. SELECT average(duration) FROM Transaction WHERE account_id in (91290, 102021, 20230) SELECT percentile(duration, 95) FROM Transaction WHERE name LIKE 'Controller/checkout/%' Alert on Nth percentile of your data Create alerts when an Nth percentile of your data hits a specified threshold; for example, maintaining SLA service levels. Since we evaluate the NRQL query in one-minute time windows, percentiles will be calculated for each minute separately. SELECT percentile(duration, 95) FROM Transaction SELECT percentile(databaseDuration, 75) FROM Transaction Alert on max, min, avg of your data Create alerts when your data hits a certain maximum, minimum, or average; for example, ensuring that a duration or response time does not pass a certain threshold. SELECT max(duration) FROM Transaction SELECT average(duration) FROM Transaction Alert on a percentage of your data Create alerts when a proportion of your data goes above or below a certain threshold. SELECT percentage(count(*), WHERE duration > 2) FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode = '500') FROM Transaction Alert on Apdex with any T-value Create alerts on Apdex, applying your own T-value for certain transactions. For example, get an alert notification when your Apdex for a T-value of 500ms on transactions for production apps goes below 0.8. SELECT apdex(duration, t:0.5) FROM Transaction WHERE appName like '%prod%' Create a description You can define a description that passes useful information downstream for better violation responses or for use by downstream systems. For details, see Description. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 95.77885,
+ "_score": 95.401566,
"_version": null,
"_explanation": null,
"sort": null,
@@ -6955,7 +7108,56 @@
"translation_ja_url": "https://docs.newrelic.co.jp/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions",
"body": " for handling the incident, add the runbook URL to the condition. Limits on conditions See the maximum values. Health status NRQL alert conditions do not affect an entity's health status display. Examples For more information, see: Expected NRQLsyntax Examples of NRQL condition queries Alert threshold"
},
- "id": "5f2d992528ccbc489d88dfc1"
+ "id": "5f2d992528ccbc489d88dfc1"
+ },
+ {
+ "category_2": "Get started",
+ "nodeid": 1136,
+ "sections": [
+ "NRQL: New Relic Query Language",
+ "Get started",
+ "NRQL query tools",
+ "NRQL query tutorials",
+ "NRQL syntax, clauses, and functions",
+ "Syntax",
+ "Query components",
+ "Query metric data",
+ "Aggregator functions",
+ "Type conversion",
+ "For more help"
+ ],
+ "title": "NRQL syntax, clauses, and functions",
+ "category_0": "Query your data",
+ "type": "docs",
+ "category_1": "NRQL: New Relic Query Language",
+ "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions",
+ "external_id": "a748f594f32d72e0cbd0bca97e4cedc4e398dbab",
+ "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/percentile_0.png",
+ "url": "https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions",
+ "published_at": "2020-09-20T16:38:51Z",
+ "updated_at": "2020-09-20T16:38:51Z",
+ "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started",
+ "document_type": "page",
+ "popularity": 1,
+ "info": "New Relic Query Language (NRQL) dictionary of clauses and aggregator functions. ",
+ "body": "NRQL is a query language you can use to query the New Relic database. This document explains NRQL syntax, clauses, components, and functions. Syntax This document is a reference for the functions and clauses used in a NRQL query. Other resources for understanding NRQL: Intro to NRQL: explains what NRQL is used for, what data you can query with it, and basic NRQL syntax Examine NRQL queries used to build New Relic charts Simulate SQL JOIN functions Use funnels to evaluate a series of related data Format NRQL for querying with the Event API Query components Every NRQL query will begin with a SELECT statement or a FROM clause. All other clauses are optional. The clause definitions below also contain example NRQL queries. Required: SELECT statement SELECT attribute ... SELECT function(attribute) ... The SELECT specifies what portion of a data type you want to query by specifying an attribute or a function. It's followed by one or more arguments separated by commas. In each argument you can: Get the values of all available attributes by using * as a wildcard. For example: SELECT * from Transaction. Get values associated with a specified attribute or multiple attributes specified in a comma separated list. Get aggregated values from specified attributes by selecting an aggregator function. Label the results returned in each argument with the AS clause. You can also use SELECT with basic math functions. Avg response time since last week This query returns the average response time since last week. SELECT average(duration) FROM PageView SINCE 1 week ago Required: FROM clause SELECT ... FROM data type ... Use the FROM clause to specify the data type you wish to query. You can start your query with FROM or with SELECT. You can merge values for the same attributes across multiple data types in a comma separated list. Query one data type This query returns the count of all APM transactions over the last three days: SELECT count(*) FROM Transaction SINCE 3 days ago Query multiple data types This query returns the count of all APM transactions and Browser events over the last three days: SELECT count(*) FROM Transaction, PageView SINCE 3 days ago SHOW EVENT TYPES clause SHOW EVENT TYPES... SHOW EVENT TYPES will return a list of all the data types present in your account for a specific time range. It is used as the first clause in a query instead of SELECT. In this context, \"event types\" refers to the data types you can access with a NRQL query. Data types in the last day This query will return all the data types present over the past day: SHOW EVENT TYPES SINCE 1 day ago WHERE clause Use the WHERE clause to filter results. NRQL returns the results that fulfill the condition(s) you specify in the clause. SELECT function(attribute) ... WHERE attribute [operator 'value' | IN ('value' [, 'value]) | IS [NOT] NULL ] [AND|OR ...] ... If you specify more than one condition, separate the conditions by the operators AND or OR. If you want to simulate a SQL join, use custom attributes in a WHERE or FACET clause. Operators that the WHERE clause accepts Description =, !=, <, <=, >, >= NRQL accepts standard comparison operators. Example: state = 'WA' AND Used to define an intersection of two conditions. OR Used to define a union of two conditions. IS NULL Determines if an attribute has a null value. IS NOT NULL Determines if an attribute does not have a null value. IN Determines if the string value of an attribute is in a specified set. Using this method yields better performance than stringing together multiple WHERE clauses. Example: animalType IN ('cat', 'dog', 'fish') NOT IN Determines if the string value of an attribute is not in a specified set. Using this method yields better performance than stringing together multiple WHERE clauses. Values must be in parentheses, separated by commas. For example: SELECT * FROM PageView WHERE countryCode NOT IN ('CA', 'WA') LIKE Determines if an attribute contains a specified sub-string. The string argument for the LIKE operator accepts the percent sign (%) as a wildcard anywhere in the string. If the substring does not begin or end the string you are matching against, the wildcard must begin or end the string. Examples: userAgentName LIKE 'IE%' IE IE Mobile userAgentName LIKE 'o%a%' Opera Opera Mini userAgentName LIKE 'o%a' Opera userAgentName LIKE '%o%a%' Opera Opera Mini Mozilla Gecko NOT LIKE Determines if an attribute does not contain a specified sub-string. RLIKE Determines if an attribute contains a specified Regex sub-string. Uses RE2 syntax. Examples: appName RLIKE 'z.*|q.*'' z-app q-app hostname RLIKE 'ip-10-351-[0-2]?[0-9]-.*' ip-10-351-19-237 ip-10-351-2-41 ip-10-351-24-238 ip-10-351-14-15 Note: Slashes must be escaped in the Regex pattern. For example, \\d must be \\\\d. Regex defaults to full-string matching, therefore ^ and $ are implicit and you do not need to add them. If the Regex pattern contains a capture group, the group will be ignored. That is, the group will not be captured for use later in the query. NOT RLIKE Determines if an attribute does not contain a specified Regex sub-string. Uses RE2 syntax. Example query with three conditions This query returns the browser response time for pages with checkout in the URL for Safari users in the United States and Canada over the past 24 hours. SELECT histogram(duration, 50, 20) FROM PageView WHERE countryCode IN ('CA', 'US') AND userAgentName='Safari' AND pageUrl LIKE '%checkout%' SINCE 1 day ago AS clause SELECT ... AS 'label' ... Use the AS clause to label an attribute, aggregator, step in a funnel, or the result of a math function with a string delimited by single quotes. The label is used in the resulting chart. Query using math function and AS This query returns the number of page views per session: SELECT count(*)/uniqueCount(session) AS 'Pageviews per Session' FROM PageView Query using funnel and AS This query returns a count of people who have visited both the main page and the careers page of a site over the past week: SELECT funnel(SESSION, WHERE name='Controller/about/main' AS 'Step 1', WHERE name = 'Controller/about/careers' AS 'Step 2') FROM PageView SINCE 1 week ago FACET clause SELECT ... FACET attribute ... Use FACET to separate and group your results by attribute values. For example, you could FACET your PageView data by deviceType to figure out what percentage of your traffic comes from mobile, tablet, and desktop devices. Use the LIMIT clause to specify how many facets appear (default is 10). For more complex grouping, use FACET CASES. FACET clauses support up to five attributes, separated by commas. The facets are sorted in descending order by the first field you provide in the SELECT clause. If you are faceting on attributes with more than 1,000 unique values, a subset of facet values is selected and sorted according to the query type. When selecting min(), max(), or count(), FACET uses those functions to determine how facets are picked and sorted. When selecting any other function, FACET uses the frequency of the attribute you are faceting on to determine how facets are picked and sorted. For more on faceting on multiple attributes, with some real-world examples, see this New Relic blog post. Faceted query using count() This query shows cities with the highest pageview counts. This query uses the total number of pageviews per city to determine how facets are picked and ordered. SELECT count(*) FROM PageView FACET city Faceted query using uniqueCount() This query shows the cities that access the highest number of unique URLs. This query uses the total number of times a particular city appears in the results to determine how facets are picked and ordered. SELECT uniqueCount(pageUrl) FROM PageView FACET city Grouping results across time Advanced segmentation and cohort analysis allow you to facet on bucket functions to more effectively break out your data. Cohort analysis is a way to group results together based on timestamps. You can separate them into buckets that cover a specified range of dates and times. FACET ... AS clause Use FACET ... AS to name facets using the AS keyword in queries. This clause is helpful for adding clearer or simplified names for facets in your results. It can also be used to rename facets in nested aggregation queries. FACET ... AS queries will change the facet names in results (when they appear as headers in tables, for example), but not the actual facet names themselves. FROM Transaction SELECT count(*) FACET response.headers.contentType AS 'content type' FACET CASES clause SELECT ... FACET CASES ( WHERE attribute operator value, WHERE attribute operator value, ... ) ... Use FACET CASES to break out your data by more complex conditions than possible with FACET. Separate multiple conditions with a comma ,. For example, you could query your PageView data and FACET CASES into categories like less than 1 second, from 1 to 10 seconds, and greater than 10 seconds. You can combine multiple attributes within your cases, and label the cases with the AS selector. Data points will be added to at most one facet case, the first facet case that they match. You may also use a time function with your attribute. Basic usage with WHERE SELECT count(*) FROM PageView FACET CASES (WHERE duration < 1, WHERE duration > 1 and duration < 10, WHERE duration > 10) Group based on multiple attributes This example groups results into one bucket where the transaction name contains login, and another where the URL contains login and a custom attribute indicates that the user was a paid user: SELECT count(*) FROM Transaction FACET CASES (WHERE name LIKE '%login%', WHERE name LIKE '%feature%' AND customer_type='Paid') Label groups with AS This example uses the AS selector to give your results a human-readable name: SELECT count(*) FROM Transaction FACET CASES (WHERE name LIKE '%login%' AS 'Total Logins', WHERE name LIKE '%feature%' AND customer_type='Paid' AS 'Feature Visits from Paid Users') FACET ... ORDER BY clause In NRQL, the default is for the first aggregation in the SELECT clause to guide the selection of facets in a query. FACET ... ORDER BY allows you to override this default behavior by adding an aggregate function with the ORDER BY modifier to specify how facets are selected. Specifically, the clause will override the priority by which facets are chosen to be in the final result before being limited by the LIMIT clause. This clause can be used in querying but not for alerts or streaming. This example shows how to use FACET ... ORDER BY to find the average durations of app transactions, showing the top 10 (default limit) highest durations by apps which have the highest response size. In this case, if FACET ... ORDER BY is not used, the query results will instead show the top 10 by highest durations, with response size being irrelevant to the app selection. FROM Transaction SELECT average(duration) TIMESERIES FACET appName ORDER BY max(responseSize) Because the operations are performed before the LIMIT clause is applied, FACET ... ORDER BY does not impact the sort of the final query results, which will be particularly noticeable in the results for non-timeseries queries. The ORDER BY modifier in this case works differently than the ORDER BY clause. When parsing queries that follow the format FACET attribute1 ORDER BY attribute2, New Relic will read these as FACET ... ORDER BY queries, but only if ORDER BY appears immediately after FACET. Otherwise ORDER BY will be interpreted by New Relic as a clause. LIMIT clause SELECT ... LIMIT count ... Use the LIMIT clause to control the maximum number of facet values returned by FACET queries or the maximum number of items returned by SELECT * queries. This clause takes a single integer value as an argument. If the LIMIT clause is not specified, or no value is provided, the limit defaults to 10 for FACET queries and 100 in the case of SELECT * queries. The maximum allowed value for the LIMIT clause is 2,000. Query using LIMIT This query shows the top 20 countries by session count and provides 95th percentile of response time for each country for Windows users only. SELECT uniqueCount(session), percentile(duration, 95) FROM PageView WHERE userAgentOS = 'Windows' FACET countryCode LIMIT 20 SINCE YESTERDAY OFFSET clause SELECT ... LIMIT count OFFSET count ... Use the OFFSET clause with LIMIT to control the portion of rows returned by SELECT * or SELECT column queries. Like the LIMIT clause, OFFSET takes a single integer value as an argument. OFFSET sets the number of rows to be skipped before the selected rows of your query are returned. This is constrained by LIMIT. OFFSET rows are skipped starting from the most recent record. For example, the query SELECT interestingValue FROM Minute_Report LIMIT 5 OFFSET 1 returns the last 5 values from Minute_Report except for the most recent one. ORDER BY clause The ORDER BY clause allows you to specify how you want to sort your query results in queries that select event attributes by row. This query orders transactions by duration. FROM Transaction SELECT appName, duration ORDER BY duration The default sort order is ascending, but this can be changed by adding the ASC or DESC modifiers. SINCE clause SELECT ... SINCE [numerical units AGO | phrase] ... The default value is 1 hour ago. Use the SINCE clause to define the beginning of a time range for the returned data. When using NRQL, you can set a UTC timestamp or relative time range. You can specify a timezone for the query but not for the results. NRQL results are based on your system time. See Set time range on dashboards and charts for detailed information and examples. UNTIL clause SELECT ... UNTIL integer units AGO ... The default value is NOW. Only use UNTIL to specify an end point other than the default. Use the UNTIL clause to define the end of a time range across which to return data. Once a time range has been specified, the data will be preserved and can be reviewed after the time range has ended. You can specify a UTC timestamp or relative time range. You can specify a time zone for the query but not for the results. The returned results are based on your system time. See Set time range on dashboards and charts for detailed information and examples. WITH TIMEZONE clause SELECT ... WITH TIMEZONE (selected zone) ... By default, query results are displayed in the timezone of the browser you're using. Use the WITH TIMEZONE clause to select a time zone for a date or time in the query that hasn't already had a time zone specified for it. For example, the query clause SINCE Monday UNTIL Tuesday WITH TIMEZONE 'America/New_York' will return data recorded from Monday at midnight, Eastern Standard Time, until midnight Tuesday, Eastern Standard Time. Available Time Zone Selections Africa/Abidjan Africa/Addis_Ababa Africa/Algiers Africa/Blantyre Africa/Cairo Africa/Windhoek America/Adak America/Anchorage America/Araguaina America/Argentina/Buenos_Aires America/Belize America/Bogota America/Campo_Grande America/Cancun America/Caracas America/Chicago America/Chihuahua America/Dawson_Creek America/Denver America/Ensenada America/Glace_Bay America/Godthab America/Goose_Bay America/Havana America/La_Paz America/Los_Angeles America/Miquelon America/Montevideo America/New_York America/Noronha America/Santiago America/Sao_Paulo America/St_Johns Asia/Anadyr Asia/Bangkok Asia/Beirut Asia/Damascus Asia/Dhaka Asia/Dubai Asia/Gaza Asia/Hong_Kong Asia/Irkutsk Asia/Jerusalem Asia/Kabul Asia/Katmandu Asia/Kolkata Asia/Krasnoyarsk Asia/Magadan Asia/Novosibirsk Asia/Rangoon Asia/Seoul Asia/Tashkent Asia/Tehran Asia/Tokyo Asia/Vladivostok Asia/Yakutsk Asia/Yekaterinburg Asia/Yerevan Atlantic/Azores Atlantic/Cape_Verde Atlantic/Stanley Australia/Adelaide Australia/Brisbane Australia/Darwin Australia/Eucla Australia/Hobart Australia/Lord_Howe Australia/Perth Chile/EasterIsland Etc/GMT+10 Etc/GMT+8 Etc/GMT-11 Etc/GMT-12 Europe/Amsterdam Europe/Belfast Europe/Belgrade Europe/Brussels Europe/Dublin Europe/Lisbon Europe/London Europe/Minsk Europe/Moscow Pacific/Auckland Pacific/Chatham Pacific/Gambier Pacific/Kiritimati Pacific/Marquesas Pacific/Midway Pacific/Norfolk Pacific/Tongatapu UTC See Set time range on dashboards and charts for detailed information and examples. WITH METRIC_FORMAT clause For information on querying metric data, see Query metrics. COMPARE WITH clause SELECT ... (SINCE or UNTIL) (integer units) AGO COMPARE WITH (integer units) AGO ... Use the COMPARE WITH clause to compare the values for two different time ranges. COMPARE WITH requires a SINCE or UNTIL statement. The time specified by COMPARE WITH is relative to the time specified by SINCE or UNTIL. For example, SINCE 1 day ago COMPARE WITH 1 day ago compares yesterday with the day before. The time range for theCOMPARE WITH value is always the same as that specified by SINCE or UNTIL. For example, SINCE 2 hours ago COMPARE WITH 4 hours ago might compare 3:00pm through 5:00pm against 1:00 through 3:00pm. COMPARE WITH can be formatted as either a line chart or a billboard: With TIMESERIES, COMPARE WITH creates a line chart with the comparison mapped over time. Without TIMESERIES, COMPARE WITH generates a billboard with the current value and the percent change from the COMPARE WITH value. Example: This query returns data as a line chart showing the 95th percentile for the past hour compared to the same range one week ago. First as a single value, then as a line chart. SELECT percentile(duration) FROM PageView SINCE 1 week ago COMPARE WITH 1 week AGO SELECT percentile(duration) FROM PageView SINCE 1 week ago COMPARE WITH 1 week AGO TIMESERIES AUTO TIMESERIES clause SELECT ... TIMESERIES integer units ... Use the TIMESERIES clause to return data as a time series broken out by a specified period of time. Since TIMESERIES is used to trigger certain charts, there is no default value. To indicate the time range, use integer units. For example: TIMESERIES 1 minute TIMESERIES 30 minutes TIMESERIES 1 hour TIMESERIES 30 seconds Use a set interval The value provided indicates the units used to break out the graph. For example, to present a one-day graph showing 30 minute increments: SELECT ... SINCE 1 day AGO TIMESERIES 30 minutes Use automatically set interval TIMESERIES can also be set to AUTO, which will divide your graph into a reasonable number of divisions. For example, a daily chart will be divided into 30 minute intervals and a weekly chart will be divided into 6 hour intervals. This query returns data as a line chart showing the 50th and 90th percentile of client-side transaction time for one week with a data point every 6 hours. SELECT average(duration), percentile(duration, 50, 90) FROM PageView SINCE 1 week AGO TIMESERIES AUTO Use max interval You can set TIMESERIES to MAX, which will automatically adjust your time window to the maximum number of intervals allowed for a given time period. This allows you to update your time windows without having to manually update your TIMESERIES buckets and ensures your time window is being split into the peak number of intervals allowed. The maximum number of TIMESERIES buckets that will be returned is 366. For example, the following query creates 4-minute intervals, which is the ceiling for a daily chart. SELECT average(duration) FROM Transaction since 1 day ago TIMESERIES MAX For functions such as average( ) or percentile( ), a large interval can have a significant smoothing effect on outliers. EXTRAPOLATE clause You can use this clause with these data types: Transaction TransactionError Custom events reported via APM agent APIs The purpose of EXTRAPOLATE is to mathematically compensate for the effects of APM agent sampling of event data so that query results more closely represent the total activity in your system. This clause will be useful when a New Relic APM agent reports so many events that it often passes its harvest cycle reporting limits. When that occurs, the agent begins to sample events. When EXTRAPOLATE is used in a NRQL query that supports its use, the ratio between the reported events and the total events is used to extrapolate a close approximation of the total unsampled data. When it is used in a NRQL query that doesn’t support its use or that hasn’t used sampled data, it has no effect. Note that EXTRAPOLATE is most useful for homogenous data (like throughput or error rate). It's not effective when attempting to extrapolate a count of distinct things (like uniqueCount() or uniques()). This clause works only with NRQL queries that use one of the following aggregator functions: apdex average count histogram sum percentage (if function it takes as an argument supports EXTRAPOLATE) rate (if function it takes as an argument supports EXTRAPOLATE) stddev Example of extrapolating throughput A query that will show the extrapolated throughput of a service named interestingApplication. SELECT count(*) FROM Transaction WHERE appName='interestingApplication' SINCE 60 minutes ago EXTRAPOLATE Example of extrapolating throughput as a time series A query that will show the extrapolated throughput of a service named interestingApplication by transaction name, displayed as a time series. SELECT count(*) FROM Transaction WHERE appName='interestingApplication' SINCE 60 minutes ago FACET name TIMESERIES 1 minute EXTRAPOLATE Query metric data There are several ways to query metric data using NRQL: Query metric timeslice data, which is reported by New Relic APM, Mobile, Browser Query the Metric data type, which is reported by some of our integrations and Telemetry SDKs For more on understanding metrics in New Relic, see Metric data types. Aggregator functions Use aggregator functions to filter and aggregate data in a NRQL query. Some helpful information about using aggregator functions: See the New Relic University tutorials for Filter queries, Apdex queries, and Percentile queries. Or, go to the full online course Writing NRQL queries. Data type \"coercion\" is not supported. Read about available type conversion functions. Cohort analysis functions appear on the New Relic Insights Cohort analysis page. The cohort functions aggregate transactions into time segments. Here are the available aggregator functions. The definitions below contain example NRQL queries. Examples: SELECT histogram(duration, 10, 20) FROM PageView SINCE 1 week ago apdex(attribute, t: ) Use the apdex function to return an Apdex score for a single transaction or for all your transactions. The attribute can be any attribute based on response time, such as duration or backendDuration. The t: argument defines an Apdex T threshold in seconds. The Apdex score returned by the apdex( ) function is based only on execution time. It does not account for APM errors. If a transaction includes an error but completes in Apdex T or less, that transaction will be rated satisfying by the apdex ( ) function. Get Apdex for specific customers If you have defined custom attributes, you can filter based on those attributes. For example, you could monitor the Apdex for a particularly important customer: SELECT apdex(duration, t: 0.4) FROM Transaction WHERE customerName='ReallyImportantCustomer' SINCE 1 day ago Get Apdex for specific transaction Use the name attribute to return a score for a specific transaction, or return an overall Apdex by omitting name. This query returns an Apdex score for the Controller/notes/index transaction over the last hour: SELECT apdex(duration, t: 0.5) from Transaction WHERE name='Controller/notes/index' SINCE 1 hour ago The apdex function returns an Apdex score that measures user satisfaction with your site. Arguments are a response time attribute and an Apdex T threshold in seconds. Get overall Apdex for your app This example query returns an overall Apdex for the application over the last three weeks: SELECT apdex(duration, t: 0.08) FROM Transaction SINCE 3 week ago average(attribute) Use the average( ) function to return the average value for an attribute. It takes a single attribute name as an argument. If a value of the attribute is not numeric, it will be ignored when aggregating. If data matching the query's conditions is not found, or there are no numeric values returned by the query, it will return a value of null. buckets(attribute, ceiling [,number of buckets]) Use the buckets() function to aggregate data split up by a FACET clause into buckets based on ranges. You can bucket by any attribute that is stored as a numerical value in the New Relic database. It takes three arguments: Attribute name Maximum value of the sample range. Any outliers will appear in the final bucket. Total number of buckets For more information and examples, see Split your data into buckets. bucketPercentile(attribute) The bucketPercentile( ) function is the NRQL equivalent of the histogram_quantile function in Prometheus. It is intended to be used with dimensional metric data. Instead of the quantile, New Relic returns the percentile, which is the quantile * 100. Use the bucketPercentile( ) function to calculate the quantile from the histogram data in a Prometheus format. It takes the bucket name as an argument and reports percentiles along the bucket's boundaries: SELECT bucketPercentile(duration_bucket) FROM Metric SINCE 1 day ago Optionally, you can add percentile specifications as an argument: SELECT bucketPercentile(duration_bucket, 50, 75, 90) FROM Metric SINCE 1 day ago Because multiple metrics are used to make up Prometheus histogram data, you must query for specific Prometheus metrics in terms of the associated . For example, to compute percentiles from a Prometheus histogram, with the prometheus_http_request_duration_seconds using NRQL, use bucketPercentile(prometheus_http_request_duration_seconds_bucket, 50). Note how _bucket is added to the end of the as a suffix. See the Prometheus.io documentation for more information. cardinality(attribute) Use the cardinality( ) function to obtain the number of combinations of all the dimensions (attributes) on a metric. It takes three arguments, all optional: Metric name: if present, cardinality( ) only computes the metric specified. Include: if present, the include list restricts the cardinality computation to those attributes. Exclude: if present, the exclude list causes those attributes to be ignored in the cardinality computation. SELECT cardinality(metric_name, include:{attribute_list}, exclude:{attribute_list}) count(*) Use the count( ) function to return a count of available records. It takes a single argument; either *, an attribute, or a constant value. Currently, it follows typical SQL behavior and counts all records that have values for its argument. Since count(*) does not name a specific attribute, the results will be formatted in the default \"humanize\" format. derivative(attribute [,time interval]) derivative() finds the rate of change for a given dataset. The rate of change is calculated using a least-squares regression to approximate the derivative. The time interval is the period for which the rate of change is calculated. For example, derivative(attributeName, 1 minute) will return the rate of change per minute. dimensions(include: {attributes}, exclude: {attributes}) Use the dimensions( ) function to return all the dimensional values on a data type. You can explicitly include or exclude specific attributes using the optional arguments: Include: if present, the include list limits dimensions( ) to those attributes. Exclude: if present, the dimensions( ) calculation ignores those attributes. FROM Metric SELECT count(node_filesystem_size) TIMESERIES FACET dimensions() When used with a FACET clause, dimensions( ) produces a unique timeseries for all facets available on the event type, similar to how Prometheus behaves with non-aggregated queries. earliest(attribute) Use the earliest( ) function to return the earliest value for an attribute over the specified time range. It takes a single argument. Arguments after the first will be ignored. If used in conjunction with a FACET it will return the most recent value for an attribute for each of the resulting facets. Get earliest country per user agent from PageView This query returns the earliest country code per each user agent from the PageView event. SELECT earliest(countryCode) FROM PageView FACET userAgentName eventType() ...WHERE eventType() = 'EventNameHere'... ...FACET eventType()... Use the eventType() function in a FACET clause to break out results by the selected data type or in a WHERE clause to filter results to a specific data type. This is particularly useful for targeting specific data types with the filter() and percentage() functions. In this context, \"event type\" refers to the types of data you can access with a NRQL query. Use eventType() in filter() function This query returns the percentage of total TransactionError results out of the total Transaction results. You can use the eventType() function to target specific types of data with the filter() function. SELECT 100 * filter(count(*), where eventType() = 'TransactionError') / filter(count(*), where eventType() = 'Transaction') FROM Transaction, TransactionError WHERE appName = 'App.Prod' TIMESERIES 2 Minutes SINCE 6 hours ago Use eventType() with FACET This query displays a count of how many records each data type (Transaction and TransactionError) returns. SELECT count(*) FROM Transaction, TransactionError FACET eventType() TIMESERIES filter(function(attribute), WHERE condition) Use the filter( ) function to limit the results for one of the aggregator functions in your SELECT statement. You can use filter() in conjunction with FACET or TIMESERIES. Analyze purchases that used offer codes You could use filter() to compare the items bought in a set of transactions for those using an offer code versus those who aren't: Use the filter( ) function to limit the results for one of the aggregator functions in your SELECT statement. funnel(attribute, steps) Use the funnel() function to generate a funnel chart. It takes an attribute as its first argument. You then specify steps as WHERE clauses (with optional AS clauses for labels) separated by commas. For details and examples, see the funnels documentation. getField(attribute, field) Use the getField() function to extract a field from complex metrics. It takes the following arguments: Metric type Supported fields summary count, total, max, min gauge count, total, max, min, latest distribution count, total, max, min counter count Examples: SELECT max(getField(mySummary, count)) from Metric SELECT sum(mySummary) from Metric where getField(mySummary, count) > 10 histogram(attribute, ceiling [,number of buckets]) Use the histogram( ) function to generate histograms. It takes three arguments: Attribute name Maximum value of the sample range Total number of buckets Histogram of response times from PageView events This query results in a histogram of response times ranging up to 10 seconds over 20 buckets. SELECT histogram(duration, 10, 20) FROM PageView SINCE 1 week ago Prometheus histogram buckets histogram( ) accepts Prometheus histogram buckets: SELECT histogram(duration_bucket, 10, 20) FROM Metric SINCE 1 week ago New Relic distribution metric histogram( ) accepts Distribution metric as an input: SELECT histogram(myDistributionMetric, 10, 20) FROM Metric SINCE 1 week ago keyset() Using keyset() will allow you to see all of the attributes for a given data type over a given time range. It takes no arguments. It returns a JSON structure containing groups of string-typed keys, numeric-typed keys, boolean-typed keys, and all keys. See all attributes for a data type This query returns the attributes found for PageView events from the last day: SELECT keyset() FROM PageView SINCE 1 day ago latest(attribute) Use the latest( ) function to return the most recent value for an attribute over a specified time range. It takes a single argument. Arguments after the first will be ignored. If used in conjunction with a FACET it will return the most recent value for an attribute for each of the resulting facets. Get most recent country per user agent from PageView This query returns the most recent country code per each user agent from the PageView event. SELECT latest(countryCode) FROM PageView FACET userAgentName max(attribute) Use the max( ) function to return the maximum recorded value of a numeric attribute over the time range specified. It takes a single attribute name as an argument. If a value of the attribute is not numeric, it will be ignored when aggregating. If data matching the query's conditions is not found, or there are no numeric values returned by the query, it will return a value of null. median(attribute) Use the median( ) function to return an attribute's median, or 50th percentile. For more information about percentile queries, see percentile(). The median( ) query is only available when using the query builder. Median query This query will generate a line chart for the median value. SELECT median(duration) FROM PageView TIMESERIES AUTO min(attribute) Use the min( ) function to return the minimum recorded value of a numeric attribute over the time range specified. It takes a single attribute name as an argument. If a value of the attribute is not numeric, it will be ignored when aggregating. If data matching the query's conditions is not found, or there are no numeric values returned by the query, it will return a value of null. percentage(function(attribute), WHERE condition) Use the percentage( ) function to return the percentage of a target data set that matches some condition. The first argument requires an aggregator function against the desired attribute. Use exactly two arguments (arguments after the first two will be ignored). If the attribute is not numeric, this function returns a value of 100%. percentile(attribute [, percentile [, ...]]) Use the percentile( ) function to return an attribute's approximate value at a given percentile. It requires an attribute and can take any number of arguments representing percentile points. The percentile() function enables percentiles to displays with up to three digits after the decimal point, providing greater precision. Percentile thresholds may be specified as decimal values, but be aware that for most data sets, percentiles closer than 0.1 from each other will not be resolved. Percentile display examples Use TIMESERIES to generate a line chart with percentiles mapped over time. Omit TIMESERIES to generate a billboard and attribute sheet showing aggregate values for the percentiles. If no percentiles are listed, the default is the 95th percentile. To return only the 50th percentile value, the median, you can also use median(). Basic percentile query This query will generate a line chart with lines for the 5th, 50th, and 95th percentile. SELECT percentile(duration, 5, 50, 95) FROM PageView TIMESERIES AUTO predictLinear(attribute, [,time interval]) predictLinear() is an extension of the derivative() function. It uses a similar method of least-squares linear regression to predict the future values for a dataset. The time interval is how far the query will look into the future. For example, predictLinear(attributeName, 1 hour) is a linear prediction 1 hour into the future of the query time window. Generally, predictLinear() is helpful for continuously growing values like disk space, or predictions on large trends. Since predictLinear() is a linear regression, familiarity with the dataset being queried helps to ensure accurate long-term predictions. Any dataset which grows exponentially, logarithmically, or by other nonlinear means will likely only be successful in very short-term predictions. New Relic recommends against using predictLinear in TIMESERIES queries. This is because each bucket will be making an individual prediction based on its relative timeframe within the query, meaning that such queries will not show predictions from the end of the timeseries forward. rate(function(attribute) [,time interval]) Use the rate( ) function to visualize the frequency or rate of a given query per time interval. For example, you might want to know the number of pageviews per minute over an hour-long period or the count of unique sessions on your site per hour over a day-long period. Use TIMESERIES to generate a line chart with rates mapped over time. Omit TIMESERIES to generate a billboard showing a single rate value averaged over time. Basic rate query This query will generate a line chart showing the rate of throughput for APM transactions per 10 minutes over the past 6 hours. SELECT rate(count(*), 10 minute) FROM Transaction SINCE 6 hours ago TIMESERIES round(attribute) Use the round( ) function to return the rounded value of an attribute. Optionally round( ) can take a second argument, to_nearest, to round the first argument to the closest multiple of the second one. to_nearest can be fractional. SELECT round(n [, to_nearest]) stddev(attribute) Use the stddev( ) function to return one standard deviation for a numeric attribute over the time range specified. It takes a single argument. If the attribute is not numeric, it will return a value of zero. stdvar(attribute) Use the stdvar( ) function to return the standard variance for a numeric attribute over the time range specified. It takes a single argument. If the attribute is not numeric, it will return a value of zero. sum(attribute) Use the sum( ) function to return the sum recorded values of a numeric attribute over the time range specified. It takes a single argument. Arguments after the first will be ignored. If the attribute is not numeric, it will return a value of zero. uniqueCount(attribute) Use the uniqueCount( ) function to return the number of unique values recorded for an attribute over the time range specified. To optimize query performance, this function returns approximate results for queries that inspect more than 256 unique values. uniques(attribute [,limit]) Use the uniques( ) function to return a list of unique values recorded for an attribute over the time range specified. When used along with the facet clause, a list of unique attribute values will be returned per each facet value. The limit parameter is optional. When it is not provided, the default limit of 1,000 unique attribute values per facet is applied. You may specify a different limit value, up to a maximum of 10,000. The uniques( ) function will return the first set of unique attribute values discovered, until the limit is reached. Therefore, if you have 5,000 unique attribute values in your data set, and the limit is set to 1,000, the operator will return the first 1,000 unique values that it discovers, regardless of their frequency. The maximum number of values that can be returned in a query result is the product of the uniques( ) limit times the facet limit. In the following query, the theoretical maximum number of values that can be returned is 5 million (5,000 x 1,000). From Transaction SELECT uniques(host,5000) FACET appName LIMIT 1000 However, depending on the data set being queried, and the complexity of the query, memory protection limits may prevent a very large query from being executed. Type conversion NRQL does not support \"coercion.\" This means that a float stored as a string is treated as a string and cannot be operated on by functions expecting float values. You can convert a string with a numeric value or a boolean with a string value to their numeric and boolean types with these functions: Use the numeric() function to convert a number with a string format to a numeric function. The function can be built into a query that uses math functions on query results or NRQL aggregator functions, such as average(). Use the boolean() function to convert a string value of \"true\" or \"false\" to the corresponding boolean value. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
+ "_index": "520d1d5d14cc8a32e600034b",
+ "_type": "520d1d5d14cc8a32e600034c",
+ "_score": 93.09097,
+ "_version": null,
+ "_explanation": null,
+ "sort": null,
+ "highlight": {
+ "title": "NRQLsyntax, clauses, and functions",
+ "sections": "NRQLsyntax, clauses, and functions",
+ "info": "New Relic Query Language (NRQL) dictionary of clauses and aggregator functions. ",
+ "category_0": "Query your data",
+ "category_1": "NRQL: New Relic Query Language",
+ "translation_ja_url": "https://docs.newrelic.co.jp/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions",
+ "body": " NRQL is used for, what data you can query with it, and basic NRQLsyntax Examine NRQL queries used to build New Relic charts Simulate SQL JOIN functions Use funnels to evaluate a series of related data Format NRQL for querying with the Event API Query components Every NRQL query will begin",
+ "breadcrumb": "Contents / Query your data / NRQL: New Relic Query Language / Get started"
+ },
+ "id": "5f2abcef28ccbcb0ee0c3aed"
},
{
"category_2": "Explore data",
@@ -6990,7 +7192,7 @@
"body": "New Relic Insights' Query page is one place you can run NRQL queries of your data. To get started: Go to insights.newrelic.com > Query, then use any of the available NRQL syntax and functions. Use the Query page to: Create and run queries of your data. View your query history. View favorite queries. Use the NRQL query to create, view, organize, and share Insights dashboards. For a library of educational videos about how to use New Relic Insights, visit learn.newrelic.com. Use NRQL query history To view up to twenty of your most recent queries, select the History tab directly below the query command line interface. Use the query history to adjust and improve recent queries. If you want to... Do this... Run recent queries Select a recent query from the history list. The query will appear on the command line, where it can be edited. Delete queries Mouse over a query in the history list so the delete [trash] icon appears. The query history only retains the twenty most recent queries, so it can be useful to delete unwanted queries to make room for queries you like. Favorite queries Mouse over a query in the history list and the favorite star icon appears. Then, to view and use your favorite queries, select the Favorites tab. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 72.56177,
+ "_score": 73.11534,
"_version": null,
"_explanation": null,
"sort": null,
@@ -7038,7 +7240,7 @@
"body": "One way to query your New Relic data is with the New Relic Query Language (NRQL). This document will introduce you to what NRQL is, why you'd use it, and basic syntax rules. What is NRQL? NRQL is New Relic's SQL-like query language. You can use NRQL to retrieve detailed New Relic data and get insight into your applications, hosts, and business-important activity. Reasons to use NRQL include: To answer a question for the purpose of troubleshooting or business analysis To create a new chart To make API queries of New Relic data (for example, using our NerdGraph API) NRQL is used behind the scenes to generate some New Relic charts: Some New Relic charts are built using NRQL. One way to start using NRQL is to view a chart's query and then edit it to make your own custom chart. Where can you use NRQL? You can use NRQL in these places: New Relic One query builder: Advanced mode is a NRQL query interface Basic mode provides a simplified query experience that doesn't require knowledge of NRQL but that uses NRQL to generate results New Relic Insights NerdGraph: our GraphQL-format API, which includes options for making NRQL queries one.newrelic.com > Query your data: You can run a NRQL query in both New Relic One and New Relic Insights. This NRQL query shows a count of distributed tracing spans faceted by their entity names. NRQL is one of several ways to query New Relic data. For more on all query options, see Query your data. What data can you query with NRQL? NRQL allows you to query these New Relic data types: Event data from all New Relic products, including: APM events, like Transaction New Relic Browser events, like PageView New Relic Mobile events, like Mobile Infrastructure events, like ProcessSample Synthetics events, like SyntheticCheck Custom events, like those reported by the Event API Metric timeslice data (metrics reported by New Relic APM, Browser, and Mobile) The Metric data type (metrics reported by the Metric API and data sources that use that API) The Span data type (distributed tracing data) The Log data type (data from New Relic Logs) Some data, like relationships between monitored entities, is not available via NRQL but is available using our NerdGraph API. Start using NRQL One way to start using NRQL and to understand what data you have available is to go to a NRQL interface (for example, the New Relic One query builder), type FROM, and press space. The interface will suggest available types of data: To see the attributes available for a specific data type, type FROM DATA_TYPE SELECT and press space. The interface will suggest available attributes. For example: To see the complete JSON associated with a data type, including all of its attributes, use the keyset() attribute. For example: FROM Transaction SELECT keyset() NRQL is used behind the scenes to build some New Relic charts and dashboards. One way to learn NRQL is to find one of these NRQL-generated charts and start playing with the NRQL to create new, customized queries and charts: Charts built with NRQL will have View query as an option. You can then edit and customize that query to see how your changes affect the resulting visualization. To explore your data without having to use NRQL, use the basic mode of New Relic One query builder. NRQL query examples Here's an example NRQL query of Transaction data, which is reported by New Relic APM. FROM Transaction SELECT average(duration) FACET appName TIMESERIES auto This would generate a chart that looks like: Here are some more query examples: Basic NRQL query of Browser data Here's a NRQL query of PageView data, which is reported by New Relic Browser. SELECT uniqueCount(user) FROM PageView WHERE userAgentOS = 'Mac' FACET countryCode SINCE 1 day ago LIMIT 20 Attribute name with a space in it If a custom attribute name has a space in it, use backticks around the attribute name: SELECT count(*) FROM Transaction FACET `Logged-in user` Querying multiple data sources To return data from two data sources, separate their data types with a comma. For example, this query returns a count of all APM transactions and Browser events over the last three days: SELECT count(*) FROM Transaction, PageView SINCE 3 days ago Query returning multiple columns To return multiple columns from a dataset, separate the aggregator arguments with a comma: SELECT function(attribute), function(attribute) ... FROM ... This query returns the minimum, average, and maximum duration for New Relic Browser PageView events over the last week: SELECT min(duration), max(duration), average(duration) FROM PageView SINCE 1 week ago See more NRQL query examples. NRQL syntax The syntax of a NRQL query is similar to standard SQL queries. Here is a breakdown of the structure of a NRQL query: SELECT function(attribute) [AS 'label'][, ...] FROM data type [WHERE attribute [comparison] [AND|OR ...]][AS 'label'][, ...] [FACET attribute | function(attribute)] [LIMIT number] [SINCE time] [UNTIL time] [WITH TIMEZONE timezone] [COMPARE WITH time] [TIMESERIES time] Basic rules include: NRQL condition Details Required values The SELECT statement and FROM clause are required. All other clauses are optional. You can start your query with either SELECT or FROM. Query string size The query string must be less than 4 KB. Case sensitivity The data type names and attribute names are case sensitive. NRQL clauses and functions are not case sensitive. Syntax for strings NRQL uses single quotes to designate strings. For example: ... where traceId = '030a573f0df02c57' Attribute names with spaces Use backticks `` to quote a custom attribute name that has a space in it. For example: ... FACET `Logged-in user` Data type coercion Insights does not support data type \"coercion.\" For more information, see Data type conversion. Use of math functions Basic and advanced math functions are supported in the SELECT statement. JOIN functions NRQL does not have the equivalent of the SQL JOIN function, but you can simulate a JOIN with custom attributes. Read more about NRQL syntax and functions. For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
"_index": "520d1d5d14cc8a32e600034b",
"_type": "520d1d5d14cc8a32e600034c",
- "_score": 71.450455,
+ "_score": 71.97618,
"_version": null,
"_explanation": null,
"sort": null,
@@ -7054,257 +7256,5 @@
},
"id": "5f2abd47196a67747343fbe1"
}
- ],
- "/build-apps/set-up-dev-env": [
- {
- "sections": [
- "New Relic One CLI reference",
- "Installing the New Relic One CLI",
- "Tip",
- "New Relic One CLI Commands",
- "Get started",
- "Configure your CLI preferences",
- "Set up your Nerdpacks",
- "Manage your Nerdpack subscriptions",
- "Install and manage plugins",
- "Manage catalog information"
- ],
- "title": "New Relic One CLI reference",
- "type": "developer",
- "tags": [
- "New Relic One app",
- "nerdpack commands"
- ],
- "external_id": "858339a44ead21c83257778ce60b4c352cd30d3b",
- "image": "https://developer.newrelic.com/static/2c6d337608b38a3312b4fc740afe6167/7272b/developercenter.png",
- "url": "https://developer.newrelic.com/explore-docs/nr1-cli/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:51:10Z",
- "document_type": "page",
- "popularity": 1,
- "info": "An overview of the CLI to help you build, deploy, and manage New Relic apps.",
- "body": "New Relic One CLI reference To build a New Relic One app, you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app. We provide a variety of tools for building apps, including the New Relic One CLI (command line interface). This page explains how to use CLI commands to: Generate Nerdpack/Nerdlet templates Locally serve Nerdpacks (when developing) Publish and deploy Subscribe to Nerdpacks Add screenshots and metadata to the catalog Installing the New Relic One CLI In New Relic, click Apps and then in the New Relic One catalog area, click the Build your own application launcher and follow the quick start instructions. The quick start automatically generates an API key for the account you select, and gives you the pre-populated commands to create a profile, generate your first \"Hello World\" app, and serve it locally. Tip Use the NR1 VS Code extension to build your apps. New Relic One CLI Commands This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. For details on user permissions, see Authentication and permissions. For more on how to serve and publish your application, see our guide on Deploying your New Relic One app. Get started nr1 help Shows all nr1 commands or details about each command. nr1 update Updates to the latest version of the CLI. nr1 create Creates a new component from a template (Nerdpack, Nerdlet, launcher, or catalog). nr1 profiles Manages the profiles you use to run CLI commands. nr1 autocomplete Displays autocomplete installation instructions. nr1 nrql Fetches data using NRQL (New Relic query language). Configure your CLI preferences nr1 config:set Sets a specific configuration value. nr1 config:get Shows a specific configuration. nr1 config:list Lists your configuration choices. nr1 config:delete Removes the value of a specific configuration. Set up your Nerdpacks nr1 nerdpack:build Assembles your Nerdpack into bundles. nr1 nerdpack:clone Clones an open source Nerdpack from our GitHub repository. nr1 nerdpack:serve Serves your Nerdpack for testing and development purposes. nr1 nerdpack:uuid Shows or regenerates the UUID of a Nerdpack. nr1 nerdpack:publish Publishes your Nerdpack to New Relic. nr1 nerdpack:deploy Deploys a Nerdpack version to a specific channel. nr1 nerdpack:undeploy Undeploys a Nerdpack version from a specific channel. nr1 nerdpack:clean Cleans your developtment folders. nr1 nerdpack:validate Validates the contents of your Nerdpack. nr1 nerdpack:info Shows the state of your Nerdpack in the New Relic's registry. Manage your Nerdpack subscriptions nr1 subscription:set Subscribes your account to a Nerdpack and channel. nr1 subscription:list Lists all the Nerdpacks your account is subscribed to. nr1 subscription:unset Unsubscribes your account from a Nerdpack. Install and manage plugins nr1 plugins:install Installs a plugin into the CLI. nr1 plugins:link Links a plugin into the CLI for development. nr1 plugins:update Updates your installed plugins. nr1 plugins:uninstall Removes a plugin from the CLI. Manage catalog information nr1 catalog:info Shows the Nerdpack info stored in the catalog. nr1 catalog:submit Gathers and submits the catalog info on the current folder.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 336.49734,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "NewRelicOneCLI reference",
- "sections": "NewRelicOneCLI reference",
- "info": "An overview of the CLI to help you build, deploy, and manage NewRelic apps.",
- "tags": "NewRelicOne app",
- "body": "NewRelicOneCLI reference To build a NewRelicOne app, you must install the NewRelicOneCLI. The CLI helps you build, publish, and manage your NewRelic app. We provide a variety of tools for building apps, including the NewRelicOneCLI (command line interface). This page explains how to use"
- },
- "id": "5efa989e28ccbc535a307dd0"
- },
- {
- "sections": [
- "Add tables to your New Relic One application",
- "Before you begin",
- "Clone and set up the example application",
- "Work with table components",
- "Next steps"
- ],
- "title": "Add tables to your New Relic One application",
- "type": "developer",
- "tags": [
- "table in app",
- "Table component",
- "TableHeaderc omponent",
- "TableHeaderCell component",
- "TableRow component",
- "TableRowCell component"
- ],
- "external_id": "7ff7a8426eb1758a08ec360835d9085fae829936",
- "image": "https://developer.newrelic.com/static/e637c7eb75a9dc01740db8fecc4d85bf/1d6ec/table-new-cells.png",
- "url": "https://developer.newrelic.com/build-apps/howto-use-nrone-table-components/",
- "published_at": "2020-09-21T01:50:11Z",
- "updated_at": "2020-09-17T01:48:42Z",
- "document_type": "page",
- "popularity": 1,
- "info": "Add a table to your New Relic One app.",
- "body": "Add tables to your New Relic One application 30 min Tables are a popular way of displaying data in New Relic applications. For example, with the query builder you can create tables from NRQL queries. Whether you need to have more control over tables or you're importing third-party data, you can build your own tables into your New Relic One application. In this guide, you are going to build a sample table using various New Relic One components. Before you begin If you haven't already installed the New Relic One CLI, step through the quick start in New Relic One. This process also gets you an API key. In addition, to complete the steps in this guide, you need a GitHub account and Node.js installed on your machine. See Setting up your development environment for more info. Clone and set up the example application Step 1 of 4 Clone the nr1-how-to example application from GitHub to your local machine. Then, navigate to the app directory. The example app lets you experiment with tables. git clone https://github.com/newrelic/nr1-how-to.git` cd nr1-how-to/create-a-table/nerdlets/create-a-table-nerdlet` Copy Step 2 of 4 Edit the index.json file and set this.accountId to your Account ID as shown in the example. export default class Nr1HowtoAddTimePicker extends React.Component { constructor(props){ super(props) this.accountId = YOUR_ACCOUNT_ID; } ... } Copy Step 3 of 4 Run the demo application Change the directory back to nr1-how-to/create-a-table. Before you can load the demo application, you need to update its unique id by invoking the New Relic One CLI. Once you've assigned a new UUID to the app, install the dependencies and serve the demo app locally, so that you can test any change live in your browser. nr1 nerdpack:uuid -gf # Update the app unique ID npm install # Install dependencies nr1 nerdpack:serve # Serve the demo app locally Copy Step 4 of 4 Open one.newrelic.com/?nerdpacks=local in your browser. Click Apps, and then in the Your apps section, you should see a Create a table launcher. That's the demo application you're going to work on. Go ahead and select it. Have a good look at the demo app. There's a TableChart on the left side named Transaction Overview, with an AreaChart next to it. You'll use Table components to add a new table in the second row. Work with table components Step 1 of 10 Navigate to the nerdlets/create-a-table-nerdlet subdirectory and open the index.js file. Add the following components to the import statement at the top of the file so that it looks like the example: Table TableHeader TableHeaderCell TableRow TableRowCell import { Table, TableHeader, TableHeaderCell, TableRow, TableRowCell, PlatformStateContext, Grid, GridItem, HeadingText, AreaChart, TableChart, } from 'nr1'; Copy Step 2 of 10 Add a basic Table component Locate the empty GridItem in index.js: This is where you start building the table. Add the initial
component. The items property collects the data by calling _getItems(), which contains sample values.
; Copy Step 3 of 10 Add the header and rows As the Table component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows. Inside of the Table component, add the TableHeader and then a TableHeaderCell child for each heading. Since you don't know how many rows you'll need, your best bet is to call a function to build as many TableRows as items returned by _getItems(). ApplicationSizeCompanyTeamCommit; { ({ item }) => ( {item.name}{item.value}{item.company}{item.team}{item.commit} ); } Copy Step 4 of 10 Take a look at the application running in New Relic One: you should see something similar to the screenshot below. Step 5 of 10 Replace standard table cells with smart cells The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names. The table you've just created contains columns that can benefit from those components: Application (an entity name) and Size (a metric). Before you can use EntityTitleTableRowCell and MetricTableRowCell, you have to add them to the import statement first. import { EntityTitleTableRowCell, MetricTableRowCell, ... /* All previous components */ } from 'nr1'; Copy Step 6 of 10 Update your table rows by replacing the first and second TableRowCells with entity and metric cells. Notice that EntityTitleTableRowCell and MetricTableRowCell are self-closing tags. { ({ item }) => ( {item.company}{item.team}{item.commit} ); } Copy Step 7 of 10 Time to give your table a second look: The cell components you've added take care of properly formatting the data. Step 8 of 10 Add some action to your table! Tables are great, but interactive tables can be better: As a last update, you are going to allow users to act on each data row. Add the _getActions() method to your index.js file, right before _getItems(). As you may have guessed from the code, _getActions() spawns an alert box when you click Team or Commit cells. _getActions() { return [ { label: 'Alert Team', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__ALERT, onClick: (evt, { item, index }) => { alert(`Alert Team: ${item.team}`); }, }, { label: 'Rollback Version', iconType: TableRow.ACTIONS_ICON_TYPE.INTERFACE__OPERATIONS__UNDO, onClick: (evt, { item, index }) => { alert(`Rollback from: ${item.commit}`); }, }, ]; } Copy Step 9 of 10 Find the TableRow component in your return statement and point the actions property to _getActions(). The TableRow actions property defines a set of actions that appear when the user hovers over a table row. Actions have a mandatory text and an onClick callback, but can also display an icon or be disabled if needed. Copy Step 10 of 10 Go back to your application and try hovering over any of the rows: Notice how the two available actions appear. When you click them, a function triggers with the selected row data as an argument, and an alert displays in your browser. Next steps You've built a table into a New Relic One application, using components to format data automatically and provide contextual actions. Well done! Keep exploring the Table components, their properties, and how to use them, in our SDK documentation.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 169.73636,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "title": "Add tables to your NewRelicOne application",
- "sections": "Add tables to your NewRelicOne application",
- "info": "Add a table to your NewRelicOne app.",
- "body": " build your own tables into your NewRelicOne application. In this guide, you are going to build a sample table using various NewRelicOne components. Before you begin If you haven't already installed the NewRelicOneCLI, step through the quick start in NewRelicOne. This process also gets you"
- },
- "id": "5efa989ee7b9d2ad567bab51"
- },
- {
- "category_2": "Configuration",
- "nodeid": 1766,
- "sections": [
- ".NET agent",
- "Getting started",
- "Install",
- "Azure installation",
- "Other installation",
- "Configuration",
- "Other features",
- "Custom instrumentation",
- "API guides",
- ".NET agent API",
- "Attributes",
- "Troubleshooting",
- "Azure troubleshooting",
- ".NET agent configuration",
- "Configuration overview",
- "Configuration methods and precedence levels",
- "Required environment variables",
- "Setup options",
- "Configuration element",
- "Service element",
- "Obscuring key element",
- "Proxy element",
- "Log element",
- "Application element (required)",
- "Data transmission element",
- "Host name",
- "Cloud platform utilization",
- "Instrumentation options",
- "Instrumentation element",
- "Applications element (instrumentation)",
- "Attributes element",
- "Feature options",
- "App pools",
- "Cross application traces",
- "Error collection",
- "High security mode",
- "Strip exception messages",
- "Transaction events",
- "Custom events",
- "Custom parameters",
- "Labels",
- "Browser instrumentation",
- "Slow queries",
- "Transaction traces",
- "Datastore tracer",
- "Distributed tracing",
- "Infinite Tracing",
- "Span events",
- "Settings in app.config or web.config",
- "Settings in appsettings.json",
- "For more help"
- ],
- "title": ".NET agent configuration",
- "category_0": "APM agents",
- "type": "docs",
- "category_1": ".NET agent",
- "external_id": "4fdfba60e3830d7bed15770bb5e749dbdd1feb6a",
- "image": "https://docs.newrelic.com/sites/default/files/thumbnails/image/net-agent-config-settings-precedence_0.png",
- "url": "https://docs.newrelic.com/docs/agents/net-agent/configuration/net-agent-configuration",
- "published_at": "2020-09-20T17:23:14Z",
- "updated_at": "2020-09-20T17:23:13Z",
- "breadcrumb": "Contents / APM agents / .NET agent / Configuration",
- "document_type": "page",
- "popularity": 1,
- "info": "How to configure the New Relic .NET agent using newrelic.config, including startup and instrumentation options, and disabling unwanted features.",
- "body": "This document contains the configuration options for the APM .NET agent. Configuration overview APM agent configuration options allow you to control some aspects of how the agent behaves. Some of these config options are part of the basic install process (like setting your license key and app name), but most are more advanced settings, such as: setting a log level, setting up proxy host access, excluding certain attributes, and enabling distributed tracing. The .NET agent gets its configuration from the newrelic.config file, which is generated as part of the install process. By default, only a global newrelic.config file is created, but you can also create app-local newrelic.config files for finer control over a multi-app system. Other ways to set config options include: using environment variables, or setting server-side configuration from the UI. For more on the various config options and what overrides what, see Config settings precedence. Support for both .NET Framework and .NET Core use the same configuration options and have the same APM features, unless otherwise stated. If you make changes to the config file and want to validate that it's in the right format, you can check it against the XSD file (for example, at C:\\ProgramData\\New Relic\\.NET Agent\\newrelic.xsd for Windows) with any XSD validator. For IIS: after you change your newrelic.config or app.config file, perform an IISRESET from an administrative command prompt. Log level adjustments do not require a reset. Configuration methods and precedence levels Upon installation, the .NET agent's configuration file (newrelic.config) applies to all monitored applications, but you can configure the agent in other ways. Here's a diagram showing how different configuration options take precedence over one another: This diagram explains the order of precedence for different ways you might configure the .NET agent. Here are details about the configuration methods shown in the diagram, and their precedence levels: .NET configuration Details and precedence web.config or app.config or appsettings.json Configuration settings set in these files take highest precedence. However, if the agent is disabled in the local or global newrelic.config, the NewRelic.AgentEnabled settings in these files will be ignored. Environment variables Second-highest precedence. For more about these, see .NET environment variables. Server-side configuration Third-highest precedence. A limited number of server-side configuration settings are available; the other settings will come from other configuration sources. App-local newrelic.config Fourth-highest precedence. You can create app-local newrelic.config files to configure individual apps on a multi-app system. These local configuration files override settings in the global newrelic.config file. The agent looks for app-local config files in the following directories, in this order: A directory specified in your web.config or app.config file with the NewRelic.ConfigFile property The web app's root directory (with the app.config or web.config) The directory containing your app's executable file Note that the app-local config file must be complete and validate against the XSD file (for example, at C:\\ProgramData\\New Relic\\.NET Agent\\newrelic.xsd for Windows). Default (global) newrelic.config Default source and the lowest precedence. Will configure all applications on a host in the absence of other config files. The global config file is located in the New Relic agent home directory: %PROGRAMDATA%\\New Relic\\.NET Agent Required environment variables New Relic's .NET agent relies on environment variables to tell the .NET Common Language Runtime (CLR) to attach New Relic to your processes. Some .NET agent install procedures (like the MSI installer) will automatically set these variables for you; some procedures will require you to manually set them. Security recommendation: You should consider what users can set system environment variables. You should also secure the accounts under which your applications execute to prevent user environment variables overriding system environment variables .NET Framework environment variables For .NET Framework, the following variables are required: COR_ENABLE_PROFILING=1 COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41} NEWRELIC_INSTALL_PATH=path\\to\\agent\\directory The .NET agent installer will add these to IIS or as system-wide environment variables. .NET Core environment variables For .NET Core, the following variables are required: Linux: CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} CORECLR_NEWRELIC_HOME=path/to/agent/directory CORECLR_PROFILER_PATH=\"${CORECLR_NEWRELIC_HOME}/libNewRelicProfiler.so\" Windows: CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} NEWRELIC_INSTALL_PATH=path\\to\\agent\\directory CORECLR_NEWRELIC_HOME=path\\to\\agent\\directory The .NET agent installer will add these to IIS or as system-wide environment variables. If your system has previously used monitoring services (non-New Relic), you may have a \"profiler conflict\" when trying to install and use the New Relic agent. More details: Profiler conflict explanation New Relic’s .NET agents rely on environment variables to tell the .NET Common Language Runtime (CLR) to load New Relic into your processes. The install-related environment variables are Microsoft variables, not New Relic variables. They can be used by other .NET profilers, and only one profiler can be attached to a process at a time. For this reason, if you have used previous application monitoring products, you may have profiler conflicts. For specific install instructions, see the .NET agent install documentation. Setup options Use these options to setup and configure your agent. The New Relic .NET agent supports the following categories of setup options: Multiple applications Configuration element Service element Obscuring key element Proxy element Log element Application element (configuration) Data transmission element Host name Configuration element The root element of the configuration document is a configuration element. The configuration element supports the following attributes: agentEnabled Type Boolean Default true Enable or disable the New Relic agent. maxStackTraceLines Type Integer Default 80 The maximum number of stack frames to trace in any stack dump. timingPrecision Type String Default low Controls the precision of the timers. High precision will provide better data, but at a lower execution speed. Possible values are high and low. Service element The first child of the configuration element is a service element. The service element configures the agent's connection to the New Relic service. The service element supports the following attributes: licenseKey (required) Type String Default (none) Your New Relic license key. New Relic uses the license key to match your app's data to the correct account in the UI. sendEnvironmentInfo Type Boolean Default true Instructs the agent to record execution environment information. Environment information includes operating system, agent version, and which assemblies are available. syncStartup Type Boolean Default false Block application startup until the agent connects to New Relic. If set to true, the first transaction may take substantially longer to complete, because it is blocked until the connection to New Relic is finished. sendDataOnExit Type Boolean Default false Block application shutdown until the agent sends all data from the latest harvest cycle. sendDataOnExitThreshold Type Integer Default 60000 Unit Milliseconds The minimum amount of time the process must run before the agent blocks it from shutting down. This setting only applies when sendDataOnExit is true. requestTimeout Type Integer Default 2000 (sendDataOnExit enabled) 120000 (sendDataOnExit disabled) Unit Milliseconds The agent's request timeout when communicating with New Relic. autoStart Type Boolean Default True Automatically start the .NET agent when the first instrumented method is hit. ssl (DEPRECATED) Type Boolean Default true The option to disable SSL is valid only for .NET agent versions 7.x and earlier. .NET agent version 8.x and higher communicate only via SSL. The agent communicates with New Relic via HTTPS by default, and New Relic requires HTTPS for all traffic to APM and the New Relic REST API. Obscuring key element The obscuringKey element is an optional child of the service element. The .NET Agent uses this value to deobfuscate supported configuration values. For example, when an obfuscated proxy password is supplied, it will be deobfuscated using this key. OBSCURING_KEY The obscuring key may also be configured by setting the NEW_RELIC_CONFIG_OBSCURING_KEY environment variable. Security Recommendation: The placement of the obscuring Key in the same configuration file as an obfuscated value may pose a security risk. Consider placing the obscuring key in an environment variable and limiting access to environment variables within your environment. Proxy element The proxy element is an optional child of the service element. The proxy element is used when the agent communicates to the New Relic back-end service via a proxy. The proxy element supports the following attributes: host Type String Default (none) Defines the proxy host. port Type Integer Default 8080 Defines the proxy port. uriPath Type String Default (none) Optionally define a proxy URI path. domain Type String Default (none) Optionally define a domain to use when authenticating with the proxy server. user Type String Default (none) Optionally define a user name for authentication. password Type String Default (none) Optionally define a password for authentication. passwordObfuscated Type String Default (none) For additional security, the .NET Agent supports the use of an obfuscated proxy password with the passwordObfuscated attribute. The obfuscated proxy password is generated using the following New Relic CLI command: newrelic agent config obfuscate --key OBSCURING_KEY --value \"CLEAR_TEXT_PROXY_PASSWORD\" When using an obfuscated proxy password, the obscuring key must also be configured. Log element The log element is a child of the configuration element. The log element configures New Relic's logging . The agent generates its own log file to keep its logging information separate from your application's logs. The log element supports the following attributes: level Type String Default info Defines the level of detail recorded in the log file. Possible values, in increasing order of detail, are: off error warn info debug finest all Increasing the log level will increase New Relic's performance impact. auditLog Type Boolean Default false Records all data sent to and received from New Relic in both an auditlog log file and the standard log file. console Type Boolean Default false Send log messages to the console, in addition to the log file. directory Type String Default C:\\ProgramData\\New Relic\\.NET Agent\\Logs The directory to hold log files generated by the agent. If this is omitted, then a directory named logs in the New Relic agent install area will be used by default. fileName Type String Default (none) Defines a name for the log file. If you do not define a fileName, the name is derived from the name of the monitored process. Application element (required) The application element is a child of the configuration element. This required element defines your application name, and disables or enables sampling. name Type String Default My Application The name of your .NET application is a child of the application element. New Relic will aggregate your data according to this name. For example, if you have two running applications named AppA and AppB, you will see two applications in the New Relic interface: AppA and AppB. You can also assign up to three names to your app. The first name is the primary name. For example: MY APPLICATION PRIMARYSECOND APP NAMETHIRD APP NAME disableSamplers Type Boolean Default false Samplers collect information about memory and CPU consumption. Set this to true to disable sampling. Data transmission element The dataTransmission element is a child of the configuration element. This element affects how data is sent to New Relic and can be used if you have specific data transmission requirements. The dataTransmission element supports the following attributes: putForDataSend Type Boolean Default false Defines the HTTP method used when sending data to New Relic. Set this to true to enable using the PUT method when sending data. The POST method is used by default. Host name If the default host name label in the APM UI is not useful, you can decorate that name in the New Relic UI with a display name. After the application process is restarted and the .NET agent is reporting again, the display name will appear in the Servers dropdown list. This host name setting does not affect the list of hosts on your application's Summary page. To set a display name, choose one of the following options. The environment variable takes precedence over the config file value. Then restart your application to see your changes in the New Relic UI. Set using config file Set the displayName attribute in the processHost element in newrelic.config. The processHost element is a child of the configuration element. Set using environment variable Set the NEW_RELIC_PROCESS_HOST_DISPLAY_NAME environment variable: NEW_RELIC_PROCESS_HOST_DISPLAY_NAME = \"CUSTOM_NAME\" Cloud platform utilization Configures the utilization configuration element to control how the agent collects utilization information and sends it to the New Relic service to determine pricing. The agent can collect information from Amazon Web Services (AWS) EC2 instances, Docker containers, Azure, Google Cloud Platform, Pivotal Cloud Foundry, and Kubernetes. detectAws Type Boolean Default true Determines whether the agent polls AWS metadata API. detectAzure Type Boolean Default true Determines whether the agent polls Azure metadata API. detectGcp Type Boolean Default true Determines whether the agent polls GCP metadata API. detectPcf Type Boolean Default true Determines whether the agent polls PCF information from environment variables. detectDocker Type Boolean Default true Determines whether the agent reads Docker information from the file system. detectKubernetes Type Boolean Default true Determines whether the agent polls Kubernetes information from environment variables. Instrumentation options Use these options to configure which elements of your application and environment to instrument. New Relic for .NET supports the following categories of instrumentation options: Instrumentation element Applications element (instrumentation) Attributes element Instrumentation element The instrumentation element is a child of the configuration element. By default, the .NET agent instruments IIS asp worker processes and Azure web and worker roles. To instrument other processes, see Instrumenting custom applications. Applications element (instrumentation) The applications element is a child of the instrumentation element. The applications element specifies which non-web apps to instrument. It contains a name attribute. This is not the same as the application (configuration) element, which is a child of the configuration element. Attributes element An attribute is a key/value pair that determines the properties of an event or transaction. Each attribute is sent to APM transaction traces, APM error traces, Transaction events, TransactionError events, or PageView events. The primary attributes element enables or disables attribute collection for the .NET agent, and defines specific attributes to collect or exclude. You can also configure attribute settings based on their destination: Error collection, transaction traces, Browser instrumentation, and transaction events. In this example, the agent excludes all attributes whose key begins with myApiKey (myApiKey.bar, myApiKey.value), but collects the custom attribute myApiKey.foo. myApiKey.*myApiKey.foo You can view the .NET APM attributes on the .NET agent attributes page. You can also define custom attributes with the agent API call AddCustomParameter. enabled Type Boolean Default true Enable or disable attribute collection. When set to false in the primary attribute element, this setting overrides all attribute settings for individual destinations. include Type String Default (none) If attributes are enabled, the agent will collect all attribute keys specified in this list. To specify multiple attribute keys, specify each individually. You can also use a * wildcard character at the end of a key to match multiple attributes (for example, myApiKey.*). For more information, see Attribute rules. exclude Type String Default (none) If attributes are enabled, the agent will not collect attribute keys specified in this list. To specify multiple attribute keys, specify each individually. You can also use a * wildcard character at the end of a key to match multiple attributes (for example, myApiKey.*). For more information, see Attribute rules. Feature options Use these options to enable, disable, and configure New Relic features. New Relic for .NET allows you to configure the following features: App pools Cross application traces Error collection High security mode Strip exception messages Transaction events Custom events Custom parameters Labels Browser instrumentation Slow Queries Transaction traces Datastore tracer Distributed tracing Span events App pools This is only applicable to a system's global config file. The applicationPools element is a child of the configuration element. The applicationPools element specifies for the profiler exactly which application pools to instrument and uses the same name as the IIS application pool name. This configuration element is useful when you may need to instrument only a small subset of your app pools. For example, a given server might have several hundred application pools, but only a few of those pools need to be instrumented by the .NET agent. Here is an example of disabling instrumentation for specific application pools: Here is an example of disabling instrumentation for all application pools currently executing on the server and enabling instrumentation for specific application pools: The applicationPools element supports the following elements: defaultBehavior Type Boolean Default false Defines how the .NET agent will behave on a \"global\" level for application pools served via IIS. The .NET agent instruments all application pools by default. When true, application pools listed under applicationPool with an instrument attribute set to false will not be instrumented. Essentially, when set to false, the application pool list acts as an allow list. When set to true, the application pool list acts as a deny list. applicationPool Defines instrumentation behavior for a specific application pool. The name attribute is the name of an application pool. Enable or disable profiling in the instrument attribute. Define this application in the name attribute. Cross application traces The crossApplicationTracer element is a child of the configuration element. crossApplicationTracer links transaction traces across applications. When linked in a service-oriented architecture, all instrumented applications that communicate with each other via HTTP will now \"link\" transaction traces with the applications that they call and the applications they are called by. Cross application tracing makes it easier to understand the performance relationship between services and applications. The crossApplicationTracer element supports the following attribute: enabled Type Boolean Default true Enable or disable cross application tracing Error collection The errorCollector element is a child of the configuration element. errorCollector configures error collection, which captures information about uncaught exceptions and sends them to New Relic. System.IO.FileNotFoundExceptionSystem.Threading.ThreadAbortExceptionIgnore messageIgnore too401404System.ArgumentNullExceptionSystem.ArgumentOutOfRangeExceptionExpected messageExpected too403,500-505myApiKey.*myApiKey.foo For an overview of error configuration in APM, see Manage errors in APM. The errorCollector element supports the following elements and attributes: enabled Type Boolean Default true Enable or disable the error collector. captureEvents Type Boolean Default true Enable or disable the capturing of error events. maxEventSamplesStored Type Integer Default 100 Reservoir limit for error events. ignoreClasses A list of fully qualified class names to be ignored. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used ignoreMessages An optional map of fully qualified class names to list of strings matching a substring of the message of an error. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used ignoreErrors (DEPRECATED) Type String Default (none) Lists specific exceptions to not report to New Relic. The full name of the exception should be used, such as System.IO.FileNotFoundException. ignoreStatusCodes Type String Default (none) Lists specific HTTP error codes to not report to New Relic. You can use standard integral HTTP error codes, such as just 401, or you may use Microsoft full status codes with decimal points, such as 401.4 or 403.18. expectedClasses A list of fully qualified class names to be marked as expected. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used expectedMessages An optional map of fully qualified class names to list of strings matching a substring of the message of an error. The maximum number of error class and message combinations that SHOULD be reported is 50. If more than 50 are listed, then only the first 50 SHOULD be used expectedStatusCodes A comma separated list of status codes. The list may include integer ranges, using a single dash (-) and will be inclusive of both the starting and ending integer in the range. attributes Use this sub-element to customize your agent attribute settings for error traces. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. High security mode The highSecurity element is a child of the configuration element. To enable high security mode, set this property to true and enable high security property in the New Relic user interface. Enabling high security means SSL is turned on, request parameters and custom parameters are not collected, strip exception messages is enabled, and queries cannot be sent to New Relic in their raw form. enabled Type Boolean Default false Enable or disable high security mode. Example: Strip exception messages The stripExceptionMessages element is a child of the configuration element. To enable strip exception messages, set this property to true. By default, this is set to false, which means that the agent sends messages from all exceptions to the New Relic collector. If you enable high security mode, this is automatically changed to true, and the agent strips the messages from exceptions. enabled Type Boolean Default false Enable or disable strip exception messages. Example: Transaction events The transactionEvents element is a child of the configuration element. Use transactionEvents to configure transaction events. myApiKey.*myApiKey.foo The transactionEvents element supports the following attributes: enabled Type Boolean Default true Enable or disable the event recorder. maximumSamplesStored Type Integer Default 10000 The maximum number of samples to store in memory at once. attributes Use this sub-element to customize your agent attribute settings for transaction events. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. These attribute settings are specific to transaction events. Attribute settings may be applied globally to all event types to with this configuration setting. When distributed tracing and/or Infinite Tracing are enabled, information from transaction events is applied to the root Span Event of the transaction. Consider applying any attribute settings for transaction events to span events and/or apply them as Global Attribute settings. Custom events The customEvents element is a child of the configuration element. Use customEvents to configure custom events. The CustomEvents element supports the following attributes: enabled Type Boolean Default true Enable or disable the event recorder. maximumSamplesStored Type Integer Default 10000 The maximum number of samples to store in memory at once. Custom parameters The customParameters element is a child of the configuration element. Use customParameters to configure custom parameters. The CustomParameters element supports the following attributes: enabled Type Boolean Default true Enable or disable the capture of custom parameters. Labels The labels element is a child of the configuration element. This sets the label names and values to associate with the application. The list is a semicolon delimited list of colon-separated name and value pairs. You can also use with the NEW_RELIC_LABELS environment variable. Example: foo:bar;zip:zap Browser instrumentation The browserMonitoring element is a child of the configuration element. browserMonitoring configures Browser monitoring in your .NET application. Browser gives you insight your end users' performance experience. This is accomplished by measuring the time it takes for your users' browsers to download and render your webpages by injecting a small amount of JavaScript code into the header and footer of each page. // If you use both the Exclude and Attribute elements // the Exclude element must be listed first. ... myApiKey.*myApiKey.foo The browserMonitoring element supports the following attributes: autoInstrument Type Boolean Default true By default the agent automatically injects the Browser agent JavaScript. To turn off automatic injection, set this attribute to false. attributes Use this sub-element to customize your agent attribute settings for Browser. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. requestPathsExcluded Use this sub-element to prevent the Browser agent from being injected in specific pages. The element is used as follows: ... The agent will not inject the Browser agent into pages whose URL matches one of the specified regular expressions. The regular expression should follow Microsoft guidelines for the Regex class. It is a reference to the virtual directory of the path in your application and not the full URL of the path you wish to exclude. For example, to exclude the pages in https://www.mywebsite.com/mywebpages/ you would simply insert /mywebpages/ as the path regex value. The requestPathsExcluded element should be used in cases where it is impossible or undesirable to use the DisableBrowserMonitoring() call. To minimize a possible performance impact try to use as few regular expressions as possible and keep them as simple as possible. Slow queries The slowSql element is a child of the configuration element. slowSql configures capturing information about slow query executions, and captures and obfuscates explain plans for these queries. The slowSql element supports the following attribute: enabled Type Boolean Default true Enable or disable slow query tracing. Transaction traces The transactionTracer element is a child of the configuration element. transactionTracer configures transaction traces. Included in the trace is the exact call sequence of the transactions, including any query statements issued. myApiKey.*myApiKey.foo The transactionTracer element supports the following attributes: enabled Type Boolean Default true Enable or disable transaction traces. transactionThreshold Type String Default apdex_f Defines the threshold for transaction traces. If a transaction takes longer than the threshold, it is eligible for being traced. See transaction trace basics for more about the rules governing traces. The default value is apdex_f, which sets the threshold to four times the application's apdex_t value. For more information about apdex_t, see Apdex. You can also set the threshold to be a specific time value in milliseconds. recordSql Type String Default obfuscated Select a query tracing policy. Options are off, which records nothing; obfuscated, which records an obfuscated version of the query; or raw, which records the query exactly as it is issued to the database. Recording raw queries may capture sensitive information. explainEnabled Type Boolean Default false When true, the agent captures EXPLAIN statements for slow queries. explainThreshold Type Integer Default 500 Unit Milliseconds The agent collects slow query data for queries that exceed this threshold, along with any available explain plans, as part of transaction traces. maxSegments Type Integer Default 3000 The maximum number of segments to collect in a transaction trace. maxExplainPlans Type Integer Default 20 The maximum number of explain plans to collect during a harvest cycle. attributes Use this sub-element to customize your agent attribute settings for transaction traces. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. Datastore tracer The datastoreTracer element is a child of the configuration element. The datastoreTracer element supports the following sub-elements: instanceReporting Use this sub-element to enable collection of datastore instance metrics (such as the host and port) for some database drivers. These are reported on slow query traces and transaction traces. The default value of attribute enabled is true. databaseNameReporting Use this sub-element to enable collection of the database name on slow query traces and transaction traces for some database drivers. The default value of attribute enabled is true. queryParameters Use this sub-element to enable collection of the SQL query parameters on slow query traces. The default value of attribute enabled is false. Recording query parameters may capture sensitive information. The transactionTracer.recordSql configuration option must be set to raw or this option is ignored. Distributed tracing The distributedTracing element is a child of the configuration element. Distributed tracing lets you see the path that a request takes as it travels through a distributed system. Enabling distributed tracing disables cross application tracing, and has other effects on APM features. Before enabling, read the planning guide. Requires .NET agent version 8.6.45.0 or higher. The distributedTracing element supports the following attributes: enabled Type Boolean Default false To enable or disable, see Enable distributed tracing. excludeNewrelicHeader Type Boolean Default false By default, supported versions of the agent utilize both the newrelic header and W3C Trace Context headers for distributed tracing. The newrelic distributed tracing header allows interoperability with older agents that don't support W3C Trace Context headers. Agent versions that support W3C Trace Context headers will prioritize them over newrelic headers for distributed tracing. If you do not want to utilize the newrelic header, setting this to true will result in the agent excluding the newrelic header and only using W3C Trace Context headers for distributed tracing. Enable distributed tracing via environment variable Set the NEW_RELIC_DISTRIBUTED_TRACING_ENABLED environment variable in the application's environment. NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true Distributed tracing reports span events. Span event reporting is enabled by default, but distributed tracing must be enabled for spans to be reported. To disable span events, choose one of the following options: Disable span events via config file Set the element to false to disable via the newrelic.config file. This element is a child of the element. Disable span events via environment variable Set the NEW_RELIC_SPAN_EVENTS_ENABLED environment variable in the application's environment. NEW_RELIC_SPAN_EVENTS_ENABLED=false Infinite Tracing Infinite Tracing extends the distributed tracing service by employing a trace observer that is external to the agent. It observes 100% of your application traces across various services and provides actionable data so you can solve issues faster. Infinite Tracing requires .NET Agent version 8.30 or higher. To turn on Infinite Tracing, enable distributed tracing and add the additional settings below The infiniteTracing element supports the following elements: trace_observer The trace_observer element identifies an observer host that is independent from the agent. For help getting a valid Infinite Tracing trace observer host entry, see Find or create a trace observer endpoint. The trace observer may be configured using the NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST environment variable as well. When configuring the trace observer, you should not supply the protocol as part of the host. For example, use myhost.infinitetracing.com instead of https://myhost.infinitetracing.com. Span events The spanEvents element is a child of the configuration element. Use spanEvents to configure span events. myApiKey.*myApiKey.foo The spanEvents element supports the following attributes: enabled Type Boolean Default true Enable or disable the event recorder. attributes Use this sub-element to customize your agent attribute settings for span events. This sub-element uses the same settings as the primary attributes element: enabled, include, and exclude. These attribute settings are specific to span events. Attribute settings may be applied globally to all event types to with this configuration setting. Settings in app.config or web.config For ASP.NET and .NET Framework console apps you can also configure the following settings in your app's app.config or web.config, within the outermost element, : Enable and disable the agent If the agent is disabled in the local or global newrelic.config, the NewRelic.AgentEnabled settings in these files will be ignored. Application name For more information, see Name your .NET application. License key Change newrelic.config location Designates an alternative location for the config file outside of the local root of the app or global config location. The location entered must be an absolute path. Settings in appsettings.json For .NET Core apps, you can configure the following settings in appsettings.json if the following is true: The appsettings.json file must be located in the current working directory of the application. The application must have the following dependencies: Microsoft.Extensions.Configuration Microsoft.Extensions.Configuration.Json Microsoft.Extensions.Configuration.EnvironmentVariables Enable and disable the agent { \"NewRelic.AgentEnabled\":\"false\" } If the agent is disabled in the local or global newrelic.config, the NewRelic.AgentEnabled setting in this file will be ignored. Application name For more information, see Name your .NET application. { \"NewRelic.AppName\": \"Descriptive Name\" } License key { \"NewRelic.LicenseKey\": \"XXXXXXXX\" } Change newrelic.config location Designates an alternative location for the config file outside of the local root of the app or global config location. The location entered must be an absolute path. { \"NewRelic.ConfigFile\": \"C:\\\\Path-to-alternate-config-dir\\\\newrelic.config\" } For more help If you need more help, check out these support and learning resources: Browse the Explorers Hub to get help from the community and join in discussions. Find answers on our sites and learn how to use our support portal. Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS. Review New Relic's data security and licenses documentation.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 134.66966,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "sections": "API guides",
- "info": "How to configure the NewRelic .NET agent using newrelic.config, including startup and instrumentation options, and disabling unwanted features.",
- "body": " to disable SSL is valid only for .NET agent versions 7.x and earlier. .NET agent version 8.x and higher communicate only via SSL. The agent communicates with NewRelic via HTTPS by default, and NewRelic requires HTTPS for all traffic to APM and the NewRelic REST API. Obscuring key element"
- },
- "id": "5404cb460755234d1b00000d"
- },
- {
- "sections": [
- "Add the NerdGraphQuery component to an application",
- "Note",
- "Before you begin",
- "Prepare the sample code",
- "Add the NerdGraphQuery component",
- "How to use NerdGraphQuery.query",
- "Review the results of the NerdGraph query",
- "Summary"
- ],
- "title": "Add the NerdGraphQuery component to an application",
- "type": "developer",
- "tags": [
- "nerdgraphquery component",
- "transaction overview app",
- "query account data",
- "drop-down menu",
- "NerdGraphQuery.query method"
- ],
- "external_id": "6bd6c8a72eab352a3e8f4332570e286c7831ba84",
- "image": "https://developer.newrelic.com/static/5dcf6e45874c1fa40bb6f21151af0c24/b01d9/no-name.png",
- "url": "https://developer.newrelic.com/build-apps/add-nerdgraphquery-guide/",
- "published_at": "2020-09-21T01:47:51Z",
- "updated_at": "2020-09-17T01:51:10Z",
- "document_type": "page",
- "popularity": 1,
- "info": "The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application",
- "body": "Add the NerdGraphQuery component to an application 20 minutes This guide steps you through the process of adding the `NerdGraphQuery` component to a sample transaction overview application. This allows you to query data from your New Relic account and add it to a dropdown menu. NerdGraph is our GraphQL implementation. GraphQL has some key differences when compared to REST: The client, not the server, determines what data is returned. You can easily collect data from multiple sources. For example, in a single query, you can get account information, infrastructure data, and issue a NRQL request. Note Before completing this exercise, you can experiment with GraphQL queries in our NerdGraph API explorer. We also have a 14-minute video that covers the steps below. Before you begin To develop projects, you need our New Relic One CLI (command line interface). If you haven't already installed it, do the following: Install Node.js. Complete steps 1–4 of our CLI quick start, and be sure to make a copy of your account ID from step 1 because you’ll need it later. Note If you've already installed the New Relic One CLI, but you can't remember your account ID, start the CLI quick start again, and then click the Get your API key down arrow. The account ID is the number preceding your account name. For additional details, see Set up your development environment. Prepare the sample code To get started, complete these steps to update the application UUID (unique ID) and run the sample application locally: Step 1 of 8 If you haven't already done so, clone the example applications from our how-to GitHub repo. Here's an example using HTTPS: git clone https://github.com/newrelic/nr1-how-to.git Copy Step 2 of 8 Change to the directory use-nerdgraph-nerdlet: cd nr1-how-to/use-nerdgraph/nerdlets/use-nerdgraph-nerdlet Copy Step 3 of 8 In your preferred text editor, open index.js. Step 4 of 8 Replace with your account id: Note Your account ID is available in the CLI quick start (see Before you begin). this.accountId = ; Copy Step 5 of 8 Change to the /nr1-howto/use-nerdgraph directory: cd ../.. Copy Step 6 of 8 If this is your first time executing this code run the below command to install all the required modules: npm install Copy Step 7 of 8 Execute these commands to update the UUID and serve the sample application: nr1 nerdpack:uuid -gf nr1 nerdpack:serve Copy Step 8 of 8 Once the sample application is successfully served, go to the local New Relic One homepage (https://one.newrelic.com/?nerdpacks=local), click Apps, and then click Use NerdGraph. After launching the Use NerdGraph application, you see a dashboard that gives an overview of the transactions in your account: Add the NerdGraphQuery component Now you can create a dropdown menu for changing the account the application is viewing. The first step is to import the NerdGraphQuery component into the application's index.js file. Note If you need more details about our example below, see the APIs and components page on https://developer.newrelic.com Step 1 of 3 Add the NerdGraphQuery component into the first StackItem inside of the return in the index.js file: {({ loading, error, data }) => { console.log({ loading, error, data }); if (loading) { return ; } if (error) { return 'Error!'; } return null; }} ; Copy Step 2 of 3 The NerdGraphQuery component takes a query object that states the source you want to access and the data you want returned. Add the following code to your index.js file in the render method: Note In the browser console, you can see the data from your query returned in an object that follows the same structure of the object in the initial query. const query = ` query($id: Int!) { actor { account(id: $id) { name } } } `; Copy Step 3 of 3 To take the data returned by the NerdGraph query and display it in the application, replace the return null in the current NerdGraphQuery component with this return statement: return {data.actor.account.name} Apps:; Copy When you go back to the browser and view your application, you see a new headline showing the name of your account returned from NerdGraph: How to use NerdGraphQuery.query At this point, you have implemented the NerdGraphQuery component with the application's render method and displayed the return data within the transaction overview application. Here's what you need to do next: Query NerdGraph inside of the componentDidMount lifecycle method. Save the returned data for later use in the application. Step 1 of 2 This code takes the response from NerdGraph and makes sure the results are processed, stored into the application state, and logged to the browser console for viewing. Add this code into the index.js file just under the constructor: componentDidMount() { const accountId = this.state; const gql = `{ actor { accounts { id name } } }`; const accounts = NerdGraphQuery.query({query: gql}) //The NerdGraphQuery.query method called with the query object to get your account data is stored in the accounts variable. accounts.then(results => { console.log('Nerdgraph Response:', results); const accounts = results.data.actor.accounts.map(account => { return account; }); const account = accounts.length > 0 && accounts[0]; this.setState({ selectedAccount: account, accounts }); }).catch((error) => { console.log('Nerdgraph Error:', error); }) } Copy Step 2 of 2 After the data is stored into state, display a selection so users can change accounts and update the application. To do this, add this code to index.js for the second StackItem in the return statement: { accounts && ( ); } Copy Review the results of the NerdGraph query After you complete these steps, look at the application in your browser, and note the following: The dropdown menu now displays the data returned from the NerdGraphQuery.query and allows you to select an account. After you select a new account, the application shows data from the new selection. The final index.js file should have code similar to the code below. This completed sample is in your nerdlet final.js. import React from 'react'; import { PlatformStateContext, NerdGraphQuery, Spinner, HeadingText, Grid, GridItem, Stack, StackItem, Select, SelectItem, AreaChart, TableChart, PieChart } from 'nr1' import { timeRangeToNrql } from '@newrelic/nr1-community'; // https://docs.newrelic.com/docs/new-relic-programmable-platform-introduction export default class UseNerdgraphNerdletNerdlet extends React.Component { constructor(props){ super(props) this.state = { accountId: , accounts: null, selectedAccount: null, } } componentDidMount() { const accountId = this.state; const gql = `{ actor { accounts { id name } } }`; const accounts = NerdGraphQuery.query({ query: gql }) accounts.then(results => { console.log('Nerdgraph Response:', results); const accounts = results.data.actor.accounts.map(account => { return account; }); const account = accounts.length > 0 && accounts[0]; this.setState({ selectedAccount: account, accounts }); }).catch((error) => { console.log('Nerdgraph Error:', error); }) } selectAccount(option) { this.setState({ accountId: option.id, selectedAccount: option }); } render() { const { accountId, accounts, selectedAccount } = this.state; console.log({ accountId, accounts, selectedAccount }); const query = ` query($id: Int!) { actor { account(id: $id) { name } } } `; const variables = { id: accountId, }; const avgResTime = `SELECT average(duration) FROM Transaction FACET appName TIMESERIES AUTO `; const trxOverview = `FROM Transaction SELECT count(*) as 'Transactions', apdex(duration) as 'apdex', percentile(duration, 99, 95) FACET appName `; const errCount = `FROM TransactionError SELECT count(*) as 'Transaction Errors' FACET error.message `; const responseCodes = `SELECT count(*) as 'Response Code' FROM Transaction FACET httpResponseCode `; return ( {({loading, error, data}) => { if (loading) { return ; } if (error) { return 'Error!'; } return {data.actor.account.name} Apps:; }} {accounts && } {(PlatformState) => { /* Taking a peek at the PlatformState */ const since = timeRangeToNrql(PlatformState); return ( <> Transaction Overview Average Response Time Response Code Transaction Errors > ); }} ) } } Copy Summary Now that you've completed all the steps in this example, you've successfully queried data from your account using the NerdGraphQuery component in two methods: Using the NerdGraphQuery component inside the application's render method and then passing the returned data into the children's components. Using the NerdGraphQuery.query method to query data before the application renders.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 130.86685,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "info": "The NerdGraphQuery component allows you to query data from your account and add it to a dropdown menu in an application",
- "tags": "query account data",
- "body": ". Note Before completing this exercise, you can experiment with GraphQL queries in our NerdGraph API explorer. We also have a 14-minute video that covers the steps below. Before you begin To develop projects, you need our NewRelicOneCLI (command line interface). If you haven't already installed"
- },
- "id": "5efa993c64441ff4865f7e32"
- },
- {
- "sections": [
- "Nerdpack file structure",
- "Generate Nerdpack components",
- "Nerdlet file structure",
- "index.js",
- "nr1.json",
- "styles.scss",
- "icon.png",
- "Launcher file structure"
- ],
- "title": "Nerdpack file structure",
- "type": "developer",
- "tags": [
- "New Relic One CLI",
- "nerdpack",
- "file structure",
- "nerdlets",
- "launchers"
- ],
- "external_id": "c97bcbb0a2b3d32ac93b5b379a1933e7b4e00161",
- "image": "",
- "url": "https://developer.newrelic.com/explore-docs/nerdpack-file-structure/",
- "published_at": "2020-09-21T01:52:20Z",
- "updated_at": "2020-08-14T01:49:25Z",
- "document_type": "page",
- "popularity": 1,
- "info": "An overview of the Nerdpack File Structure",
- "body": "Nerdpack file structure A New Relic One application is represented by a Nerdpack folder, which can include one or more Nerdlet files, and (optionally) one or more launcher files. Here we explain: The file structure for a Nerdpack, a Nerdlet, and a launcher How to link a launcher file to a Nerdlet How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the New Relic One CLI command nr1 create and select Nerdpack to create a Nerdpack template that includes a Nerdlet and a launcher. Generate Nerdlet or launcher individually: Use the New Relic One CLI command nr1 create and choose either Nerdlet or launcher. This can be useful when adding Nerdlets to an existing Nerdpack. For documentation on generating and connecting Nerdpack components, see our app building guides and the New Relic One CLI command reference. Nerdpack file structure When you generate a Nerdpack template using the nr1 create command, it has the following file structure: my-nerdlet ├── README.md ├── launchers │ └── my-nerdlet-launcher │ ├── icon.png │ └── nr1.json ├── nerdlets │ └── my-nerdlet-nerdlet │ ├── index.js │ ├── nr1.json │ └── styles.scss ├── node_modules │ ├── js-tokens │ ├── loose-envify │ ├── object-assign │ ├── prop-types │ ├── react │ ├── react-dom │ ├── react-is │ └── scheduler ├── nr1.json ├── package-lock.json └── package.json Copy Nerdlet file structure A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files, index.js, nr1.json, and styles.scss. Here is what the default files look like after being generated using the nr1 create command: index.js The JavaScript code of the Nerdlet. import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { render() { return
Hello, my-awesome-nerdpack Nerdlet!
; } } Copy nr1.json The Nerdlet configuration file. { \"schemaType\": \"NERDLET\", \"id\": \"my-awesome-nerdpack-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\" } Copy Besides using the launcher as the access point for your application, you can also associate the application with a monitored entity to get it to appear in the entity explorer. To do this, add two additional fields to the config file of the first-launched Nerdlet: entities and actionCategory. In the following example, the Nerdlet has been associated with all Browser-monitored applications and will appear under the Monitor UI category : { \"schemaType\": \"NERDLET\", \"id\": \"my-nerdlet\", \"description\": \"Describe me\", \"displayName\": \"Custom Data\", \"entities\": [{ \"domain\": \"BROWSER\", \"type\": \"APPLICATION\" }], \"actionCategory\": \"monitor\" } Copy To see this application in the UI, you would go to the entity explorer, select Browser applications, and select a monitored application. styles.scss An empty SCSS file for styling your application. icon.png The launcher icon that appears on the Apps page in New Relic One when an application is deployed. Launcher file structure Launchers have their own file structure. Note that: A launcher is not required; as an alternative to using a launcher, you can associate your application with a monitored entity. An application can have more than one launcher, which might be desired for an application with multiple Nerdlets. After generating a launcher using the nr1 create command, its folder contains two files: nr1.json The configuration file. { \"schemaType\": \"LAUNCHER\", \"id\": \"my-awesome-nerdpack-launcher\", \"description\": \"Describe me\", \"displayName\": \"MyAwesomeNerdpack\", \"rootNerdletId\": \"my-awesome-nerdpack-nerdlet\" } Copy To connect a launcher to a Nerdlet, the rootNerdletId must match the id in the launched Nerdlet's nr1.json config file. For Nerdpacks with multiple Nerdlets, this needs to be done only for the first-launched Nerdlet. icon.png The icon displayed on the launcher for the app on the Apps page.",
- "_index": "520d1d5d14cc8a32e600034b",
- "_type": "520d1d5d14cc8a32e600034c",
- "_score": 124.356384,
- "_version": null,
- "_explanation": null,
- "sort": null,
- "highlight": {
- "tags": "NewRelicOneCLI",
- "body": " How to link your application with a monitored entity For basic component definitions, see our component reference. Generate Nerdpack components There are two ways to generate a Nerdpack template: Generate a Nerdpack: Use the NewRelicOneCLI command nr1 create and select Nerdpack to create"
- },
- "id": "5efa989e196a671300766404"
- }
]
}
\ No newline at end of file