SlideShare a Scribd company logo
1 of 21
©2008–22 New Relic, Inc. All rights reserved
@LeonAdato
bit.ly/miami-signup
IT’S FREE!!
FOREVER
You also need it
for this workshop
© 2022 New Relic, Inc. All rights reserved.
Closing gaps in visibility
With New Relic Flex
Leon Adato
$date();
© 2022 New Relic, Inc. All rights reserved.
Leon Adato
• Principal DevRel Advocate @ New Relic
• Started in tech ~33 yrs ago
• Focus on monitoring for ~20 yrs
• Tivoli, BMC, OpenView, Nagios, SolarWinds
Perl scripts, batch files,
and New Relic (duh)
• Built monitoring for small, medium,
and ludicrous size orgs.
• @LeonAdato almost everywhere
© 2022 New Relic, Inc. All rights reserved.
This is an Oyster Talk™
● Installing the Infrastructure agent
● YAML and the Flex directory
● Flex and command line output
● Flex and script output
● Flex and JSON output
● Troubleshooting
©2008–22 New Relic, Inc. All rights reserved
@LeonAdato
© 2022 New Relic, Inc. All rights reserved.
What isn’t (always) covered
● Standard commercial off-the-shelf (COTS) software
○ Exchange, Sharepoint, Blackberry, SAP, Storage
management, etc.
● Customized standard software
○ SAP, Wordpress, Drupal, etc)
● Custom data found in custom-built applications
© 2022 New Relic, Inc. All rights reserved.
Why you need* custom monitoring values
If what you need isn’t built into your monitoring / observability tool, you can:
● Place a feature request with the vendor, asking to add the metric.
○ And then wait. And pray. And maybe scream if you think it will help**
● Ask the community if/how they've solved the issue
○ IF there's an active community.
● Start shopping for yet-another-monitoring-tool
* probably
** spoiler: It won’t.
© 2022 New Relic, Inc. All rights reserved.
That sounds dumb
Or - and just hear me out - you could use your
monitoring / observability tool’s BUILT-IN ability to
collect custom metrics.
DUH!
© 2022 New Relic, Inc. All rights reserved.
What is Flex?
● Application-agnostic integration into New Relic
● Samples & more
https://github.com/newrelic/nri-flex
© 2022 New Relic, Inc. All rights reserved.
Agent
YAML
How does Flex ACTUALLY work?
Data!
© 2022 New Relic, Inc. All rights reserved.
YAML starter kit for the uninitiated
integrations:
- name: nri-flex
config:
name: NameyMcNameyFace
apis:
- event_type: <something here>
<lots more stuff here>
© 2022 New Relic, Inc. All rights reserved.
What can Flex do?
Collect metrics from a variety of outputs, and seamlessly send them
to New Relic for display on dashboards, use in alerts, etc. It can grab
data from
● A utility’s <stdout>.
● The output or return values of a script or program.
● JSON data generated by a local application.
● JSON data returned from a web page or external API call.
● Data scraped from a web page.
© 2022 New Relic, Inc. All rights reserved.
OK, but what is that in real life?
● LinuxAteMyRam.com - why sysadmins drink
● The IOT coffee pot - why security admins drink
● Everyone blaming the network - why network engineers drink
● A bunch of Oracle servers, and no way to get specific metrics.
● A different customer had >4k batch jobs per day, and needed
specific information on completion, size, return codes, etc.
● Or even finding the IIS space station and checking if your
current weather conditions will let you see it.
© 2022 New Relic, Inc. All rights reserved.
LESSON 1: Install the New Relic infra agent
© 2022 New Relic, Inc. All rights reserved.
LESSON 2: Your First YAML
integrations:
- name: nri-flex
config:
name: linuxFileSystemIntegration
apis:
- name: TestFlex
commands:
- run: 'df -PT -B1 -x tmpfs -x xfs -x vxfs -x btrfs -x ext -x ext2 -x ext3'
split: horizontal
split_by: s+
row_start: 1
set_header: [fs,fsType,capacityBytes,usedBytes,availableBytes,usedPerc,mountedOn]
perc_to_decimal: true
© 2022 New Relic, Inc. All rights reserved.
LESSON 3: The Necessary NRQL
FROM TestFlexSample SELECT average(availableBytes) TIMESERIES
© 2022 New Relic, Inc. All rights reserved.
LESSON 4: Flex with script output
integrations:
- name: nri-flex
timeout: 5m
interval: 10m
config:
name: linuxspeedtest
apis:
- name: pyspeedtest
commands:
- run: sudo python3 /flexlab/NR_checkspeed.py
split: horizontal
split_by: s+
set_header: [latency,download,upload]
timeout: 300000
© 2022 New Relic, Inc. All rights reserved.
LESSON 5: More NRQL
FROM pyspeedtestSample
SELECT average(download), average(upload)
TIMESERIES
© 2022 New Relic, Inc. All rights reserved.
LESSON 6: Flex with JSON output
integrations:
- name: nri-flex
timeout: 5m
interval: 10m
config:
name: linuxspeedtest
apis:
- name: speedtest
commands:
- run: speedtest --accept-license --accept-gcp -f json
timeout: 300000
remove_keys:
- timestamp
© 2022 New Relic, Inc. All rights reserved.
LESSON 7: Still more NRQL
FROM speedtestSample
select average(download.bandwidth)/125000,
average(upload.bandwidth)/125000
TIMESERIES
© 2022 New Relic, Inc. All rights reserved.
LESSON 8: Troubleshooting*
sudo /var/db/newrelic-infra/newrelic-integrations/bin/nri-flex
--verbose --pretty --config_file <path>/<your yaml>.yml
Edit /etc/newrelic-infra.yml
log:
file: '/var/log/newrelic-infra/newrelic-infra.log'
level: debug
forward: true
stdout: false
* and other swear words

