New Relic
Intro to Blue Medora Developers
The story

A new platform
New Relic specializes in Application Monitoring, mainly focused on web applications,
...but not exclusively by any means

How do we develop for it?
- Use Existing ExUno Data Providers
- Send (Filtered) Data to Plugin - write a yaml
- Most time spent deciding what to send
- Pairs well with the MP generator KPIs list
- Send (Unfiltered) Data to Insights
- Do Custom Post Processing (only if we really need to)
- Custom licensing too
- (only if it's a really weird licensing scheme)
- Custom licensing too
You may be thinking...

Don't worry!
We made it easy!

What do we have on it?
- 21 Solutions
- Initially Developed by Katherine, Corbin, and Joe K.
- Plugins was a big focus
- Insights got added on later
- Each capable of producing 2 separate products
- New Relic Plugin & New Relic Insights
- Initially Developed by Katherine, Corbin, and Joe K.
- Soon to be many, many more...
- Dan J, Corbin, Joe K. and I rewrote core
- To be more of an even split (Plugin/Insights)
- To be more dev friendly
- To include Relationships and Events
- Dan J, Corbin, Joe K. and I rewrote core
Plugin
- A place to send Numeric data
- Analytics on data - think: dynamic thresholds
- Widgets on Dashboards
- A good amount of filtering on Ex Uno Collection Results often needs to be done

Insights
- Capable of handling String, Boolean, and Numeric data
- Populates Tables/Rows
- Database-ish, JSON-ish
- Can use a query language called "NRQL" to retrieve sets of information
- Pronounced like "Urkel"
- Sort of SQL
- somewhat limited - no JOINs
- More graph types!

The filter
Part 1
---
:data_collector_classes:
default: com.bluemedora.mysql.MySQLDataCollector
:guid: com.bluemedora.mysql
:insights_notification_prefix: mysql
:version:
:major: 1
:minor: 0
:patch: 0
:static_args:
order_queries_by: calls
monitor_tables: true
query_history_interval: 24
query_count: 10
:licensable_resources:
default: mysql_database
The filter
(cont'd)
:key_definitions:
default:
mysql_database:
- :metric_type: resource_name
:label: Database
...
:counter_metric_definitions:
default:
mysql_instance:
- :metric_type: os_data_reads
:time_unit: SECONDS
...
:unit_renamings:
default:
mysql_instance:
os_data_reads: reads
os_data_writes: writes
...
:metric_white_list:
default:
mysql_replication:
mysql_instance:
total_allocated:
os_data_reads:
os_data_writes:
lock_deadlocks:
Knobs & Levers
{
"polling_interval_seconds": 60,
"agents": [
{
"instance_name": "Dev Test",
"username": "myCoolUsername",
"password": "superSecretPassword",
"port": 3306,
"host": "mysql-host-name",
"database": "sports-db",
"send_to_plugin": {
"mysql_instance": true,
"mysql_tablespace": true,
"mysql_table": true,
"mysql_database": true,
"mysql_index": true,
"mysql_query": true
},
"send_to_insights": {
"mysql_instance": true,
"mysql_tablespace": true,
"mysql_table": true,
"mysql_database": true,
"mysql_index": true,
"mysql_query": true,
"relationships": true,
"notifications": true
}
}
}
Using the data
Plugins:
- Search for a single metric
- Over several objects
- ../res_kind/*/metric[units]
- Search for similarly named metrics
- "<read/write/del>_ops"
- *_ops

Using the Data
Insights:
// Some examples...
SELECT some_metric FROM <resource_kind>_collection
SELECT count(some_metric) FROM <resource_kind>_collection
SELECT metric1, metric2 FROM <resource_kind1>_collection, <resource_kind2>_collection
SELECT count(some_metric) FROM <resource_kind>_collection SINCE 1 week ago TIMESERIES
SELECT count(some_metric) FROM <resource_kind>_collection FACET resource_name
Different Query Recipes
Yield Different Graph-types

Tooling


Relationships
- New Relic is not inherently hierarchical
- Parent-Child relationships
- Customers can now dig through related resources, just like vR Ops
Notifications
- Bring Events from the underlying API to New Relic
How can I help?
- Be mindful of non-standard units
- Remember Numeric metrics
- Follow Ex Uno Tenets
- resource_resource_naming_conventions
- ["lists", "are", "bad"]
- "false" != false
- Use the MP Generator
- KPI lists reduce the time spent deciding what to send
Overview
- Data Provider to Functioning NR product
- Standing up a project can take 10 minutes
- Standing up as in running
- You get lots of things for free (including CI!)
- You can speed things up by being responsible
Questions?
(Huge thanks to Katherine, Corbin, Joe K, Cam, and Dan J)
New Relic for Blue Medora Devs
By dlindema
New Relic for Blue Medora Devs
- 452