New Relic One Workloads give you the ability to group and monitor entities based on a team or a set of responsibilities, from front-end to back-end services, across your entire stack.
Workloads help you understand complex systems, detect issues, understand the cause and impact of an incident, and resolve those issues quickly.
What is a workload in New Relic?
New Relic monitors a wide range of entities and data, from client-side applications and back-end APIs, to the underlying infrastructure. To make sense of this large data set, New Relic One gives you the ability to create and monitor workloads.
Here are some workload examples:
- A serverless application that includes an API gateway, a few serverless functions, and a managed database and storage.
- A browser application and the back-end APIs that support it.
- A collection of Java microservices and the infrastructure they run on.
Here's an example of a workload in New Relic One:
Workloads give you visibility into the end-to-end availability and consumption of resources across an entire service, and give you a way to define what’s relevant to you. You can use workloads to group together entities that are important to a specific team or project, so you can better browse and isolate the most relevant data for that service.
Because New Relic One gives you cross-account access, you can add entities to your workload from any of your accounts.
A workload can include:
- Any New Relic-monitored entity, including services, browser apps, mobile apps, databases, and hosts.
- New Relic One dashboards.
- Other workloads: this is useful for complex teams who need to divide and overlap workloads.
Requirements for creating and managing workloads:
- All users for an account can view that account's workloads.
- To create, edit, and delete workloads, you must be an Owner, Admin, or Workloads manager.
The workload UI
You can view workloads by going to one.newrelic.com. Click the Workloads launcher, and then choose a specific workload.
The screenshot numbers are important parts of the workload UI we'd like to describe to you:
- The Overview tab shows the most relevant entity performance and alert data that you need to operate the workload.
- View of workload components. This is useful for understanding the workload’s architecture, especially if the workload’s entities change over time because they are dynamically defined.
- Important charts. These are charts with key metrics for each entity type, such as number of requests, response time and error rate for an application. Explore the charts to detect correlations among different entities (for example, two applications) and different stack layers (for example, applications and hosts).
- Open violations. You can filter the workload to only the alerting entities to make it easier to troubleshoot the most important issues.
- Linked dashboards. You can add links to dashboards from your workload, and create pre-filtered, workload-relevant links to dashboards.
- The Entities tab shows the entities that make up the workload. If you’ve used queries to dynamically select entities, the entity list will change over time.
- Edit workload. Edit the workload to define the entities that are part of the workload and to link dashboards to the workload.
Create a workload
A workload should contain the entities you and your team want to see. Your choice of entities depends on your organization structure and goals.
You can use New Relic One or the NerdGraph API to create a workload. Follow these steps to create a workload using the UI:
- Go to one.newrelic.com and click the Workloads launcher, and then click + Create a workload.
- Give the workload a name that will be meaningful for you and your team later.
- From the Select an account dropdown, select the workload account you'd like to use.
- Click Choose the scope accounts to check all of the accounts related to this workload.
Find and choose the entities that make up the workload. When you have the results you're looking for, you can add specific entities or add the query to dynamically update the entities in the workload. For the best experience, we recommend using less than 500 entities.
- You can search by entity type, tags, or attributes (like app name, account ID, and AWS region).
Click + Add this query to create a list of dynamically updated entities for your workload. We recommend this if you want your workload to update its entities as your system changes.
Click + Add next to an entity to add it to your workload. This is a good choice if you know that the entities will stay useful even as your system changes.
You can add a combination of queries and specific entities to the workload, which combine according to the query logic.
- Click Create a workload to save the workload. Once you've created the workload, you can edit it at any time
If your workload contains one or more dashboards, you can set filters on those dashboard links.
Below are more details about some aspects of how to define workloads:
You can query and select workload entities using both tags and attributes. Therefore, to optimize your use of workloads, it helps to have a good entity-tagging strategy. We recommend reading the tagging documentation.
- How the dynamic query logic works
You can add several individual entities and queries to define a workload.
- Queries can include multiple search terms. These are combined with an AND operator.
- Separate queries within a workload are combined with an OR operator.
- You can wrap strings between percent signs (
%) to match exact substrings within a query.
- Add dashboards to workloads
If you have custom dashboards and you already know which data is relevant to your team for observing and operating their workloads, you can link those dashboards from your workload. You can also set filters on dashboards to scope them to a workload-specific context. When a user selects that dashboard from the workload, it opens with the filter already applied.
To add dashboards to a workload:
- When creating or editing a workload, type
Dashboardin the workload search bar to filter to dashboard entities.
- Add other search terms to filter to specific dashboards.
- Click Add.
To filter a workload’s dashboard:
- From a workload’s Overview page, select a dashboard.
- Add search terms to filter the dashboard to a view that’s relevant for that workload.
- Select Save filter for this workload.
- When creating or editing a workload, type
Use the API
Impact of accounts on the workload permissions and content
Workloads can group and display entities from multiple accounts to provide complete observability of complex systems. When creating a workload, you must set:
For how to find a New Relic account ID, see Account ID.
The workload account is where any workload-specific data is stored. For example, a workload might generate
NrAuditEvent data, and you would find that data by querying the workload account.
The workload account determines the user permissions that govern which users can see and manage the workload, through the account roles.
Once created, the workload account can’t be changed.
Scope accounts are the accounts from which a workload fetches entity data. In other words, the scope accounts provide the content for a workload. Users who don’t have access to all of a workload's scope accounts may not be able to see complete workload data.
Scope accounts can be updated at any point in time by any user with workload management capabilities on the workload account. By default, all accounts that the workload creator has access to at the moment of the workload creation are set as scope accounts.