More Related Content

Similar to Flex Workshop, New Relic O11y Days

Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...Nagios
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps WorkshopWeaveworks
 
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetupragss
 
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...Henning Jacobs
 
Jenkins: Portability Testing & Dealing With Limits
Jenkins: Portability Testing & Dealing With LimitsJenkins: Portability Testing & Dealing With Limits
Jenkins: Portability Testing & Dealing With LimitsClemens Scholz
 
Heroku for team collaboration
Heroku for team collaborationHeroku for team collaboration
Heroku for team collaborationJohn Stevenson
 
Heroku for-team-collaboration
Heroku for-team-collaborationHeroku for-team-collaboration
Heroku for-team-collaborationJohn Stevenson
 
How to react: Chapter 1, The Beginning
How to react: Chapter 1, The Beginning How to react: Chapter 1, The Beginning
How to react: Chapter 1, The Beginning Om Prakash
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL ContainersMatt Lord
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...GetInData
 
Gray Cover_ The dangers of cloudshells.pdf
Gray Cover_ The dangers of cloudshells.pdfGray Cover_ The dangers of cloudshells.pdf
Gray Cover_ The dangers of cloudshells.pdfColin Estep
 
Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021InfluxData
 
2018 Genivi Xen Overview Nov Update
2018 Genivi Xen Overview Nov Update2018 Genivi Xen Overview Nov Update
2018 Genivi Xen Overview Nov UpdateThe Linux Foundation
 
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...HostedbyConfluent
 
Hlb private cloud rules of engagement idc
Hlb private cloud rules of engagement   idcHlb private cloud rules of engagement   idc
Hlb private cloud rules of engagement idcYew Jin Kang
 
Devops phase-1
Devops phase-1Devops phase-1
Devops phase-1G R VISHAL
 

Similar to Flex Workshop, New Relic O11y Days (20)

Online spanish meetup #2
Online spanish meetup #2Online spanish meetup #2
Online spanish meetup #2
 
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
 
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
 
Jenkins: Portability Testing & Dealing With Limits
Jenkins: Portability Testing & Dealing With LimitsJenkins: Portability Testing & Dealing With Limits
Jenkins: Portability Testing & Dealing With Limits
 
Heroku for team collaboration
Heroku for team collaborationHeroku for team collaboration
Heroku for team collaboration
 
Heroku for-team-collaboration
Heroku for-team-collaborationHeroku for-team-collaboration
Heroku for-team-collaboration
 
How to react: Chapter 1, The Beginning
How to react: Chapter 1, The Beginning How to react: Chapter 1, The Beginning
How to react: Chapter 1, The Beginning
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
 
Gray Cover_ The dangers of cloudshells.pdf
Gray Cover_ The dangers of cloudshells.pdfGray Cover_ The dangers of cloudshells.pdf
Gray Cover_ The dangers of cloudshells.pdf
 
Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021
 
Kubexperience intro session
Kubexperience intro sessionKubexperience intro session
Kubexperience intro session
 
2018 Genivi Xen Overview Nov Update
2018 Genivi Xen Overview Nov Update2018 Genivi Xen Overview Nov Update
2018 Genivi Xen Overview Nov Update
 
Jenkins x gitops
Jenkins x gitopsJenkins x gitops
Jenkins x gitops
 
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
 
Nagios-yating
Nagios-yatingNagios-yating
Nagios-yating
 
Hlb private cloud rules of engagement idc
Hlb private cloud rules of engagement   idcHlb private cloud rules of engagement   idc
Hlb private cloud rules of engagement idc
 
Devops phase-1
Devops phase-1Devops phase-1
Devops phase-1
 

