-
Notifications
You must be signed in to change notification settings - Fork 1.4k
added the nrql query #20685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
added the nrql query #20685
Changes from 1 commit
4c9d1f9
bbcb9b9
a4a7911
49387de
c9129b3
8a8bf9b
d4329de
ee48ffc
7c19709
863751a
6e14628
13b5ac1
2b9060d
20b9dd9
4ccafaf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| title: 'Query entities & relationships via NRQL' | ||
| metaDescription: 'New Relic Advanced Compute customers leverage NRQL to directly query entity and relationship data within NRDB. This capability simplifies the correlation of this data with telemetry, leading to faster insights and a more comprehensive understanding of systems.' | ||
| freshnessValidatedDate: 2024-03-19 | ||
| --- | ||
|
|
||
| Understanding the intricate connections within your systems and quickly troubleshooting issues is crucial. If you're an Advanced Compute customer, you can now **directly query entity and relationship data within New Relic Database (NRDB) using the familiar New Relic Query Language (NRQL)**. This powerful capability allows you to seamlessly join this vital information with your telemetry data, all in one place. | ||
|
||
|
|
||
| This document shows you how to leverage this unified data access to **gain comprehensive insights faster** and achieve a more holistic understanding of your environment. You'll explore how to: | ||
|
|
||
| * Access and query your entity and relationship data directly in NRDB. | ||
| * Simplify correlation between entities, their relationships, and associated telemetry. | ||
| * Utilize practical NRQL examples for common use cases, like correlating CPU usage with host attributes or tracking entity state changes over time. | ||
|
|
||
| ### Comprehensive insights with Unified data access with NRQL | ||
|
||
|
|
||
| Are you looking to simplify how you understand your systems and troubleshoot issues faster? We've centralized your data by bringing entities and their relationships directly into NRDB. This means you can now use the power of NRQL to get a complete picture of your environment, all in one place. | ||
|
|
||
| Here's how you benefit: | ||
|
|
||
| * **Access all your entity data directly in NRDB:** You'll find that your entity and relationship data is now ingested and stored in NRDB. This creates a unified datastore, making it the central place for this critical information alongside your telemetry data. | ||
| * **Query with ease using NRQL:** You can use the powerful and flexible NRQL you're already familiar with to query this entity and relationship data. This simplifies your workflow, as you don't need to learn new query languages or perform complex joins across different data stores. Your queries become more straightforward and easier to manage. | ||
| * **Get timely insights with 24-hour data availability:** Wondering if the data will be there when you need it? This entity and relationship data is retained in NRDB for a 24-hour period. This availability allows you to perform timely analysis and correlation, so you can quickly retrieve the information needed to understand system behavior and identify dependencies. | ||
| * **Achieve a holistic view with simplified correlation:** You can now effortlessly link entities, their relationships, and your associated telemetry data (like metrics, events, logs, and traces). This improved correlation capability means you get a complete picture of your environment's health and performance, enabling you to troubleshoot issues more efficiently and gain faster insights. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| --- | ||
| title: 'NRQL query examples for entities & relationships' | ||
| metaDescription: 'Examples of NRQL queries for entities & relationships' | ||
| freshnessValidatedDate: 2024-03-19 | ||
| --- | ||
|
|
||
| Streamline your system analysis by using New Relic Query Language (NRQL) to directly query entity and relationship data. This approach replaces cumbersome manual processes for crucial tasks like correlating CPU performance with host attributes, viewing past entity states, or tracking configuration changes, offering faster insights into your complex environments. | ||
|
|
||
| To query this data, you'll need Advanced Compute; use the Entity event type (and Relationships or entityRelationships for relationship-specific queries). | ||
|
|
||
| Explore the practical NRQL solutions below to help you: | ||
|
|
||
|
|
||
| <CollapserGroup> | ||
| <Collapser | ||
| id="total-tx" | ||
| title="Correlate CPU usage with host attributes" | ||
| > | ||
|
|
||
| - **Objective**: An operations team needs to analyze CPU utilization for all production hosts located in a specific AWS region (e.g., 'eu-central-1') to identify potential performance bottlenecks. | ||
| - **Challenge**: This often required exporting host data and performance metrics separately and then using external tools or complex scripts to join and analyze them. | ||
| - **NRQL solution**: | ||
|
|
||
| ```sql | ||
| FROM SystemSample | ||
| JOIN (FROM Entity SELECT id, name WHERE type = 'INFRA-HOST' AND `tags.aws.awsRegion` = 'eu-central-1') | ||
| ON entityGuid = id | ||
| SELECT average(cpuPercent) FACET name | ||
| ``` | ||
| </Collapser> | ||
|
|
||
| <Collapser | ||
| id="total-tx" | ||
| title="View entity state at a specific point in time" | ||
| > | ||
|
|
||
| - **Objective**: A developer is investigating an incident that occurred several hours ago and needs to know the exact configuration or state of a specific host (or container, application, etc.) at that particular point in time. | ||
|
|
||
| - **Challenge**: Obtaining a snapshot of an entity's attributes from a specific past timeframe was often not possible or required sifting through voluminous configuration logs, if available. | ||
|
|
||
| - **NRQL solution**: This query retrieves all available attributes for a specific entity (identified by its id) within a narrow one-hour window from seven hours ago. | ||
|
|
||
| ```sql | ||
| FROM Entity | ||
| SELECT * | ||
| WHERE id = '<your_entity_id>' | ||
| SINCE 7 hours ago UNTIL 6 hours ago | ||
| LIMIT 1 | ||
| ``` | ||
| </Collapser> | ||
|
|
||
| <Collapser | ||
| id="total-tx" | ||
| title="Tracking entity state changes" | ||
| > | ||
|
|
||
| - **Objective**: An SRE wants to understand how an entity's configuration or key attributes have changed over the last few hours, perhaps to see if a deployment or an automated process has altered its state as expected. | ||
|
|
||
| - **Challenge**: Tracking subtle changes in an entity's state over time was difficult and often involved manual comparisons or custom monitoring scripts. | ||
|
|
||
| - **NRQL solution**: This query fetches all recorded states for a particular entity within the last three hours, allowing for an audit of any changes. | ||
|
|
||
| ```sql | ||
| SELECT * | ||
| FROM Entity | ||
| WHERE id = '<your_entity_id>' | ||
| SINCE 3 hours ago | ||
| ``` | ||
| </Collapser> | ||
|
|
||
| <Collapser | ||
| id="total-tx" | ||
| title="How to access entities & relationships" | ||
|
||
| > | ||
|
|
||
| This feature is available to New Relic customers on Advanced Compute. These customers can begin querying entity and relationship data using the Entity event type | ||
|
|
||
| ```sql | ||
| FROM Relationships o FROM entityRelationships | ||
| ``` | ||
| </Collapser> | ||
| </CollapserGroup> | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of repeated information in the first three paras. Merge and make more crisp.