SlideShare a Scribd company logo
1 of 22
Download to read offline
Still directing the Director and more!
Page 1 / 22
Contents
The Monitoring History
The Director-module
The Business Process-module
The Icinga-Collection
Q&A
Page 2 / 22
About us
Daniel Uhlmann
Sebastian Gumprich
Page 3 / 22
Directing the Director in 2019
Anyone remember this guy?
Page 4 / 22
What we did with our architecture
Central kubernetes cluster with icinga instances
at least 45 Icinga instances
Page 5 / 22
What problems we faced with our code
No exsisting upstream modules
instead use Ansible uri-Tasks
Page 6 / 22
What we did with our Ansible code
- name: create service template if it does not exist

  uri:

    headers:

      Accept: application/json

    url: "{{ icinga_host }}/director/service"

    method: POST

    user: "{{ icinga_user }}"

    password: "{{ icinga_pass }}"

    body: '{"check_command":"{{ item.item.check_command }}", 

"object_name":"{{ item.item.name }}", 
"object_type": "template", "use_agent":{{ item.item.use_agent }}}'

    body_format: json

    return_content: yes

  register: service_template_created

  with_items: "{{ service_template_presence.results }}"

  when: "'error' in item.content"

  changed_when: service_template_created.status == 201

  failed_when: service_template_created.status != 201
Page 7 / 22
What we're doing now with the code
- name: Create servicetemplate with event command

t_systems_mms.icinga_director.icinga_service_template:

state: present

url: "{{ icinga_url }}"

url_username: "{{ icinga_user }}"

url_password: "{{ icinga_pass }}"

object_name: apache_check_servicetemplate

use_agent: false

event_command: restart_httpd

notes: "example note"

notes_url: "'http://url1' 'http://url2'"

Page 8 / 22
What we accomplished
Date Feature
04/2020 internal development started
05/2020 Modules on Github in v1.0.0
05/20 - 12/20 command_template, host_template, zones and endpoints, service
01/21 inclusion into Ansible
02/21 facts/info modules for all objects
03/21 usergroups, timeperiod_template
07/21 inventory-plugin
Page 9 / 22
Facts-/Info-modules
> ansible localhost -m t_systems_mms.icinga_director.icinga_host_info -a "query=customer-test-web01"

localhost | SUCCESS => {

"changed": false,

"objects": [

{

"address": "172.29.23.203",

"display_name": "customer-test-web01",
"imports": [

"StandardServer"

],

"object_name": "customer-test-web01",

"object_type": "object"

}

]

}

Page 10 / 22
Inventory Plugin
> ansible-inventory -i test.icinga_director_inventory.yaml --graph

@all:

|--@customer_abn:

| |--customer-abn-internet

| |--customer-abn-web01

|--@customer_dev:

| |--customer-dev-app01

| |--customer-dev-internet

| |--customer-dev-web01

|--@customer_live:

| |--customer-live-app01

| |--customer-live-db01

| |--customer-live-db02

| |--customer-live-internet

Page 11 / 22
Inventory Plugin
object Host "customer-live-web01" {

display_name = "customer-live-web01"

address = "172.29.23.204"

check_command = "hostalive"

max_check_attempts = "3"

check_period = "24/7"

retry_interval = 1m

enable_notifications = true

enable_active_checks = true

enable_passive_checks = false

enable_event_handler = false

enable_perfdata = true

volatile = false

vars.HostOS = "Linux"

}

Page 12 / 22
Inventory Plugin
> ansible customer-live-web01 -m debug

-a "var=hostvars[inventory_hostname]['vars']['HostOS']"

customer-live-web01 | SUCCESS => {

"hostvars[inventory_hostname]['vars']['HostOS']": "Linux"

}

Page 13 / 22
Icinga Director Stats
Page 14 / 22
Let's talk about the Business Processes Plugin (BP)
Optional Icinga2 module
Build custom process-based dashboards
Get visualized Overview over your monitored objects
Page 15 / 22
Example Business Process Node
Page 16 / 22
Collection development
First things first: manually play around with every feature
Check the requests made by the extension (we need those for the upload or
check part f.e)
Our first draft was a Ansible role:
{% if node.operator == 'or' -%}

	 {{ node.name }} = {{ checks|join(' | ') }}