Recently uploaded

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Flex Workshop, New Relic O11y Days

  • 1. ©2008–22 New Relic, Inc. All rights reserved @LeonAdato bit.ly/miami-signup IT’S FREE!! FOREVER You also need it for this workshop
  • 2. © 2022 New Relic, Inc. All rights reserved. Closing gaps in visibility With New Relic Flex Leon Adato $date();
  • 3. © 2022 New Relic, Inc. All rights reserved. Leon Adato • Principal DevRel Advocate @ New Relic • Started in tech ~33 yrs ago • Focus on monitoring for ~20 yrs • Tivoli, BMC, OpenView, Nagios, SolarWinds Perl scripts, batch files, and New Relic (duh) • Built monitoring for small, medium, and ludicrous size orgs. • @LeonAdato almost everywhere
  • 4. © 2022 New Relic, Inc. All rights reserved. This is an Oyster Talk™ ● Installing the Infrastructure agent ● YAML and the Flex directory ● Flex and command line output ● Flex and script output ● Flex and JSON output ● Troubleshooting
  • 5. ©2008–22 New Relic, Inc. All rights reserved @LeonAdato
  • 6. © 2022 New Relic, Inc. All rights reserved. What isn’t (always) covered ● Standard commercial off-the-shelf (COTS) software ○ Exchange, Sharepoint, Blackberry, SAP, Storage management, etc. ● Customized standard software ○ SAP, Wordpress, Drupal, etc) ● Custom data found in custom-built applications
  • 7. © 2022 New Relic, Inc. All rights reserved. Why you need* custom monitoring values If what you need isn’t built into your monitoring / observability tool, you can: ● Place a feature request with the vendor, asking to add the metric. ○ And then wait. And pray. And maybe scream if you think it will help** ● Ask the community if/how they've solved the issue ○ IF there's an active community. ● Start shopping for yet-another-monitoring-tool * probably ** spoiler: It won’t.
  • 8. © 2022 New Relic, Inc. All rights reserved. That sounds dumb Or - and just hear me out - you could use your monitoring / observability tool’s BUILT-IN ability to collect custom metrics. DUH!
  • 9. © 2022 New Relic, Inc. All rights reserved. What is Flex? ● Application-agnostic integration into New Relic ● Samples & more https://github.com/newrelic/nri-flex
  • 10. © 2022 New Relic, Inc. All rights reserved. Agent YAML How does Flex ACTUALLY work? Data!
  • 11. © 2022 New Relic, Inc. All rights reserved. YAML starter kit for the uninitiated integrations: - name: nri-flex config: name: NameyMcNameyFace apis: - event_type: <something here> <lots more stuff here>
  • 12. © 2022 New Relic, Inc. All rights reserved. What can Flex do? Collect metrics from a variety of outputs, and seamlessly send them to New Relic for display on dashboards, use in alerts, etc. It can grab data from ● A utility’s <stdout>. ● The output or return values of a script or program. ● JSON data generated by a local application. ● JSON data returned from a web page or external API call. ● Data scraped from a web page.
  • 13. © 2022 New Relic, Inc. All rights reserved. OK, but what is that in real life? ● LinuxAteMyRam.com - why sysadmins drink ● The IOT coffee pot - why security admins drink ● Everyone blaming the network - why network engineers drink ● A bunch of Oracle servers, and no way to get specific metrics. ● A different customer had >4k batch jobs per day, and needed specific information on completion, size, return codes, etc. ● Or even finding the IIS space station and checking if your current weather conditions will let you see it.
  • 14. © 2022 New Relic, Inc. All rights reserved. LESSON 1: Install the New Relic infra agent
  • 15. © 2022 New Relic, Inc. All rights reserved. LESSON 2: Your First YAML integrations: - name: nri-flex config: name: linuxFileSystemIntegration apis: - name: TestFlex commands: - run: 'df -PT -B1 -x tmpfs -x xfs -x vxfs -x btrfs -x ext -x ext2 -x ext3' split: horizontal split_by: s+ row_start: 1 set_header: [fs,fsType,capacityBytes,usedBytes,availableBytes,usedPerc,mountedOn] perc_to_decimal: true
  • 16. © 2022 New Relic, Inc. All rights reserved. LESSON 3: The Necessary NRQL FROM TestFlexSample SELECT average(availableBytes) TIMESERIES
  • 17. © 2022 New Relic, Inc. All rights reserved. LESSON 4: Flex with script output integrations: - name: nri-flex timeout: 5m interval: 10m config: name: linuxspeedtest apis: - name: pyspeedtest commands: - run: sudo python3 /flexlab/NR_checkspeed.py split: horizontal split_by: s+ set_header: [latency,download,upload] timeout: 300000
  • 18. © 2022 New Relic, Inc. All rights reserved. LESSON 5: More NRQL FROM pyspeedtestSample SELECT average(download), average(upload) TIMESERIES
  • 19. © 2022 New Relic, Inc. All rights reserved. LESSON 6: Flex with JSON output integrations: - name: nri-flex timeout: 5m interval: 10m config: name: linuxspeedtest apis: - name: speedtest commands: - run: speedtest --accept-license --accept-gcp -f json timeout: 300000 remove_keys: - timestamp
  • 20. © 2022 New Relic, Inc. All rights reserved. LESSON 7: Still more NRQL FROM speedtestSample select average(download.bandwidth)/125000, average(upload.bandwidth)/125000 TIMESERIES
  • 21. © 2022 New Relic, Inc. All rights reserved. LESSON 8: Troubleshooting* sudo /var/db/newrelic-infra/newrelic-integrations/bin/nri-flex --verbose --pretty --config_file <path>/<your yaml>.yml Edit /etc/newrelic-infra.yml log: file: '/var/log/newrelic-infra/newrelic-infra.log' level: debug forward: true stdout: false * and other swear words