SlideShare a Scribd company logo
Extending IcingaWeb2 with
Modules
powerful, smart and easily created
Nicolas Schneider, OSMC 2023
2
Agenda
1 About me
2 About Rise
3 How?
4 Checkreports
5 Impersonate
6 Teamdashboard
7 Customdashboard
8 Monitoringbackports
9 PluginDocBuilder
10 Scaffoldbuilder
11 Enhancement of Map
12 Demo
13 Links
© RISE
3
▪ Nicolas Schneider aka moreamazingnick
▪ Work in monitoring since 2021
▪ Studied Medical Computer Science (B.Sc.)
▪ AmazingNick was already in use on GitHub
About me
© RISE
4
Research Industrial Systems Engineering (RISE)
at a quick glance
Key figures
• Created as a spin-off of the TU Vienna in 1988
• Active in architecture, safety engineering &
software development
• Developed services needs to be monitored
Locations
• Company headquarter in Austria (Vienna & Schwechat)
• Offices in several countries
RISE Konnektor
© RISE
www.rise-world.com
How is IcingaWeb2 extensible?
6
▪ Modules with own functionality
▪ Inherit from existing classes or “reuse” the code
▪ Change behavior
▪ IcingaWeb2 provides Hook
▪ HostActionsHook
▪ Modules can provide Hooks too
▪ DataTypeHook (Icinga Director)
▪ ReportHook (Reporting)
▪ CLI actions
▪ Themes
How is IcingaWeb2 extensible?
© RISE
Checkreports
8
▪ CheckResult
▪ Update-Report
▪ Regularly
▪ Scheduler
▪ Portable format
▪ Pdf
▪ These are already features of the
reporting module
▪ Using ReportHook
Checkreports
© RISE
9
▪ Why can’t I use a Notification plugin
▪ Triggered by state change
▪ Or external scheduling needed
▪ No pdf
Checkreports
© RISE
10
▪ Path
▪ Smooth as it is based on idoreports
▪ IDO implementation first
▪ Access the check result instead of the SLA
▪ Challenges
▪ IcingaDB
▪ Plugin Output was sometimes not the same?
▪ Added the last Execution Time
▪ Plugin Output was outdated
▪ $query->
▪ setResultSetClass(VolatileStateResults::class);
Checkreports
© RISE
Impersonate
12
▪ Other Applications have that too
▪ Debugging
▪ Disabled Dashboards
▪ Restrictions
▪ Icinga Community Call
Impersonate
© RISE
13
▪ Path
▪ Copy LoginController
▪ Copy LoginForm
▪ Copy views
▪ Remove password field
▪ Remove some styles
▪ Remove every check ☺
▪ Open Questions
▪ Domain awareness
▪ Open a ticket if it doesn’t work
Impersonate
© RISE
Dashboards
15
▪ Icinga is working on something
▪ Enhanced Dashboards #3809
▪ You can use this till it’s ready
▪ It shows how extensible IcingaWeb2 is
Dashboards
© RISE
Teamdashboards
17
▪ Inspired by enforceddashboards
▪ by Thomas Gelf
▪ Community issue
▪ Sharing Dashboards create an overflow
▪ Global Dashboards using configuration.php causes overflow too
▪ Having a “virtual” or real user
▪ Map Dashboard to other users
▪ Keep your own Dashboards
▪ Manage via Roles
▪ Rename “users” in the menu
▪ Pro Tipp
▪ Use Impersonate module to change the
other Dashboard
Teamdashboards
© RISE
18
▪ Path
▪ Using Scaffoldbuilder (Ini-Repository)
▪ Copy Dashboard.php
▪ Copy DashboardController.php
▪ Copy views
▪ Allow to set a user
▪ Adapt some urls
▪ Remove unused code
▪ Using Roles / Permissions
▪ Open Questions
▪ Do you need Current Incidents too?
▪ Current Incidents
▪ Muted
▪ Overdue
Teamdashboards
© RISE
Customdashboards
20
▪ Inspired by teamdashboards
▪ It’s a community issue, post in the forum
▪ Community issue
▪ Sharing Dashboards create an overflow
▪ Global Dashboards using configuration.php causes overflow too
▪ Create Dashboards manually
▪ Pane name
▪ URL
▪ Map it to other users
▪ Keep your own Dashboards
▪ Manage via Roles
▪ Change the name in the menu
▪ Change the icon
▪ Change the position
▪ Add entries via CLI
Customdashboards
© RISE
Monitoringbackports
22
▪ I will show you who to change behavior of other modules
▪ Without actually changing their code
▪ Changing behavior this way make it difficult for the original authors to debug
problems.
▪ Be careful what you create this way…
DISCLAIMER
© RISE
23
▪ Inspired by a post in the Icinga Community Forum
▪ I did not remember that this was there in icingaweb2 2.9
▪ First idea: backport this back into the monitoring module
▪ Some queries where removed
▪ Not a big problem
▪ Why did Icinga remove it?
▪ Implement this a module
▪ “Hook” into the monitoring module
▪ It’s not “Monkey patching”
▪ Super close to it..
Monitoringbackports
© RISE
24
▪ MVC-Pattern
▪ URL => /list/hosts
▪ Inherit from ListController
▪ Overwrite the hostsAction()
▪ Get the missing data
▪ Some magic
▪ addHelpersPath()
▪ addScriptsPath()
▪ Not now
▪ We need to use our view
Monitoringbackports – Inheritance
© RISE
25
▪ ListController
▪ Different module name (monitoringbackports)
▪ Problem with the monitoring css
▪ Solved with this:
Monitoringbackports – Inheritance
© RISE
26
▪ View script
▪ views/scripts/list/hosts.phtml
▪ Copy from the monitoring
module
▪ Backport this from 2.9
▪ Problem with the other views
▪ hostsummary.phtml
▪ sectioninfo.phtml
▪ Copy them too?
Monitoringbackports – view
© RISE
27
▪ View script
▪ At the end it wants to load something from the monitoring module
▪ We don’t want to duplicate that
▪ addScriptPath()
Monitoringbackports – how?
© RISE
28
▪ A module named monitoringbackports
▪ It provides a host list
▪ With our minimal changes
▪ Not integrated into icingaweb2-module-monitoring
▪ But reachable via /icingaweb2/monitoringbackports/list/hosts
▪ We need more magic…
Monitoringbackports – What do we have till now?
© RISE
29
▪ run.php
▪ Rewrite the route
▪ idea from the cube module
Monitoringbackports – replace the Controller
© RISE
PluginDocBuilder
31
▪ Build a documentation module based on your check plugins
▪ Use a Template
▪ Use Icinga Director information
▪ Include good Documentation like
▪ icinga-powershell-plugins
▪ icinga-powershell-mssql
▪ icinga-itl
▪ Combine everything
PluginDocBuilder
© RISE
32
▪ Path
▪ Using Scaffoldbuilder (Ini-Repository)
▪ Download releases from GitHub
▪ Extract & combine
▪ Already amazing
▪ Access Icinga Director Command Fields
▪ Extract information
▪ Fill out my documentation template
▪ Key Questions
▪ Is it ready yet?
▪ No
▪ Is it on GitHub yet?
▪ No
▪ Can you show it to us?
▪ YES
PluginDocBuilder
© RISE
Scaffoldbuilder
34
▪ Create module based on almost any name
▪ Get all directories ready
▪ Having a basic IndexController
▪ Blank Page Syndrome
▪ Having a first menu item
▪ Get the Namespaces right for reference implementation
▪ Get all the important config files
▪ Get multiple IniRepositories
▪ Get a ModuleConfig (ini file)
▪ Get a generic documentation
▪ Fill it out
▪ Don’t start from scratch
Scaffoldbuilder
© RISE
Map
36
▪ By Nicolai Buchwitz
▪ Based on latest master
▪ So there is a IcingaDb integration
▪ Adapted search
▪ Updated mapDatatype
▪ Add the Ini-Repository for other
“default maps”
▪ Provide permissions for these maps
icingaweb2-module-map
Confidential © RISE
DEMO
38
Where to get it? => GitHub
▪ RISE-GMBH
▪ Everything else
© RISE
▪ Moreamazingnick
▪ Scaffoldbuilder
▪ monitoringbackports
39
Porto Alegre
Bangalore
Dubai
North Africa
Paris
Bern
Berlin
Vienna
© RISE
THANK YOU
Research Industrial Systems Engineering (RISE)
Forschungs-, Entwicklungs- und Großprojektberatung GmbH
Concorde Business Park F
2320 Schwechat, Austria
Mail welcome@rise-world.com
Tel +43 1 9049007-0
Fax +43 1 5057473
Web www.rise-world.com
Contact
OSMC 2023 | Extending Icinga Web with Modules: powerful, smart and easily created by Nicolas Schneider

