Platform Fundamentals - How To 'See' Your Data (Module 4)
Platform Fundamentals - How To 'See' Your Data (Module 4)
Language
How to Text
Subtitle ‘see’Here
your data
01 Querying Events
Dimensional data:
• Each event collects metadata (attributes) about the event that occurred
Example:
Event type: Transaction
Attributes: Transaction Type
Response Code
Request URI
© 2022 New Relic, Inc. All rights reserved
Duration
NRQL Syntax
Build your query around your chosen Event Type
1 Event
2 Plot
3 Dimension
2 Try the RAW Data option and explore the attributes for the PageView Event Type
© 2022 New Relic, Inc. All rights reserved
Aggregate your data with
functions
1 Explore the data: Try this query in the Query builder and explore the results:
Choose TABLE view
2 Throughput for transactions by name: Aggregate with a ‘count all’ function, and group by ‘name’ using
the FACET clause
3 Throughput for transactions by….. Try the same query but with different FACET clauses (eg. host,
httpresponse code etc)
Select Max duration of Pageviews (slowest) from a specific country grouped by Page url
© 2022 New Relic, Inc. All rights reserved
Plot data over time with TIMESERIES
SINCE, UNTIL, COMPARE WITH, TIMESERIES
Compare (Trending)
SELECT average(duration) FROM PageView SINCE 1 week AGO COMPARE WITH 1 week AGO TIMESERIES
SELECT average(duration) FROM PageView SINCE 1 week AGO COMPARE WITH 1 week AGO TIMESERIES 2 day
—------------------------------------
SELECT average(duration) FROM PageView SINCE 5 days AGO UNTIL 3 days ago TIMESERIES
Compare different performance data for different pages on your site (PageViews grouped by PageUrl)
Worst page load durations broken out by browser type, country code, city
Select average Pageview duration as well as average backend duration from the PageViews on
We want to answer the following PageView performance questions. Choose the Demotronv2
Account as the data source and add these charts to your dashboard:
1 What’s the worst (max) page load duration in my app called ‘WebPortal’ (appname) in the
past 24 hours ? _______________________________
How does my average page load duration over past 7 days compare with the 7 days
2 before
(The time specified by COMPARE WITH is relative to the time specified by SINCE or UNTIL)
3 Which cities (FACET) and pages (FACET PageUrl) are experiencing the worst page loads
in my app called ‘WebPortal’ over the past 24 hours ? _____________________________________
© 2022 New Relic, Inc. All rights reserved
5 mins
Lab: More Event Types
Add some of these queries to your dashboard:
Mobile, MobileRequest, SyntheticCheck, SystemSample
1 Infrastructure: SystemSample
SELECT average(cpuPercent) FROM SystemSample FACET `entityName` limit 20
or
SELECT average(diskUsedPercent) from SystemSample facet entityName limit 20
2 Synthetics:: SyntheticCheck
2 Pick FROM your main EVENT type (from different data sources eg PageView, Transaction etc)
3 Use SPACE BAR or Up/Down arrows in lists or TAB to autocomplete parts of your query
5 If you get Syntax Errors simplify the query and rebuild it step by step, or build it in Basic Mode
first then convert it
Link FACETS to filter charts across a Dashboard (easier for users than using the filter bar)
Type: Bar
Link facets to
current dashboard
2 Reset the charts to their individual time periods using TimePicker > Default
3 Use the Search box to filter to FACET attributes, or click on Filterable charts. Clear the Filter.
2 Compare active unique sessions on your site in the last 5 minutes with 30 minutes earlier
(uniqueCount(sessionID))
___________________________________________________________________
Example:
• Adjust the ceiling to a smaller value and increase the number of buckets to get smaller
steps
• When you’re happy with the distribution save your new Histogram chart
Step A Label
WHERE pageUrl LIKE '%login.jsp' AS 'Login',
Step B Label
SELECT ...
FACET CASES (WHERE attribute operator value, WHERE attribute operator value, ... )
Eg.
Group your PageView data into categories like < 1 second, from 1 to 10 secs, and > 10 seconds
SELECT count(*) FROM PageView
FACET CASES (WHERE duration < 1, WHERE duration > 1 and duration < 10, WHERE duration > 10)
time tn
Count: 1000
Average: 536 Metric: Representation of data
Sum: 536,253
2 measured over interval of time
Min: 357 ● Well-defined and common KPIs defined in advance
Max: 6,986 ● Retention: 13 months (roll-ups), 30 days (raw data)
● Summarize info about the haystack
© 2022 New Relic, Inc. All rights reserved
The value of Event data changes over time
Value of
raw data Rules for querying Metric data type
Metrics
t
Time / retention costs
© 2022 New Relic, Inc. All rights reserved
Dashboards & NRQL
Use these ideas to continue your NRQL knowledge after this course:
Threshold Types
1. Create the query in the Query builder (this is the signal feed for the alert)
2. Choose ‘Create alert’ and set the Threshold settings and create an alert for this
Check our docs site for more NRQL use case examples:
© 2022 New Relic, Inc. All rights reserved
Est. 20 mins