SlideShare a Scribd company logo
Dashboards as Code
Sanooj Mananghat RootConf
Data Engineer @ Intuit Hyderabad
Demo Day
Scenario I: Teamwork in Dashboard
Problems in Manually created Dashboards
- Human errors
- No Meaningful History
- No Rollbacks
- Incosistent Dashbaords
Scenario II : Concurrent Modification
- Difficult to Collaborate
- Introduces Conflicts.
Scenarios III: External Consumers
Problems in Manually created Dashboards
- Lacs Hygiene
- No separate test environment
- No/Minimal Peer Review System
DRY
- Effects productivity
- Zero value add
- Difficult to scale
Problem Statement
• Difficult to collaborate
• Difficult to Scale
• No/Minimal Peer Review
• Effects Productivity
• Introduces conflicts
• Inconsistent
• No Meaningful History
• Untracked Temporary changes
• No Rollback
• Lacks Hygiene
Process
• Process with Source control
Easiest Approach
• Dashboards store data in JSON files.
Bloaty JSON
Dashboards as JSON
- Bloaty huge JSON files
- PR review became impossible
- Duplicate blocks
How can we squeeze the elephant into the car trunk?
JSONNET Templates
• Reduce Boilerplate and redundant code blocks
JSONET Loops
• {
"person1": {
"name": "Alice",
"welcome": "Hello Alice!"
},
"person2": {
"name": "Bob",
"welcome": "Hello Bob!"
},
"person3": {
"name": "Jack",
"welcome": "Hello Jack!"
},
"person4": {
"name": "Jill",
"welcome": "Hello Jill!"
},
"person5": {
"name": "Pokemon",
"welcome": "Hello Pokemon!"
},
"person6": {
"name": "Dora",
"welcome": "Hello Dora!"
},
"person7": {
"name": "Jhony",
"welcome": "Hello Jhony!"
},
"person8": {
"name": "Humpty",
"welcome": "Hello Humpty!"
},
"person99": {
"name": "Dumpty",
"welcome": "Hello Dumpty!"
},
"person10": {
"name": "Tom",
"welcome": "Hello Tom!"
}
}
{
person1: {
name: "Alice",
welcome: "Hello " + self.name + "!",
},
person2: self.person1 { name: “Bob”},
person3: self.person1 { name: “Jack" },
person4: self.person1 { name: “Jill" },
person5: self.person1 { name: “Pokemon" },
person6: self.person1 { name: “Dora" },
person7: self.person1 { name: “Jhony" },
person8: self.person1 { name: “Humty" },
person9: self.person1 { name: “Dumpty" },
person10: self.person1 { name: “Tom" },
}
Architecture
Dashboards as JSONNET
- Simplest solution with less overhead.
- Learning a new language.
- Provisioning is still a challenge.
- Jsonnet for grafana: grafonnet-lib
Manual Provisioning
• Provisioning is still a challenge.
What?
Terraform
• Terraform providers/plugins
• terraform-provider-grafana
• terraform-provider-kibana
• terraform-provider-wavefront
Show me the code!
resource "wavefront_dashboard" "test_dashboard" {
name = "Terraform 12 Dashboard"
url = "tf12-test"
dynamic "section" {
for_each = var.sections
content {
name = section.key
dynamic "row" {
iterator = rows
for_each = section.value
content {
chart {
name = rows.value.name
description = rows.value.description
units = "unit"
source {
name = rows.value.source
query = rows.value.query
}
chart_setting {
type = "line"
}
summarization = "MEAN” } } } } } }
• terraform apply
For loop
Architecture
Dashboards as Code
- No dashboard specialist
- Introduced strict peer review concept
- Reviewing became meaningful
- Consistent and collaborative.
- Easily scalable.
- Rollbacks become easier.
- No repeated works, no clicks.
Dashboards as Code
- Oncall more easier with consistent dashboard.
- Less cognitive overhead.
- Visual Diff with test and prod environment
- Templatizing helped similar dashboard for similar services.
- Monitoring as code
Wrapping Up
• Initial Onboarding time.
• Moved majority of our dashboards to Terraform
• Moving further to Monitoring as Code.
• Grafana-Lib (JSONNET based solution)
• https://github.com/grafana/grafonnet-lib
• Grafana python module - from Weave works
• https://github.com/weaveworks/grafanalib
• Grafana dashboard generator - from Uber
• https://github.com/uber/grafana-dash-gen
And they lived happily ever after!!
Sanooj Mananghat
Data Engineer @ Intuit

More Related Content

Similar to Dashboards as Code

Building Efficient and Reliable Crawler System With Sidekiq Enterprise
Building Efficient and Reliable Crawler System With Sidekiq EnterpriseBuilding Efficient and Reliable Crawler System With Sidekiq Enterprise
Building Efficient and Reliable Crawler System With Sidekiq Enterprise
Gary Chu
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
Peter Presnell
 
MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)
Mike Dirolf
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)
Nordic APIs
 
HAXTheWeb @ Apereo 19
HAXTheWeb @ Apereo 19HAXTheWeb @ Apereo 19
HAXTheWeb @ Apereo 19
btopro
 
AtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and BeyondAtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and Beyond
Sherif Mansour
 
A general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4JA general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4J
Florent Biville
 
"R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)""R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)"
Portland R User Group
 
R, Hadoop and Amazon Web Services
R, Hadoop and Amazon Web ServicesR, Hadoop and Amazon Web Services
R, Hadoop and Amazon Web Services
Portland R User Group
 
Polyglot
PolyglotPolyglot
Polyglot
Rory Preddy
 
Machine Learning for Smarter Apps - Jacksonville Meetup
Machine Learning for Smarter Apps - Jacksonville MeetupMachine Learning for Smarter Apps - Jacksonville Meetup
Machine Learning for Smarter Apps - Jacksonville Meetup
Sri Ambati
 
BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up
Craig Schumann
 
Decoupling Edutopia.org
Decoupling Edutopia.orgDecoupling Edutopia.org
Decoupling Edutopia.org
dsayswhat
 
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
NETWAYS
 
Data Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area MLData Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area ML
Paco Nathan
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Docker, Inc.
 
Teradata Partners Conference Oct 2014 Big Data Anti-Patterns
Teradata Partners Conference Oct 2014   Big Data Anti-PatternsTeradata Partners Conference Oct 2014   Big Data Anti-Patterns
Teradata Partners Conference Oct 2014 Big Data Anti-Patterns
Douglas Moore
 
TIAD : Automating the modern datacenter
TIAD : Automating the modern datacenterTIAD : Automating the modern datacenter
TIAD : Automating the modern datacenter
The Incredible Automation Day
 
Feature driven agile oriented web applications
Feature driven agile oriented web applicationsFeature driven agile oriented web applications
Feature driven agile oriented web applications
Ram G Athreya
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
Marko Mitranić
 

Similar to Dashboards as Code (20)

Building Efficient and Reliable Crawler System With Sidekiq Enterprise
Building Efficient and Reliable Crawler System With Sidekiq EnterpriseBuilding Efficient and Reliable Crawler System With Sidekiq Enterprise
Building Efficient and Reliable Crawler System With Sidekiq Enterprise
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
 
MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)
 
HAXTheWeb @ Apereo 19
HAXTheWeb @ Apereo 19HAXTheWeb @ Apereo 19
HAXTheWeb @ Apereo 19
 
AtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and BeyondAtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and Beyond
 
A general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4JA general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4J
 
"R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)""R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)"
 
R, Hadoop and Amazon Web Services
R, Hadoop and Amazon Web ServicesR, Hadoop and Amazon Web Services
R, Hadoop and Amazon Web Services
 
Polyglot
PolyglotPolyglot
Polyglot
 
Machine Learning for Smarter Apps - Jacksonville Meetup
Machine Learning for Smarter Apps - Jacksonville MeetupMachine Learning for Smarter Apps - Jacksonville Meetup
Machine Learning for Smarter Apps - Jacksonville Meetup
 
BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up
 
Decoupling Edutopia.org
Decoupling Edutopia.orgDecoupling Edutopia.org
Decoupling Edutopia.org
 
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
 
Data Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area MLData Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area ML
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
 
Teradata Partners Conference Oct 2014 Big Data Anti-Patterns
Teradata Partners Conference Oct 2014   Big Data Anti-PatternsTeradata Partners Conference Oct 2014   Big Data Anti-Patterns
Teradata Partners Conference Oct 2014 Big Data Anti-Patterns
 
TIAD : Automating the modern datacenter
TIAD : Automating the modern datacenterTIAD : Automating the modern datacenter
TIAD : Automating the modern datacenter
 
Feature driven agile oriented web applications
Feature driven agile oriented web applicationsFeature driven agile oriented web applications
Feature driven agile oriented web applications
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 

Dashboards as Code

  • 1. Dashboards as Code Sanooj Mananghat RootConf Data Engineer @ Intuit Hyderabad
  • 2.
  • 3.
  • 5. Scenario I: Teamwork in Dashboard
  • 6. Problems in Manually created Dashboards - Human errors - No Meaningful History - No Rollbacks - Incosistent Dashbaords
  • 7. Scenario II : Concurrent Modification - Difficult to Collaborate - Introduces Conflicts.
  • 9. Problems in Manually created Dashboards - Lacs Hygiene - No separate test environment - No/Minimal Peer Review System
  • 10. DRY - Effects productivity - Zero value add - Difficult to scale
  • 11. Problem Statement • Difficult to collaborate • Difficult to Scale • No/Minimal Peer Review • Effects Productivity • Introduces conflicts • Inconsistent • No Meaningful History • Untracked Temporary changes • No Rollback • Lacks Hygiene
  • 12. Process • Process with Source control
  • 13. Easiest Approach • Dashboards store data in JSON files.
  • 15. Dashboards as JSON - Bloaty huge JSON files - PR review became impossible - Duplicate blocks
  • 16. How can we squeeze the elephant into the car trunk?
  • 17. JSONNET Templates • Reduce Boilerplate and redundant code blocks
  • 18. JSONET Loops • { "person1": { "name": "Alice", "welcome": "Hello Alice!" }, "person2": { "name": "Bob", "welcome": "Hello Bob!" }, "person3": { "name": "Jack", "welcome": "Hello Jack!" }, "person4": { "name": "Jill", "welcome": "Hello Jill!" }, "person5": { "name": "Pokemon", "welcome": "Hello Pokemon!" }, "person6": { "name": "Dora", "welcome": "Hello Dora!" }, "person7": { "name": "Jhony", "welcome": "Hello Jhony!" }, "person8": { "name": "Humpty", "welcome": "Hello Humpty!" }, "person99": { "name": "Dumpty", "welcome": "Hello Dumpty!" }, "person10": { "name": "Tom", "welcome": "Hello Tom!" } } { person1: { name: "Alice", welcome: "Hello " + self.name + "!", }, person2: self.person1 { name: “Bob”}, person3: self.person1 { name: “Jack" }, person4: self.person1 { name: “Jill" }, person5: self.person1 { name: “Pokemon" }, person6: self.person1 { name: “Dora" }, person7: self.person1 { name: “Jhony" }, person8: self.person1 { name: “Humty" }, person9: self.person1 { name: “Dumpty" }, person10: self.person1 { name: “Tom" }, }
  • 20. Dashboards as JSONNET - Simplest solution with less overhead. - Learning a new language. - Provisioning is still a challenge. - Jsonnet for grafana: grafonnet-lib
  • 21. Manual Provisioning • Provisioning is still a challenge.
  • 22. What?
  • 23. Terraform • Terraform providers/plugins • terraform-provider-grafana • terraform-provider-kibana • terraform-provider-wavefront
  • 24. Show me the code! resource "wavefront_dashboard" "test_dashboard" { name = "Terraform 12 Dashboard" url = "tf12-test" dynamic "section" { for_each = var.sections content { name = section.key dynamic "row" { iterator = rows for_each = section.value content { chart { name = rows.value.name description = rows.value.description units = "unit" source { name = rows.value.source query = rows.value.query } chart_setting { type = "line" } summarization = "MEAN” } } } } } } • terraform apply For loop
  • 26. Dashboards as Code - No dashboard specialist - Introduced strict peer review concept - Reviewing became meaningful - Consistent and collaborative. - Easily scalable. - Rollbacks become easier. - No repeated works, no clicks.
  • 27. Dashboards as Code - Oncall more easier with consistent dashboard. - Less cognitive overhead. - Visual Diff with test and prod environment - Templatizing helped similar dashboard for similar services. - Monitoring as code
  • 28. Wrapping Up • Initial Onboarding time. • Moved majority of our dashboards to Terraform • Moving further to Monitoring as Code. • Grafana-Lib (JSONNET based solution) • https://github.com/grafana/grafonnet-lib • Grafana python module - from Weave works • https://github.com/weaveworks/grafanalib • Grafana dashboard generator - from Uber • https://github.com/uber/grafana-dash-gen
  • 29. And they lived happily ever after!!