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.

Icinga Camp Antwerp - Icinga2 Configuration

23,028 views

Published on

Michaels Talk about the new configuration features in Icinga2.

Published in: Technology
  • Sex in your area 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
  • Be the first to like this

Icinga Camp Antwerp - Icinga2 Configuration

  1. 1. WWW.ICINGA.ORG Icinga Camp - Antwerp 04/13/2015 Icinga - Open Source Monitoring
  2. 2. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Me • Michael Friedrich • @dnsmichi, 31, Austrian • Application Developer @NETWAYS • Icinga responsibilities • Core 1.x & 2.x Developer • Release Manager • Doing Icinga since May 2009
  3. 3. ICINGA 2 - INTRODUCTION
  4. 4. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 - Overview • Stable Version: 2.3.3 (26.3.2015) • Next major version: 2.4.0 (Q4 2015) • Supports all major distributions • Puppet, Chef and Ansible support • Packages and Vagrant Box available now! https://dev.icinga.org/projects/i2/roadmap
  5. 5. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 - Overview • Powerful CLI • MySQL & PostgreSQL support • New configuration format • Includes a extensive template library • Compatible with plugins, addons, UIs
  6. 6. ICINGA 2 - CONFIGURATION
  7. 7. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG Icinga 2 - Configuration • New configuration format • Won’t miss the old config syntax! • It is really time for change • You will love it! #icinga
  8. 8. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Syntax Highlighting # cd /usr/share/doc/icinga2-common*/syntax # PREFIX=~/.vim # mkdir –p $PREFIX/{syntax,ftdetect} # cp vim/syntax/icinga2.vim $PREFIX/syntax/ # cp vim ftdetect/icinga2.vim $PREFIX/ftdetect/ # vim /etc/icinga2/icinga2.conf • Use syntax highlighting!
  9. 9. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Console # yum install rlwrap # rlwrap icinga2 console • Use ‘icinga2 console’ to test values, functions, etc! • https://www.icinga.org/resources/live-console/ • Install rlwrap 
  10. 10. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Value Types • Get to know all the value types!
  11. 11. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Constants • PluginDir, MysqlPassword, SnmpCommunity, …
  12. 12. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Templates • Templates for generic attributes
  13. 13. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Custom Attributes • Numbers, Strings, Booleans, Arrays, Dictionaries • Filters, Match Conditions, additional information
  14. 14. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Commands • Optional/conditional arguments, functions, default values
  15. 15. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Hosts and Services • Checkable objects and attributes
  16. 16. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Apply Services • Match on (custom) attributes, names (assign) • Exclude objects (ignore)
  17. 17. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Apply For • For loops over arrays/dictionaries
  18. 18. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Notifications • Dynamic notification rules
  19. 19. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Dependencies • Host-on-Service, Service-on-Host, Classic HOST router SERVICE router-uplink Icinga 2 HOST website-server Reachable?
  20. 20. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Conditionals • If-then-else
  21. 21. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Loops • While, for and break/continue
  22. 22. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Type methods & Object Accessors • Array#sort, Dictionary#contains, String#find, … • http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/language-reference#language-reference • http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/library-reference#library-reference • Object accessors – get_host(), get_service(), etc – Access config and runtime attributes – e.g. get_host(NodeName).state
  23. 23. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration: Functions • Use pre-defined or your own – regex(), match(), … • Custom attributes, command, argument values
  24. 24. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG Icinga 2 – Configuration – Another cool thing #icinga
  25. 25. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Configuration – Time dependent thresholds • Time dependent thresholds
  26. 26. ICINGA 2 - MIGRATION
  27. 27. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG Icinga 2 - Migration • Start with a fresh server • Inventory of plugins & configuration • Define your configuration strategy with Icinga 2 • Create the best Command and Apply definitions only once • Only add hosts (and users) in the future • More migration hints on the docs! http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/migration#migration #icinga
  28. 28. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG Icinga 2 – Migration: Assign service to hosts in Icinga 1.x define service{ host_name linux1,linux2,linux3,...,linux9 service_description ssh-check other service directives ... } #icinga
  29. 29. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Migration: Apply service to hosts in Icinga 2 apply Service "ssh" { import "generic-service” check_command = "ssh” assign where host.address && host.vars.os == "Linux” }
  30. 30. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #osmc Icinga 2 – Migration – Assign members to Hostgroup in Icinga 1.x define hostgroup{ hostgroup_name linux-servers alias Linux Servers members linux1,linux2,linux3 }
  31. 31. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #osmc Icinga 2 – Migration – Assign members to Hostgroup in Icinga 1.x object Host “mysql-server1" { address = "10.0.0.1“ check_command = "hostalive“ } object HostGroup "mysql-server" { display_name = "MySQL Server“ assign where match("*mysql*", host.name) }
  32. 32. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 - Demo DEMO
  33. 33. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Icinga 2 – Demo Get VirtualBox >= 4.2.16 && Vagrant >= 1.6.5 $ git clone --recursive https://github.com/Icinga/icinga-vagrant.git $ cd icinga-vagrant $ cd icinga2x-cluster $ vagrant up $ vagrant ssh icinga2a $ vagrant ssh icinga2b $> sudo –i http://192.168.33.10 & http://192.168.33.20
  34. 34. CONCLUSION
  35. 35. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG Conclusion • Download Icinga 2 – Use packages – Play with Vagrant and VirtualBox • Rethink you configuration strategy – Follow extensive migration docs, it is time for a change! • Install Icinga Web 2 and play with it • Give us feedback – dev.icinga.org – IRC – Twitter #icinga
  36. 36. VISION
  37. 37. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG Vision • No enterprise edition • Enterprise integration #icinga
  38. 38. EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG #icinga Questions & Answers Web www.icinga.org Git git.icinga.org Development dev.icinga.org Wiki wiki.icinga.org Support support.icinga.org Twitter twitter.com/icinga Facebook facebook.com/icinga Get support Get involved Get heard

×