Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
http://bit.ly/olindata-galera-migration
Puppet Master
Puppet Code
(.git repository)
web01.olindata.com icinga.olindata.comdb01.olindata.com
Puppet Agent Puppet Ag...
●
●
○
○
●
○ mod 'icingaweb2',
■ :git => 'https://github.com/icinga/puppet-icingaweb2.git'
○ mod 'icinga2',
■ :git => 'https://gith...
class opstheater::profile::icinga::db {
$icinga2_webdb_password = ‘mypw’
$icinga2_ido_password = ‘mypw’
$mysql_whitelist_r...
$icinga2_db_ipaddress = hiera('opstheater::icinga::mysql_ipaddress')
$icinga2_web_fqdn = hiera('opstheater::icingaweb::fqd...
●
●
●
class opstheater::profile::icinga::web {
class { 'icingaweb2':
manage_repo => true,
install_method => 'package',
man...
class opstheater::profile::icinga::client {
include ::icinga2
include ::icinga2::feature::command
class { '::icinga2::feat...
PuppetDB
Puppet
Master
ICINGAWEB01
@@icinga2::object::host { $::fqdn:
ipv4_address => $::ipaddress,
}
Icinga2::Object::Hos...
PuppetDB
Puppet
Master
ICINGAWEB01
@@icinga2::object::host { $::fqdn:
ipv4_address => $::ipaddress,
}
Icinga2::Object::Hos...
PuppetDB
Puppet
Master
ICINGAWEB01
@@icinga2::object::host { $::fqdn:
ipv4_address => $::ipaddress,
}
Icinga2::Object::Hos...
PuppetDB
Puppet
Master
ICINGAWEB01
@@icinga2::object::host { $::fqdn:
ipv4_address => $::ipaddress,
}
Icinga2::Object::Hos...
PuppetDB
Puppet
Master
ICINGAWEB01
@@icinga2::object::host { $::fqdn:
ipv4_address => $::ipaddress,
}
Icinga2::Object::Hos...
PuppetDB
Puppet
Master
ICINGAWEB01
@@icinga2::object::host { $::fqdn:
ipv4_address => $::ipaddress,
}
Icinga2::Object::Hos...
node ‘icinga.olindata.com’ {
Icinga2::Object::Host <<| |>>
Icinga2::Object::Service <<| |>>
Icinga2::Object::Zone <<| |>>
...
Icinga2::Object::Apply_service {
assign_where => 'host.address && host.vars.remote == true && host.vars.remote_endpoint',
...
●
●
●
●
●
●
Icinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet  automate monitoring
Upcoming SlideShare
Loading in …5
×

Icinga 2 and Puppet automate monitoring

13,481 views

Published on

Talk about Icinga2 and Puppet by Walter Heck - CTO at Olindata

Published in: Technology
  • Dating for everyone is here: ♥♥♥ http://bit.ly/2Qu6Caa ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/2Qu6Caa ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Icinga 2 and Puppet automate monitoring

  1. 1. http://bit.ly/olindata-galera-migration
  2. 2. Puppet Master Puppet Code (.git repository) web01.olindata.com icinga.olindata.comdb01.olindata.com Puppet Agent Puppet AgentPuppet Agent
  3. 3. ● ● ○ ○
  4. 4. ● ○ mod 'icingaweb2', ■ :git => 'https://github.com/icinga/puppet-icingaweb2.git' ○ mod 'icinga2', ■ :git => 'https://github.com/icinga/puppet-icinga2.git', ■ :branch => 'develop' ○ mod 'puppetlabs/mysql', '3.6.2'
  5. 5. class opstheater::profile::icinga::db { $icinga2_webdb_password = ‘mypw’ $icinga2_ido_password = ‘mypw’ $mysql_whitelist_range = ‘192.168.%’ mysql::db { 'icinga2_web': user => 'icinga2_web', password => $icinga2_webdb_password, host => $mysql_whitelist_range, grant => ['ALL'], } mysql::db { 'icinga2_data': user => 'icinga2', password => $icinga2_ido_password, host => $mysql_whitelist_range, grant => ['ALL'], } }
  6. 6. $icinga2_db_ipaddress = hiera('opstheater::icinga::mysql_ipaddress') $icinga2_web_fqdn = hiera('opstheater::icingaweb::fqdn') $icinga2_ido_password = hiera('opstheater::icinga::ido_password') class { 'icinga2': db_type => 'mysql', db_host => $icinga2_db_ipaddress, db_port => '3306', db_name => 'icinga2_data', db_user => 'icinga2', db_pass => $icinga2_ido_password, manage_database => true, }
  7. 7. ● ● ● class opstheater::profile::icinga::web { class { 'icingaweb2': manage_repo => true, install_method => 'package', manage_apache_vhost => true, apache_vhost_name => $icinga2_web_fqdn, ido_db => 'mysql', ido_db_host => $icinga2_db_ip, ido_db_name => 'icinga2_data', ido_db_user => 'icinga2', ido_db_pass => $icinga2_ido_pass, web_db => 'mysql', web_db_name => 'icinga2_web', web_db_host => $icinga2_db_ip, web_db_user => 'icinga2_web', web_db_pass => $icinga2_webdb_pass, web_db_port => '3306', }
  8. 8. class opstheater::profile::icinga::client { include ::icinga2 include ::icinga2::feature::command class { '::icinga2::feature::api': accept_commands => true, accept_config => true, manage_zone => false, } # icinga2::pki::puppet class needs to be declared # after the icinga2::feature::api class in order # to avoid resource duplication contain ::icinga2::pki::puppet } $icinga2_web_fqdn = hiera('opstheater:: icingaweb::fqdn') @@icinga2::object::zone { $::fqdn: endpoints => { $::fqdn => { host => $::fqdn }, }, parent => 'master', } icinga2::object::zone { 'master': endpoints => { $icinga2_web_fqdn => { host => $icinga2_web_fqdn }, }, } Icinga2::Object::Zone <<| |>>
  9. 9. PuppetDB Puppet Master ICINGAWEB01 @@icinga2::object::host { $::fqdn: ipv4_address => $::ipaddress, } Icinga2::Object::Host <<| |>> 1. Puppet agent run 6. Send to node 5. Retrieve from PuppetDB3. Store in PuppetDB 2. Export to PM 4. Collect on ICINGA
  10. 10. PuppetDB Puppet Master ICINGAWEB01 @@icinga2::object::host { $::fqdn: ipv4_address => $::ipaddress, } Icinga2::Object::Host <<| |>> 1. Puppet agent run 6. Send to node 5. Retrieve from PuppetDB3. Store in PuppetDB 2. Export to PM 4. Collect on ICINGA
  11. 11. PuppetDB Puppet Master ICINGAWEB01 @@icinga2::object::host { $::fqdn: ipv4_address => $::ipaddress, } Icinga2::Object::Host <<| |>> 1. Puppet agent run 6. Send to node 5. Retrieve from PuppetDB3. Store in PuppetDB 2. Export to PM 4. Collect on ICINGA
  12. 12. PuppetDB Puppet Master ICINGAWEB01 @@icinga2::object::host { $::fqdn: ipv4_address => $::ipaddress, } Icinga2::Object::Host <<| |>> 1. Puppet agent run 6. Send to node 5. Retrieve from PuppetDB3. Store in PuppetDB 2. Export to PM 4. Collect on ICINGA
  13. 13. PuppetDB Puppet Master ICINGAWEB01 @@icinga2::object::host { $::fqdn: ipv4_address => $::ipaddress, } Icinga2::Object::Host <<| |>> 1. Puppet agent run 6. Send to node 5. Retrieve from PuppetDB3. Store in PuppetDB 2. Export to PM 4. Collect on ICINGA
  14. 14. PuppetDB Puppet Master ICINGAWEB01 @@icinga2::object::host { $::fqdn: ipv4_address => $::ipaddress, } Icinga2::Object::Host <<| |>> 1. Puppet agent run 6. Send to node 5. Retrieve from PuppetDB3. Store in PuppetDB 2. Export to PM 4. Collect on ICINGA
  15. 15. node ‘icinga.olindata.com’ { Icinga2::Object::Host <<| |>> Icinga2::Object::Service <<| |>> Icinga2::Object::Zone <<| |>> @@icinga2::object::zone { $::fqdn: endpoints => { $::fqdn => { host => $::fqdn }, }, parent => 'master', } icinga2::object::zone { 'master': endpoints => { $icinga2_fqdn => { host => $icinga2_ip, }, }, } } node ‘web01.olindata.com’ { @@icinga2::object::zone { $::fqdn: endpoints => { $::fqdn => { host => $::fqdn }, }, parent => 'master', } icinga2::object::zone { 'master': endpoints => { $icinga2_fqdn => { host => $icinga2_ip, }, }, } Icinga2::Object::Zone <<| |>> @@icinga2::object::host { $::fqdn: ipv4_address => $::ipaddress, } }
  16. 16. Icinga2::Object::Apply_service { assign_where => 'host.address && host.vars.remote == true && host.vars.remote_endpoint', command_endpoint => 'host.vars.remote_endpoint', } icinga2::object::apply_service { 'user': check_command => 'users', } icinga2::object::apply_service { 'load': check_command => 'load', } icinga2::object::apply_service { 'process': check_command => 'procs', }
  17. 17. ● ● ● ●
  18. 18. ● ●

×