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

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
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 Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
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 Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

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