More Related Content

Similar to OSMC 2023 | Extending Icinga Web with Modules: powerful, smart and easily created by Nicolas Schneider

Establish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoEstablish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoUnic
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesYshay Yaacobi
 
stackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk Sternstackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk SternNETWAYS
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Cisco DevNet
 
Why you should consider a microframework for your next web project
Why you should consider a microframework for your next web projectWhy you should consider a microframework for your next web project
Why you should consider a microframework for your next web projectJoaquín Muñoz M.
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison AnalysisClever Moe
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDan Stine
 
Sprint 178
Sprint 178Sprint 178
Sprint 178ManageIQ
 
MIGRATION - PAIN OR GAIN?
MIGRATION - PAIN OR GAIN?MIGRATION - PAIN OR GAIN?
MIGRATION - PAIN OR GAIN?DrupalCamp Kyiv
 
Использование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийИспользование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийVitebsk Miniq
 
Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014adriantwright
 
Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.ICON UK EVENTS Limited
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Cisco DevNet
 

Similar to OSMC 2023 | Extending Icinga Web with Modules: powerful, smart and easily created by Nicolas Schneider (20)

Establish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoEstablish reliable builds and deployments with Magento
Establish reliable builds and deployments with Magento
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
DevOps for DBAs
DevOps for DBAsDevOps for DBAs
DevOps for DBAs
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositories
 
stackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk Sternstackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk Stern
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Cialug August 2021
Cialug August 2021Cialug August 2021
Cialug August 2021
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
 
Why you should consider a microframework for your next web project
Why you should consider a microframework for your next web projectWhy you should consider a microframework for your next web project
Why you should consider a microframework for your next web project
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
 
Sprint 178
Sprint 178Sprint 178
Sprint 178
 
Sprint 178
Sprint 178Sprint 178
Sprint 178
 
MIGRATION - PAIN OR GAIN?
MIGRATION - PAIN OR GAIN?MIGRATION - PAIN OR GAIN?
MIGRATION - PAIN OR GAIN?
 
Cms expo
Cms expoCms expo
Cms expo
 
Использование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийИспользование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложений
 
Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014
 
Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
 

Recently uploaded

Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfSkillCertProExams
 
527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdfrajpreetkaur75080
 
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...Rahsaan L. Browne
 
OC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaOC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaRahsaan L. Browne
 
The Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDFThe Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDFRahsaan L. Browne
 
Cymulate (Breach and Attack Simulation).
Cymulate (Breach and Attack Simulation).Cymulate (Breach and Attack Simulation).
Cymulate (Breach and Attack Simulation).luckyk1575
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.bazilnaeem7
 
Hi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptxHi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptxShivamM16
 
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxMogul Press
 
05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community Networking05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community NetworkingMichael Orias
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnairebazilnaeem7
 
123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptx123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptxgargh1099
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024SkillCertProExams
 
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22LHelferty
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxFamilyWorshipCenterD
 

Recently uploaded (15)

Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
 
527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf
 
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
 
OC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaOC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa Ana
 
The Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDFThe Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDF
 
Cymulate (Breach and Attack Simulation).
Cymulate (Breach and Attack Simulation).Cymulate (Breach and Attack Simulation).
Cymulate (Breach and Attack Simulation).
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.
 
Hi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptxHi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptx
 
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
 
05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community Networking05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community Networking
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnaire
 
123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptx123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptx
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024
 
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptx
 