{% elif node.operator == 'not' -%}

	 {{ node.name }} = {{ checks|join(' ! ') }}

{% elif node.operator == 'and' -%}

	 {{ node.name }} = {{ checks|join(' & ') }}

{% elif node.operator is defined -%}

	 {{ node.name }} = {{ node.operator }}: {{ checks|join(' + ') }}

{% endif %}

Page 17 / 22
Configuration overview
---

- hosts: localhost

roles:

- t_systems_mms.icinga_business_process.ansible_icinga_business_process

vars:

icinga_business_processes:

- title: project-live

description: Project Live Environment

owner: "{{ icinga_user }}"

menu: yes

statetype: soft

nodes:

- name: loadbalancer

displayname: Loadbalancer Pools

operator: and

visible: false

checks:

- name: lb01

type: service

service: lb_pool_project-live

- name: lb02

type: service

service: lb_pool_project-live

Page 18 / 22
The future
At this time all functionalities are already implemented
Create service templates as check commands to integrate monitoring-alerts
- service_apply_object:

- "check_bpm"

imports:

- domon-business-process

assign_filter: 'host.name="pseudo-host"'

vars:

config: $bpm_servive_name

process: $bpm_process

Page 19 / 22
Yet another Ansible Icinga collection?
Page 20 / 22
Yet another Ansible Icinga collection?
One Collection to rule them all!
https://github.com/T-Systems-MMS/ansible-collection-icinga
Page 21 / 22
Ending + Questions
Sebastian Gumprich
Sebastian.Gumprich@t-systems.com

https://github.com/rndmh3ro



Daniel Uhlmann
Daniel.Uhlmann@t-systems.com

https://github.com/xFuture603

https://twitter.com/xFuturecs
Page 22 / 22

More Related Content

What's hot

What's hot (20)

Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
 
What's New in NGINX Plus R12?
What's New in NGINX Plus R12? What's New in NGINX Plus R12?
What's New in NGINX Plus R12?
 
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios CoreNagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
 
DevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheusDevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheus
 
Maximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINXMaximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINX
 
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XINagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
 
Zabbix 3.2 presentation June 2017
Zabbix 3.2 presentation June 2017Zabbix 3.2 presentation June 2017
Zabbix 3.2 presentation June 2017
 
Nagios Conference 2011 - Michael Medin - NSClient++: Whats New
Nagios Conference 2011 - Michael Medin - NSClient++: Whats NewNagios Conference 2011 - Michael Medin - NSClient++: Whats New
Nagios Conference 2011 - Michael Medin - NSClient++: Whats New
 
Automating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShellAutomating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShell
 
Nagios Conference 2012 - Mike Weber - Failover
Nagios Conference 2012 - Mike Weber - FailoverNagios Conference 2012 - Mike Weber - Failover
Nagios Conference 2012 - Mike Weber - Failover
 
Citrix TechEdge 2014 - How to Protect Against the Top 10 Web Security Issues ...
Citrix TechEdge 2014 - How to Protect Against the Top 10 Web Security Issues ...Citrix TechEdge 2014 - How to Protect Against the Top 10 Web Security Issues ...
Citrix TechEdge 2014 - How to Protect Against the Top 10 Web Security Issues ...
 
Nagios
NagiosNagios
Nagios
 
Monitor PowerKVM using Ganglia, Nagios
Monitor PowerKVM using Ganglia, NagiosMonitor PowerKVM using Ganglia, Nagios
Monitor PowerKVM using Ganglia, Nagios
 
Nagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza Databases
Nagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza DatabasesNagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza Databases
Nagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza Databases
 
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by Step
 
Container orchestration and microservices world
Container orchestration and microservices worldContainer orchestration and microservices world
Container orchestration and microservices world
 
Monitor Your Business
Monitor Your BusinessMonitor Your Business
Monitor Your Business
 
NGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA BroadcastNGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA Broadcast
 
Introduction to Nginx
Introduction to NginxIntroduction to Nginx
Introduction to Nginx
 

Similar to OSMC 2021 | Still directing the director… and more!

