SlideShare a Scribd company logo
1 of 25
Salt with Zabbix
Saltstack Configuration Management
Salt can do much more than configure a single machine
It is a state engine which allows for complicated automation workflows
Monitoring SDLC
As capabilities are added to the environment they must be monitored
Zabbix provides capabilities and APIs for monitoring component, architecture, and
service level monitoring
Concerned with complexity, scale, and maintainability. Create patterns allowing
distributed teams to interface with monitoring, without needing to know all the
technical details.
Zabbix Server
Zabbix Introduction
host1
Nginx Service
Web Service: myapp
Host Group
Host: host1
Templates
OS Linux Nginx myapp
Item: CPU Item:
Connection
status
Web Scenario:
Site availability
Trigger: High
CPU
Graph:
Connections
SLA:
Availability
Inventory Data
Salt States: myapp service
base:
'salt-client1.station':
...
- openssh.config
- zabbix.agent.conf
- nginx
- example_app
Salt States: myapp service
base:
'salt-client1.station':
...
- openssh.config
- zabbix.agent.conf
- nginx
- example_app
Mapping
Linux Template
Zabbix Template
Nginx Template
Myapp Template
state.highstate
Salt-client1.station:
...
Name: /etc/ssh/sshd_config - Function: file.managed - Result: Clean Started: - 22:10:19.597471 Duration: 110.485 ms
Name: zabbix-agent - Function: pkg.installed - Result: Clean Started: - 22:10:19.790945 Duration: 11.088 ms
Name: nginx - Function: pkg.installed - Result: Clean Started: - 22:10:20.002695 Duration: 10.612 ms
Name: /etc/nginx/nginx.conf - Function: file.managed - Result: Clean Started: - 22:10:20.013534 Duration: 32.175 ms
Name: /etc/nginx/sites-available/mysite - Function: file.managed - Result: Clean Started: - 22:10:20.046610 Duration: 27.779 ms
Name: /var/www/html/mysite/index.html - Function: file.managed - Result: Clean Started: - 22:10:20.119449 Duration: 17.067 ms
Summary for salt-client1.station
-------------
Succeeded: 34
Failed: 0
-------------
Total states run: 34
Total run time: 548.998 ms
state.highstate
state.highstate
Yay!
But what about monitoring?
Salt States: Notify Zabbix
base:
'salt-client1.station':
...
- openssh.config
- zabbix.agent.conf
- nginx
- example_app
- monitoring
Monitoring State Example
create_host_group:
zabbix_hostgroup.present:
- name: {{ zab_hostgroup }}
create_host_{{ zab_host }}:
zabbix_host.present:
- host: {{ zab_host }}
- groups:
- {{ zab_hostgroup }}
- interfaces:
- {{ zab_fqdn }}:
- ip: {{ zab_host_ip }}
- type: 'Agent'
- port: 10050
- inventory: {{ zab_inv }}
add_zabbix_templates_to_host:
zabbix_host.assign_templates:
- host: {{ zab_host }}
- templates: {{ zab_templates }}
Add Zabbix host group
Add host to Zabbix
Assign templates to host in
Zabbix
Bonus: Zabbix Inventory
Monitoring State Example
Sounds simple enough. But how do we associate salt states with Zabbix templates?
Goal: “Create patterns allowing distributed teams to interface with monitoring, without
needing to know all the technical details.”
add_zabbix_templates_to_host:
zabbix_host.assign_templates:
- host: {{ zab_host }}
- templates: {{ zab_templates }}
Monitoring State Example
Sounds simple enough. But how do we associate salt states with Zabbix templates?
Goal: “Create patterns allowing distributed teams to interface with monitoring, without
needing to know all the technical details.”
add_zabbix_templates_to_host:
zabbix_host.assign_templates:
- host: {{ zab_host }}
- templates: {{ zab_templates }}
sshd_banner:
file.managed:
- name: {{ openssh.banner }}
...
enable_linux_template:
grains.list_present:
- name: monitoring_templates
- value: 'Template OS Linux by Zabbix agent
active'
Monitoring State Example
# salt 'salt-client1.station' grains.get monitoring_templates
salt-client1.station:
- Template OS Linux by Zabbix agent active
- Template App Nginx by Zabbix agent
- myapp
Monitoring State Example
# salt 'salt-client1.station' grains.get monitoring_templates
salt-client1.station:
- Template OS Linux by Zabbix agent active
- Template App Nginx by Zabbix agent
- myapp
Monitoring State Example
Cool! But what about the life cycle?
No, the machine life cycle: deleting/updating
Phase 2: Salt Event Bus
Up until now, we kept things direct by having the salt minion add itself to Zabbix
But this has drawbacks in that the minion needs to have the Zabbix password, and
cannot notify Zabbix it has been deleted.
Phase 2: Salt Event Bus
Salt Minion Salt Master Zabbix Server
Event Bus
Highstate
update
Highstate
update
Orch:
Gather
data
Add/update host
in Zabbix
Decom Process
Minion
destroyed
Minion
destroyed
Remove host
from Zabbix
Notify Salt Event Bus
Update_monitor_templates:
event.send:
- name: custom/monitoring/update
- data:
ip_address: {{ salt['network.ip_addrs']() | first | default([]) }}
default_group: {{ salt['grains.get']('ec2_tags:SupportGroup', 'GenericSupport')
}}/{{ salt['grains.get']('ec2_tags:Environment', 'Tagless') }}
fqdn: {{ hostfqdn }}
inventory: [
"os": {{ salt['grains.get']('osrelease', 'UnknownOS') }},
]
- onchanges:
- grains: monitoring_templates
mineupdate:
module.wait:
- mine.update:
- name: mine.update
- watch:
- grains: monitoring_templates
Event Reactor
zabbix_update_host_templates:
runner.state.orchestrate:
- args:
- mods: orchestrations.monitoring_update_template
- pillar:
event_data: {{ data | json() }}
Event Orchestration
{%- set data = salt.pillar.get('event_data') %}
{# Queries salt mine for monitoring_groups values for specified host #}
{%- set monitoring_templates = salt.saltutil.runner('mine.get',
tgt=data['id'],
fun='monitoring_templates',
tgt_type='list')[data['id']] %}
ensure_in_zabbix:
salt.state:
- tgt: "salt-master1*"
- tgt_type: glob
- concurrent: True
- sls: monitoring.orch.ensure_zabbixed
- pillar:
groups: {{ data['data']['default_group'] }}
host: {{ data['id'] }}
ip: {{ data['data']['ip_address'] }}
templates: {{ monitoring_templates }}
inventory: {{ data['data']['inventory'] }}
fqdn: {{ data['data']['fqdn'] }}
Salt Event Bus Summary
By using the salt event bus, we can tie the salt master’s state engine into any part of our
provisioning process.
Also means that the Zabbix password only needs to be granted to the salt master itself
(or wherever you run the orchestration job (Zabbix server?))
Workflow Integration Summary
Salt states simply need to add the Zabbix template name to a grain list.
The monitoring team owns the monitoring integration state and orchestration
Questions?
Thanks for attending!

More Related Content

What's hot

Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021
Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021
Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021Florian Roth
 
Getting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeGetting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeWinWire Technologies Inc
 
Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform TrainingYevgeniy Brikman
 
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for EveryoneAlexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for EveryoneZabbix
 
Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...PROIDEA
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraformJulien Pivotto
 
Maturity Model of Security Disciplines
Maturity Model of Security Disciplines Maturity Model of Security Disciplines
Maturity Model of Security Disciplines Florian Roth
 
[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdfJo Hoon
 
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)Adin Ermie
 
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOS
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOSExploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOS
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOSMITRE ATT&CK
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introductionJason Vance
 
Automating deployments from GitHub using SaltStack
Automating deployments from GitHub using SaltStackAutomating deployments from GitHub using SaltStack
Automating deployments from GitHub using SaltStackLINE Corporation
 
How to Reduce Latency with Cloudflare Argo Smart Routing
How to Reduce Latency with Cloudflare Argo Smart RoutingHow to Reduce Latency with Cloudflare Argo Smart Routing
How to Reduce Latency with Cloudflare Argo Smart RoutingCloudflare
 
DevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - PrometheusDevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - PrometheusAdam Chen
 
Apresentacao zabbix
Apresentacao zabbixApresentacao zabbix
Apresentacao zabbixDaniel Peres
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Amazon Web Services
 

What's hot (20)

Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021
Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021
Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021
 
Getting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeGetting Started with Infrastructure as Code
Getting Started with Infrastructure as Code
 
Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform Training
 
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for EveryoneAlexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
 
Observability
Observability Observability
Observability
 
Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...Terraform in production - experiences, best practices and deep dive- Piotr Ki...
Terraform in production - experiences, best practices and deep dive- Piotr Ki...
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
 
Maturity Model of Security Disciplines
Maturity Model of Security Disciplines Maturity Model of Security Disciplines
Maturity Model of Security Disciplines
 
[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf
 
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
 
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOS
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOSExploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOS
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOS
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introduction
 
Automating deployments from GitHub using SaltStack
Automating deployments from GitHub using SaltStackAutomating deployments from GitHub using SaltStack
Automating deployments from GitHub using SaltStack
 
Introduce to Terraform
Introduce to TerraformIntroduce to Terraform
Introduce to Terraform
 
SRE From Scratch
SRE From ScratchSRE From Scratch
SRE From Scratch
 
How to Reduce Latency with Cloudflare Argo Smart Routing
How to Reduce Latency with Cloudflare Argo Smart RoutingHow to Reduce Latency with Cloudflare Argo Smart Routing
How to Reduce Latency with Cloudflare Argo Smart Routing
 
DevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - PrometheusDevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
 
Terraform
TerraformTerraform
Terraform
 
Apresentacao zabbix
Apresentacao zabbixApresentacao zabbix
Apresentacao zabbix
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
 

Similar to Saltstack with Zabbix

Cutting through the fog of cloud
Cutting through the fog of cloudCutting through the fog of cloud
Cutting through the fog of cloudKyle Rames
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...Amazon Web Services
 
Deploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkDeploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkJulien SIMON
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Rackspace Academy
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.Issa Fattah
 
Load Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesLoad Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesSeveralnines
 
SecZone 2011: Scrubbing SAP clean with SOAP
SecZone 2011: Scrubbing SAP clean with SOAPSecZone 2011: Scrubbing SAP clean with SOAP
SecZone 2011: Scrubbing SAP clean with SOAPChris John Riley
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发shaokun
 
Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Edwin Beekman
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정Arawn Park
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and DrupalPromet Source
 
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Aptible
 

Similar to Saltstack with Zabbix (20)

Cutting through the fog of cloud
Cutting through the fog of cloudCutting through the fog of cloud
Cutting through the fog of cloud
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Deploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkDeploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalk
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
 
Zabbix Console
Zabbix ConsoleZabbix Console
Zabbix Console
 
Load Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesLoad Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - Slides
 
SecZone 2011: Scrubbing SAP clean with SOAP
SecZone 2011: Scrubbing SAP clean with SOAPSecZone 2011: Scrubbing SAP clean with SOAP
SecZone 2011: Scrubbing SAP clean with SOAP
 
Sinatra for REST services
Sinatra for REST servicesSinatra for REST services
Sinatra for REST services
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and Drupal
 
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
 
Lagom Workshop BarcelonaJUG 2017-06-08
Lagom Workshop  BarcelonaJUG 2017-06-08Lagom Workshop  BarcelonaJUG 2017-06-08
Lagom Workshop BarcelonaJUG 2017-06-08
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Intro to sbt-web
Intro to sbt-webIntro to sbt-web
Intro to sbt-web
 

Recently uploaded

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Saltstack with Zabbix

  • 2. Saltstack Configuration Management Salt can do much more than configure a single machine It is a state engine which allows for complicated automation workflows
  • 3. Monitoring SDLC As capabilities are added to the environment they must be monitored Zabbix provides capabilities and APIs for monitoring component, architecture, and service level monitoring Concerned with complexity, scale, and maintainability. Create patterns allowing distributed teams to interface with monitoring, without needing to know all the technical details.
  • 4. Zabbix Server Zabbix Introduction host1 Nginx Service Web Service: myapp Host Group Host: host1 Templates OS Linux Nginx myapp Item: CPU Item: Connection status Web Scenario: Site availability Trigger: High CPU Graph: Connections SLA: Availability Inventory Data
  • 5. Salt States: myapp service base: 'salt-client1.station': ... - openssh.config - zabbix.agent.conf - nginx - example_app
  • 6. Salt States: myapp service base: 'salt-client1.station': ... - openssh.config - zabbix.agent.conf - nginx - example_app Mapping Linux Template Zabbix Template Nginx Template Myapp Template
  • 7. state.highstate Salt-client1.station: ... Name: /etc/ssh/sshd_config - Function: file.managed - Result: Clean Started: - 22:10:19.597471 Duration: 110.485 ms Name: zabbix-agent - Function: pkg.installed - Result: Clean Started: - 22:10:19.790945 Duration: 11.088 ms Name: nginx - Function: pkg.installed - Result: Clean Started: - 22:10:20.002695 Duration: 10.612 ms Name: /etc/nginx/nginx.conf - Function: file.managed - Result: Clean Started: - 22:10:20.013534 Duration: 32.175 ms Name: /etc/nginx/sites-available/mysite - Function: file.managed - Result: Clean Started: - 22:10:20.046610 Duration: 27.779 ms Name: /var/www/html/mysite/index.html - Function: file.managed - Result: Clean Started: - 22:10:20.119449 Duration: 17.067 ms Summary for salt-client1.station ------------- Succeeded: 34 Failed: 0 ------------- Total states run: 34 Total run time: 548.998 ms
  • 10. Salt States: Notify Zabbix base: 'salt-client1.station': ... - openssh.config - zabbix.agent.conf - nginx - example_app - monitoring
  • 11. Monitoring State Example create_host_group: zabbix_hostgroup.present: - name: {{ zab_hostgroup }} create_host_{{ zab_host }}: zabbix_host.present: - host: {{ zab_host }} - groups: - {{ zab_hostgroup }} - interfaces: - {{ zab_fqdn }}: - ip: {{ zab_host_ip }} - type: 'Agent' - port: 10050 - inventory: {{ zab_inv }} add_zabbix_templates_to_host: zabbix_host.assign_templates: - host: {{ zab_host }} - templates: {{ zab_templates }} Add Zabbix host group Add host to Zabbix Assign templates to host in Zabbix
  • 13. Monitoring State Example Sounds simple enough. But how do we associate salt states with Zabbix templates? Goal: “Create patterns allowing distributed teams to interface with monitoring, without needing to know all the technical details.” add_zabbix_templates_to_host: zabbix_host.assign_templates: - host: {{ zab_host }} - templates: {{ zab_templates }}
  • 14. Monitoring State Example Sounds simple enough. But how do we associate salt states with Zabbix templates? Goal: “Create patterns allowing distributed teams to interface with monitoring, without needing to know all the technical details.” add_zabbix_templates_to_host: zabbix_host.assign_templates: - host: {{ zab_host }} - templates: {{ zab_templates }} sshd_banner: file.managed: - name: {{ openssh.banner }} ... enable_linux_template: grains.list_present: - name: monitoring_templates - value: 'Template OS Linux by Zabbix agent active'
  • 15. Monitoring State Example # salt 'salt-client1.station' grains.get monitoring_templates salt-client1.station: - Template OS Linux by Zabbix agent active - Template App Nginx by Zabbix agent - myapp
  • 16. Monitoring State Example # salt 'salt-client1.station' grains.get monitoring_templates salt-client1.station: - Template OS Linux by Zabbix agent active - Template App Nginx by Zabbix agent - myapp
  • 17. Monitoring State Example Cool! But what about the life cycle? No, the machine life cycle: deleting/updating
  • 18. Phase 2: Salt Event Bus Up until now, we kept things direct by having the salt minion add itself to Zabbix But this has drawbacks in that the minion needs to have the Zabbix password, and cannot notify Zabbix it has been deleted.
  • 19. Phase 2: Salt Event Bus Salt Minion Salt Master Zabbix Server Event Bus Highstate update Highstate update Orch: Gather data Add/update host in Zabbix Decom Process Minion destroyed Minion destroyed Remove host from Zabbix
  • 20. Notify Salt Event Bus Update_monitor_templates: event.send: - name: custom/monitoring/update - data: ip_address: {{ salt['network.ip_addrs']() | first | default([]) }} default_group: {{ salt['grains.get']('ec2_tags:SupportGroup', 'GenericSupport') }}/{{ salt['grains.get']('ec2_tags:Environment', 'Tagless') }} fqdn: {{ hostfqdn }} inventory: [ "os": {{ salt['grains.get']('osrelease', 'UnknownOS') }}, ] - onchanges: - grains: monitoring_templates mineupdate: module.wait: - mine.update: - name: mine.update - watch: - grains: monitoring_templates
  • 21. Event Reactor zabbix_update_host_templates: runner.state.orchestrate: - args: - mods: orchestrations.monitoring_update_template - pillar: event_data: {{ data | json() }}
  • 22. Event Orchestration {%- set data = salt.pillar.get('event_data') %} {# Queries salt mine for monitoring_groups values for specified host #} {%- set monitoring_templates = salt.saltutil.runner('mine.get', tgt=data['id'], fun='monitoring_templates', tgt_type='list')[data['id']] %} ensure_in_zabbix: salt.state: - tgt: "salt-master1*" - tgt_type: glob - concurrent: True - sls: monitoring.orch.ensure_zabbixed - pillar: groups: {{ data['data']['default_group'] }} host: {{ data['id'] }} ip: {{ data['data']['ip_address'] }} templates: {{ monitoring_templates }} inventory: {{ data['data']['inventory'] }} fqdn: {{ data['data']['fqdn'] }}
  • 23. Salt Event Bus Summary By using the salt event bus, we can tie the salt master’s state engine into any part of our provisioning process. Also means that the Zabbix password only needs to be granted to the salt master itself (or wherever you run the orchestration job (Zabbix server?))
  • 24. Workflow Integration Summary Salt states simply need to add the Zabbix template name to a grain list. The monitoring team owns the monitoring integration state and orchestration

Editor's Notes

  1. Let’s explore salt’s capabilities by using it to power monitoring a machine lifecycle
  2. Everything on the network or that can affect the customer experience needs to be monitored Tools need to cope with dynamic environments and be managed through code at scale Systems need to be designed for interaction from various teams
  3. You can manage Zabbix Templates through salt
  4. In the first part, we associated salt states with Zabbix templates and had our host run a zabbix state to add itself to monitoring along with the needed templates. But if the host is destroyed, what notifys Zabbix?
  5. Rather than have the monitor state connect to zabbix itself, instead just raise an event on the salt event bus