OSMC 2023 | Extending Icinga Web with Modules: powerful, smart and easily created by Nicolas Schneider

  • 1. Extending IcingaWeb2 with Modules powerful, smart and easily created Nicolas Schneider, OSMC 2023
  • 2. 2 Agenda 1 About me 2 About Rise 3 How? 4 Checkreports 5 Impersonate 6 Teamdashboard 7 Customdashboard 8 Monitoringbackports 9 PluginDocBuilder 10 Scaffoldbuilder 11 Enhancement of Map 12 Demo 13 Links © RISE
  • 3. 3 ▪ Nicolas Schneider aka moreamazingnick ▪ Work in monitoring since 2021 ▪ Studied Medical Computer Science (B.Sc.) ▪ AmazingNick was already in use on GitHub About me © RISE
  • 4. 4 Research Industrial Systems Engineering (RISE) at a quick glance Key figures • Created as a spin-off of the TU Vienna in 1988 • Active in architecture, safety engineering & software development • Developed services needs to be monitored Locations • Company headquarter in Austria (Vienna & Schwechat) • Offices in several countries RISE Konnektor © RISE www.rise-world.com
  • 5. How is IcingaWeb2 extensible?
  • 6. 6 ▪ Modules with own functionality ▪ Inherit from existing classes or “reuse” the code ▪ Change behavior ▪ IcingaWeb2 provides Hook ▪ HostActionsHook ▪ Modules can provide Hooks too ▪ DataTypeHook (Icinga Director) ▪ ReportHook (Reporting) ▪ CLI actions ▪ Themes How is IcingaWeb2 extensible? © RISE
  • 8. 8 ▪ CheckResult ▪ Update-Report ▪ Regularly ▪ Scheduler ▪ Portable format ▪ Pdf ▪ These are already features of the reporting module ▪ Using ReportHook Checkreports © RISE
  • 9. 9 ▪ Why can’t I use a Notification plugin ▪ Triggered by state change ▪ Or external scheduling needed ▪ No pdf Checkreports © RISE
  • 10. 10 ▪ Path ▪ Smooth as it is based on idoreports ▪ IDO implementation first ▪ Access the check result instead of the SLA ▪ Challenges ▪ IcingaDB ▪ Plugin Output was sometimes not the same? ▪ Added the last Execution Time ▪ Plugin Output was outdated ▪ $query-> ▪ setResultSetClass(VolatileStateResults::class); Checkreports © RISE
  • 12. 12 ▪ Other Applications have that too ▪ Debugging ▪ Disabled Dashboards ▪ Restrictions ▪ Icinga Community Call Impersonate © RISE
  • 13. 13 ▪ Path ▪ Copy LoginController ▪ Copy LoginForm ▪ Copy views ▪ Remove password field ▪ Remove some styles ▪ Remove every check ☺ ▪ Open Questions ▪ Domain awareness ▪ Open a ticket if it doesn’t work Impersonate © RISE
  • 15. 15 ▪ Icinga is working on something ▪ Enhanced Dashboards #3809 ▪ You can use this till it’s ready ▪ It shows how extensible IcingaWeb2 is Dashboards © RISE
  • 17. 17 ▪ Inspired by enforceddashboards ▪ by Thomas Gelf ▪ Community issue ▪ Sharing Dashboards create an overflow ▪ Global Dashboards using configuration.php causes overflow too ▪ Having a “virtual” or real user ▪ Map Dashboard to other users ▪ Keep your own Dashboards ▪ Manage via Roles ▪ Rename “users” in the menu ▪ Pro Tipp ▪ Use Impersonate module to change the other Dashboard Teamdashboards © RISE
  • 18. 18 ▪ Path ▪ Using Scaffoldbuilder (Ini-Repository) ▪ Copy Dashboard.php ▪ Copy DashboardController.php ▪ Copy views ▪ Allow to set a user ▪ Adapt some urls ▪ Remove unused code ▪ Using Roles / Permissions ▪ Open Questions ▪ Do you need Current Incidents too? ▪ Current Incidents ▪ Muted ▪ Overdue Teamdashboards © RISE
  • 20. 20 ▪ Inspired by teamdashboards ▪ It’s a community issue, post in the forum ▪ Community issue ▪ Sharing Dashboards create an overflow ▪ Global Dashboards using configuration.php causes overflow too ▪ Create Dashboards manually ▪ Pane name ▪ URL ▪ Map it to other users ▪ Keep your own Dashboards ▪ Manage via Roles ▪ Change the name in the menu ▪ Change the icon ▪ Change the position ▪ Add entries via CLI Customdashboards © RISE
  • 22. 22 ▪ I will show you who to change behavior of other modules ▪ Without actually changing their code ▪ Changing behavior this way make it difficult for the original authors to debug problems. ▪ Be careful what you create this way… DISCLAIMER © RISE
  • 23. 23 ▪ Inspired by a post in the Icinga Community Forum ▪ I did not remember that this was there in icingaweb2 2.9 ▪ First idea: backport this back into the monitoring module ▪ Some queries where removed ▪ Not a big problem ▪ Why did Icinga remove it? ▪ Implement this a module ▪ “Hook” into the monitoring module ▪ It’s not “Monkey patching” ▪ Super close to it.. Monitoringbackports © RISE
  • 24. 24 ▪ MVC-Pattern ▪ URL => /list/hosts ▪ Inherit from ListController ▪ Overwrite the hostsAction() ▪ Get the missing data ▪ Some magic ▪ addHelpersPath() ▪ addScriptsPath() ▪ Not now ▪ We need to use our view Monitoringbackports – Inheritance © RISE
  • 25. 25 ▪ ListController ▪ Different module name (monitoringbackports) ▪ Problem with the monitoring css ▪ Solved with this: Monitoringbackports – Inheritance © RISE
  • 26. 26 ▪ View script ▪ views/scripts/list/hosts.phtml ▪ Copy from the monitoring module ▪ Backport this from 2.9 ▪ Problem with the other views ▪ hostsummary.phtml ▪ sectioninfo.phtml ▪ Copy them too? Monitoringbackports – view © RISE
  • 27. 27 ▪ View script ▪ At the end it wants to load something from the monitoring module ▪ We don’t want to duplicate that ▪ addScriptPath() Monitoringbackports – how? © RISE
  • 28. 28 ▪ A module named monitoringbackports ▪ It provides a host list ▪ With our minimal changes ▪ Not integrated into icingaweb2-module-monitoring ▪ But reachable via /icingaweb2/monitoringbackports/list/hosts ▪ We need more magic… Monitoringbackports – What do we have till now? © RISE
  • 29. 29 ▪ run.php ▪ Rewrite the route ▪ idea from the cube module Monitoringbackports – replace the Controller © RISE
  • 31. 31 ▪ Build a documentation module based on your check plugins ▪ Use a Template ▪ Use Icinga Director information ▪ Include good Documentation like ▪ icinga-powershell-plugins ▪ icinga-powershell-mssql ▪ icinga-itl ▪ Combine everything PluginDocBuilder © RISE
  • 32. 32 ▪ Path ▪ Using Scaffoldbuilder (Ini-Repository) ▪ Download releases from GitHub ▪ Extract & combine ▪ Already amazing ▪ Access Icinga Director Command Fields ▪ Extract information ▪ Fill out my documentation template ▪ Key Questions ▪ Is it ready yet? ▪ No ▪ Is it on GitHub yet? ▪ No ▪ Can you show it to us? ▪ YES PluginDocBuilder © RISE
  • 34. 34 ▪ Create module based on almost any name ▪ Get all directories ready ▪ Having a basic IndexController ▪ Blank Page Syndrome ▪ Having a first menu item ▪ Get the Namespaces right for reference implementation ▪ Get all the important config files ▪ Get multiple IniRepositories ▪ Get a ModuleConfig (ini file) ▪ Get a generic documentation ▪ Fill it out ▪ Don’t start from scratch Scaffoldbuilder © RISE
  • 35. Map
  • 36. 36 ▪ By Nicolai Buchwitz ▪ Based on latest master ▪ So there is a IcingaDb integration ▪ Adapted search ▪ Updated mapDatatype ▪ Add the Ini-Repository for other “default maps” ▪ Provide permissions for these maps icingaweb2-module-map Confidential © RISE
  • 37. DEMO
  • 38. 38 Where to get it? => GitHub ▪ RISE-GMBH ▪ Everything else © RISE ▪ Moreamazingnick ▪ Scaffoldbuilder ▪ monitoringbackports
  • 39. 39 Porto Alegre Bangalore Dubai North Africa Paris Bern Berlin Vienna © RISE THANK YOU Research Industrial Systems Engineering (RISE) Forschungs-, Entwicklungs- und Großprojektberatung GmbH Concorde Business Park F 2320 Schwechat, Austria Mail welcome@rise-world.com Tel +43 1 9049007-0 Fax +43 1 5057473 Web www.rise-world.com Contact