Form Validation NG
Form Validation NGForm Validation NG
Form Validation NG
joaopmaia
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
buildacloud
 

Similar to OSMC 2021 | Still directing the director… and more! (20)

Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20
 
Banshun - OSGi-less modularity for Spring
Banshun - OSGi-less modularity for SpringBanshun - OSGi-less modularity for Spring
Banshun - OSGi-less modularity for Spring
 
Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022
Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022
Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022
 
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey LensenOSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
 
Tips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with ChefTips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with Chef
 
Form Validation NG
Form Validation NGForm Validation NG
Form Validation NG
 
Ansible Automation Inside Cloudforms ( Embedded Ansible)
Ansible Automation Inside Cloudforms ( Embedded Ansible)Ansible Automation Inside Cloudforms ( Embedded Ansible)
Ansible Automation Inside Cloudforms ( Embedded Ansible)
 
How to Increase ICS Cybersecurity Return on Investment (ROI)
How to Increase ICS Cybersecurity Return on Investment (ROI) How to Increase ICS Cybersecurity Return on Investment (ROI)
How to Increase ICS Cybersecurity Return on Investment (ROI)
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Level
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applications
 
A Node.js Developer's Guide to Bluemix
A Node.js Developer's Guide to BluemixA Node.js Developer's Guide to Bluemix
A Node.js Developer's Guide to Bluemix
 
Booting Weblogic - OOW14
Booting Weblogic - OOW14Booting Weblogic - OOW14
Booting Weblogic - OOW14
 
Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0
Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0
Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0
 
How To Build Efficient ML Pipelines From The Startup Perspective (GTC Silicon...
How To Build Efficient ML Pipelines From The Startup Perspective (GTC Silicon...How To Build Efficient ML Pipelines From The Startup Perspective (GTC Silicon...
How To Build Efficient ML Pipelines From The Startup Perspective (GTC Silicon...
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
 
Vue js 2.x
Vue js 2.xVue js 2.x
Vue js 2.x
 
Automated Server Administration for DevSecOps
Automated Server Administration for DevSecOpsAutomated Server Administration for DevSecOps
Automated Server Administration for DevSecOps
 
James Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 PatternsJames Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 Patterns
 
End-to-end web-testing in ruby ecosystem
End-to-end web-testing in ruby ecosystemEnd-to-end web-testing in ruby ecosystem
End-to-end web-testing in ruby ecosystem
 
The MirAL Story
The MirAL StoryThe MirAL Story
The MirAL Story
 

Recently uploaded

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 

OSMC 2021 | Still directing the director… and more!

  • 1. Still directing the Director and more! Page 1 / 22
  • 2. Contents The Monitoring History The Director-module The Business Process-module The Icinga-Collection Q&A Page 2 / 22
  • 3. About us Daniel Uhlmann Sebastian Gumprich Page 3 / 22
  • 4. Directing the Director in 2019 Anyone remember this guy? Page 4 / 22
  • 5. What we did with our architecture Central kubernetes cluster with icinga instances at least 45 Icinga instances Page 5 / 22
  • 6. What problems we faced with our code No exsisting upstream modules instead use Ansible uri-Tasks Page 6 / 22
  • 7. What we did with our Ansible code - name: create service template if it does not exist   uri:     headers:       Accept: application/json     url: "{{ icinga_host }}/director/service"     method: POST     user: "{{ icinga_user }}"     password: "{{ icinga_pass }}"     body: '{"check_command":"{{ item.item.check_command }}", "object_name":"{{ item.item.name }}", "object_type": "template", "use_agent":{{ item.item.use_agent }}}'     body_format: json     return_content: yes   register: service_template_created   with_items: "{{ service_template_presence.results }}"   when: "'error' in item.content"   changed_when: service_template_created.status == 201   failed_when: service_template_created.status != 201 Page 7 / 22
  • 8. What we're doing now with the code - name: Create servicetemplate with event command t_systems_mms.icinga_director.icinga_service_template: state: present url: "{{ icinga_url }}" url_username: "{{ icinga_user }}" url_password: "{{ icinga_pass }}" object_name: apache_check_servicetemplate use_agent: false event_command: restart_httpd notes: "example note" notes_url: "'http://url1' 'http://url2'" Page 8 / 22
  • 9. What we accomplished Date Feature 04/2020 internal development started 05/2020 Modules on Github in v1.0.0 05/20 - 12/20 command_template, host_template, zones and endpoints, service 01/21 inclusion into Ansible 02/21 facts/info modules for all objects 03/21 usergroups, timeperiod_template 07/21 inventory-plugin Page 9 / 22
  • 10. Facts-/Info-modules > ansible localhost -m t_systems_mms.icinga_director.icinga_host_info -a "query=customer-test-web01" localhost | SUCCESS => { "changed": false, "objects": [ { "address": "172.29.23.203", "display_name": "customer-test-web01", "imports": [ "StandardServer" ], "object_name": "customer-test-web01", "object_type": "object" } ] } Page 10 / 22
  • 11. Inventory Plugin > ansible-inventory -i test.icinga_director_inventory.yaml --graph @all: |--@customer_abn: | |--customer-abn-internet | |--customer-abn-web01 |--@customer_dev: | |--customer-dev-app01 | |--customer-dev-internet | |--customer-dev-web01 |--@customer_live: | |--customer-live-app01 | |--customer-live-db01 | |--customer-live-db02 | |--customer-live-internet Page 11 / 22
  • 12. Inventory Plugin object Host "customer-live-web01" { display_name = "customer-live-web01" address = "172.29.23.204" check_command = "hostalive" max_check_attempts = "3" check_period = "24/7" retry_interval = 1m enable_notifications = true enable_active_checks = true enable_passive_checks = false enable_event_handler = false enable_perfdata = true volatile = false vars.HostOS = "Linux" } Page 12 / 22
  • 13. Inventory Plugin > ansible customer-live-web01 -m debug -a "var=hostvars[inventory_hostname]['vars']['HostOS']" customer-live-web01 | SUCCESS => { "hostvars[inventory_hostname]['vars']['HostOS']": "Linux" } Page 13 / 22
  • 15. Let's talk about the Business Processes Plugin (BP) Optional Icinga2 module Build custom process-based dashboards Get visualized Overview over your monitored objects Page 15 / 22
  • 16. Example Business Process Node Page 16 / 22
  • 17. Collection development First things first: manually play around with every feature Check the requests made by the extension (we need those for the upload or check part f.e) Our first draft was a Ansible role: {% if node.operator == 'or' -%} {{ node.name }} = {{ checks|join(' | ') }} {% elif node.operator == 'not' -%} {{ node.name }} = {{ checks|join(' ! ') }} {% elif node.operator == 'and' -%} {{ node.name }} = {{ checks|join(' & ') }} {% elif node.operator is defined -%} {{ node.name }} = {{ node.operator }}: {{ checks|join(' + ') }} {% endif %} Page 17 / 22
  • 18. Configuration overview --- - hosts: localhost roles: - t_systems_mms.icinga_business_process.ansible_icinga_business_process vars: icinga_business_processes: - title: project-live description: Project Live Environment owner: "{{ icinga_user }}" menu: yes statetype: soft nodes: - name: loadbalancer displayname: Loadbalancer Pools operator: and visible: false checks: - name: lb01 type: service service: lb_pool_project-live - name: lb02 type: service service: lb_pool_project-live Page 18 / 22
  • 19. The future At this time all functionalities are already implemented Create service templates as check commands to integrate monitoring-alerts - service_apply_object: - "check_bpm" imports: - domon-business-process assign_filter: 'host.name="pseudo-host"' vars: config: $bpm_servive_name process: $bpm_process Page 19 / 22
  • 20. Yet another Ansible Icinga collection? Page 20 / 22
  • 21. Yet another Ansible Icinga collection? One Collection to rule them all! https://github.com/T-Systems-MMS/ansible-collection-icinga Page 21 / 22
  • 22. Ending + Questions Sebastian Gumprich Sebastian.Gumprich@t-systems.com https://github.com/rndmh3ro Daniel Uhlmann Daniel.Uhlmann@t-systems.com https://github.com/xFuture603 https://twitter.com/xFuturecs Page 22 / 22