Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
www.icinga.org
Why favour Icinga over Nagios
2015-08-22
Markus Frosch
• Consultant @NETWAYS
• Icinga Team since 2012
• Organisation of Icinga 2
• Debian developer
@lazyfrosch
THE ICINGA PROJECT
Open Source Enterprise Monitoring
Icinga is a scalable and extensible monitoring system
which checks the availability of y...
You?
• originally forked from Nagios in 2009
• focus on improvements and scalability
• independent version Icinga 2 since 2014
...
Icinga Core
Nagios based C-source
MySQL, PostgreSQL, Oracle
Icinga Core
Nagios based C-source
MySQL, PostgreSQL, Oracle
Ic...
ICINGA 2 INTRODUCTION
• monitors everything
• in a regular interval
• preferring active checks
• gathering status
• collect performance data / m...
• notifies using any channel
• detects dependencies
• handles events in configured way
• forwards logs to Logstash and Graylog
• passes performance data to Graphite,
OpenTSDB or InfluxDB
• integrate with other...
Icinga 2
• release 2.3.8 (2015-07-20)
• new code base on C++ and Boost
• similar ideas to Nagios
• Puppet, Chef and Ansibl...
WHY NAGIOS™ IS GOOD?
Nagios™ is good, because:
✔ monitoring things is very easy
✔ very simple software stack
✔ no complex external dependencies
Nagios™ is good, because:
✔ active checks are powerful
✔ gathering performance data
✔ huge community
✔ thousands of Plugins
OK, BUT WHY ICINGA THEN?
Nagios™ does not scale
✗ it's just a single loop
✗ limitations using external interfaces
✗ large installations are difficu...
Icinga 2 on the other hand
✔ provides a multithreaded engine
✔ distributes load in cluster automatically
✔ is able to moni...
MODULES
Modules in Nagios™?
# tar xzvf mk-livestatus-1.2.4.tar.gz
# cd mk-livestatus-1.2.4
# ./configure --prefix=/usr/local/icing...
CheckerChecker
NotifyNotify
API
(soon)
API
(soon)
CompatCompat ClusterCluster
IDOIDO GELFGELF
GraphiteGraphite
PerfdataPer...
# icinga2 feature enable livestatus
# icinga2 feature enable ido-mysql
# vim /etc/icinga2/features-
available/ido-mysql.co...
DEMO
CLUSTERING
How about high available Nagios™?
✗ there is no integrated failover mechanism
✗ configuration is not distributed
✗ no shar...
What Icinga 2 provides you
✔ zones for multitenancy environments
✔ support for logic splits in the config
✔ availability a...
central
datacenter
central
datacenter
CheckerChecker ConfigConfig
Live
status
Live
status
CheckerChecker
DatabaseDatabase
...
Nagios™ and security
✗ NSCA works, but not in a good way
✗ NRPE has a couple of security issues
✗ You can make it secure …...
Icinga 2 clustering is PKI TLS only
✔ bidirectional connections
✔ helps you setting up a CA
✔ replication of events and st...
DEMO
CONFIGURATION
Nagios™ config tricks are weird…
define service{
host_name linux1,linux2,linux3,...,linux9
service_description ssh-check
o...
Nagios™ can only do lists
define hostgroup{
hostgroup_name linux-servers
alias Linux Servers
members linux1,linux2,linux3
}
Icinga 2 brings logic
apply Service "ssh" {
import "generic-service”
check_command = "ssh”
assign where host.address && ho...
Icinga 2 wants to unterstand you
object HostGroup "mysql-server" {
display_name = "MySQL Server"
assign where match("*mysq...
Imagine a host you manage
object Host "shop1.nbg.de.bratwurst.de" {
import "generic-host"
address = "192.0.2.123"
vars = {...
Maybe add templates
template Host "webserver-default" {
import "generic-host"
vars = {
environment = "production"
role = "...
Now add some services
apply Service "http" {
import "generic-service"
check_command = "http"
assign where host.role == "we...
Get notified
apply Notification "host-prod-oncall" to Host {
import "mail-host-notification"
user_groups = [ "datacenter-o...
Define dependencies
apply Dependency "host-in-nbg1" to Host {
parent_host_name = "router.nbg1.bratwurst.de"
disable_checks...
Safe and powerful commands
object CheckCommand "fancy-vendor-check" {
import "plugin-check-command"
command = [ PluginDir ...
Easy to use
apply Service "fancy-vendor test" {
import "generic-service"
check_command = "fancy-vendor-check"
vars.snmp_co...
Using commands
●
safe against shell injections
●
clean interface, easy to write
●
just set a var in service or host
●
chec...
ONE MORE THING...
Icinga 2 is enhanceable
object Service "webservice" {
import "generic-service"
check_command = "load"
host_name = "a reall...
WHAT YOU SEE IS WHAT YOU GET
Nagios CGI
Icinga Classic
Icinga Web 1
✗ limitations in current Icinga interfaces
✗ parsing the status.dat is not fast
✗ executing commands is tedious
✗ really h...
Icingaweb 2
• easy to extend and embed
• multiple authentication providers
• reads from IDO database
• responsive
release ...
Web 2MySQL /
PostgreSQL
MySQL /
PostgreSQL
2
or Icinga 1
The simplest setup
set up within a few minutes...
Web 2
MonitoringMonitoring DocsDocs
BPBP GraphiteGraphite PNPPNP
Demo
CONCLUSION
Where to start?
• Go to docs.icinga.org
• Try our Vagrant VMs
• Use Icinga 2 packages
• Rethink you configuration
• Instal...
You?
Berlin 2016
March 1st
Berlin 2016
March 1st
Portland 2015
October 10th
Portland 2015
October 10th
Icinga Camp community me...
THANK YOU!
www.icinga.org
exchange.icinga.org
docs.icinga.org
dev.icinga.org
git.icinga.org
@icinga
/icinga
+icinga
Why favour Icinga over Nagios @ FrOSCon 2015
Nächste SlideShare
Wird geladen in …5
×

Why favour Icinga over Nagios @ FrOSCon 2015

7.475 Aufrufe

Veröffentlicht am

A slightly longer edition of the presentation.

Held on 2015-08-22 @ FrOSCon 2015 at Bonn-Rhein-Sieg University in Sankt Augustin, Germany

Veröffentlicht in: Internet
  • Als Erste(r) kommentieren

Why favour Icinga over Nagios @ FrOSCon 2015

  1. 1. www.icinga.org Why favour Icinga over Nagios 2015-08-22
  2. 2. Markus Frosch • Consultant @NETWAYS • Icinga Team since 2012 • Organisation of Icinga 2 • Debian developer @lazyfrosch
  3. 3. THE ICINGA PROJECT
  4. 4. Open Source Enterprise Monitoring Icinga is a scalable and extensible monitoring system which checks the availability of your resources, notifies users of outages and provides extensive BI data.
  5. 5. You?
  6. 6. • originally forked from Nagios in 2009 • focus on improvements and scalability • independent version Icinga 2 since 2014 • web interfaces and addons
  7. 7. Icinga Core Nagios based C-source MySQL, PostgreSQL, Oracle Icinga Core Nagios based C-source MySQL, PostgreSQL, Oracle Icinga Quality, Testing and Community Support Website and Open Source Ticketing System Icinga Quality, Testing and Community Support Website and Open Source Ticketing System 3rd Party Tools3rd Party Tools Icinga Web based on PHP using ExtJS, Agavi MVC Icinga Web based on PHP using ExtJS, Agavi MVC IDOUTILSIDOUTILS Icinga Web 2 Based on PHP / responsive design Icinga Web 2 Based on PHP / responsive design Icinga 2 C++-based source with multiple components Icinga 2 C++-based source with multiple components IDOIDO LivestatusLivestatus ClusterCluster APIAPI ……
  8. 8. ICINGA 2 INTRODUCTION
  9. 9. • monitors everything • in a regular interval • preferring active checks • gathering status • collect performance data / metrics
  10. 10. • notifies using any channel • detects dependencies • handles events in configured way
  11. 11. • forwards logs to Logstash and Graylog • passes performance data to Graphite, OpenTSDB or InfluxDB • integrate with other tools?
  12. 12. Icinga 2 • release 2.3.8 (2015-07-20) • new code base on C++ and Boost • similar ideas to Nagios • Puppet, Chef and Ansible integration • Packages and Vagrant Box available
  13. 13. WHY NAGIOS™ IS GOOD?
  14. 14. Nagios™ is good, because: ✔ monitoring things is very easy ✔ very simple software stack ✔ no complex external dependencies
  15. 15. Nagios™ is good, because: ✔ active checks are powerful ✔ gathering performance data ✔ huge community ✔ thousands of Plugins
  16. 16. OK, BUT WHY ICINGA THEN?
  17. 17. Nagios™ does not scale ✗ it's just a single loop ✗ limitations using external interfaces ✗ large installations are difficult
  18. 18. Icinga 2 on the other hand ✔ provides a multithreaded engine ✔ distributes load in cluster automatically ✔ is able to monitor thousands of devices every few seconds
  19. 19. MODULES
  20. 20. Modules in Nagios™? # tar xzvf mk-livestatus-1.2.4.tar.gz # cd mk-livestatus-1.2.4 # ./configure --prefix=/usr/local/icinga --exec-prefix=/usr/local/icinga # make # cp src/livestatus.o /usr/local/icinga/bin define module { module_name mklivestatus path /usr/local/icinga/bin/livestatus.o module_type neb args /usr/local/icinga/var/rw/live }
  21. 21. CheckerChecker NotifyNotify API (soon) API (soon) CompatCompat ClusterCluster IDOIDO GELFGELF GraphiteGraphite PerfdataPerfdata OpenTSDBOpenTSDB LivestatusLivestatus
  22. 22. # icinga2 feature enable livestatus # icinga2 feature enable ido-mysql # vim /etc/icinga2/features- available/ido-mysql.conf
  23. 23. DEMO
  24. 24. CLUSTERING
  25. 25. How about high available Nagios™? ✗ there is no integrated failover mechanism ✗ configuration is not distributed ✗ no shared monitoring information
  26. 26. What Icinga 2 provides you ✔ zones for multitenancy environments ✔ support for logic splits in the config ✔ availability and scaling zones ✔ automatic redistribution of checks ✔ master / satellite / agent
  27. 27. central datacenter central datacenter CheckerChecker ConfigConfig Live status Live status CheckerChecker DatabaseDatabase IDOIDO IDOIDO remote location CheckerChecker
  28. 28. Nagios™ and security ✗ NSCA works, but not in a good way ✗ NRPE has a couple of security issues ✗ You can make it secure … by hand
  29. 29. Icinga 2 clustering is PKI TLS only ✔ bidirectional connections ✔ helps you setting up a CA ✔ replication of events and status
  30. 30. DEMO
  31. 31. CONFIGURATION
  32. 32. Nagios™ config tricks are weird… define service{ host_name linux1,linux2,linux3,...,linux9 service_description ssh-check other service directives ... }
  33. 33. Nagios™ can only do lists define hostgroup{ hostgroup_name linux-servers alias Linux Servers members linux1,linux2,linux3 }
  34. 34. Icinga 2 brings logic apply Service "ssh" { import "generic-service” check_command = "ssh” assign where host.address && host.vars.os == "Linux” ignore where host.vars.test == true }
  35. 35. Icinga 2 wants to unterstand you object HostGroup "mysql-server" { display_name = "MySQL Server" assign where match("*mysql*", host.name) assign where host.vars.role == "mysql-server" ignore where host.vars.environment != "production" }
  36. 36. Imagine a host you manage object Host "shop1.nbg.de.bratwurst.de" { import "generic-host" address = "192.0.2.123" vars = { environment = "production" role = "webserver" location = "nbg1" application = "bratwurstshop" team = "appsupport" } }
  37. 37. Maybe add templates template Host "webserver-default" { import "generic-host" vars = { environment = "production" role = "webserver" } } object Host "shop1.nbg.de.bratwurst.de" { import "webserver-default" address = "192.0.2.123" vars.location = "nbg1" [...] }
  38. 38. Now add some services apply Service "http" { import "generic-service" check_command = "http" assign where host.role == "webserver" } apply Service "https" { import "generic-service" check_command = "http" vars.http_ssl = true assign where host.role == "webserver" }
  39. 39. Get notified apply Notification "host-prod-oncall" to Host { import "mail-host-notification" user_groups = [ "datacenter-oncall" ] timeperiod = "non-workhours" assign where host.environment == "production" } apply Notification "appsupport-prod-oncall" to Service { import "mail-service-notification" user_groups = [ "appsupport-oncall" ] timeperiod = "non-workhours" assign where host.team == "appsupport" && host.environment == "production" }
  40. 40. Define dependencies apply Dependency "host-in-nbg1" to Host { parent_host_name = "router.nbg1.bratwurst.de" disable_checks = true disable_notifications = true assign where host.location == "nbg1" && host.role != "router" }
  41. 41. Safe and powerful commands object CheckCommand "fancy-vendor-check" { import "plugin-check-command" command = [ PluginDir + "/check_vendor_foo" ] arguments = { "-H" = "$host.name$" "-C" = "$snmp_community$" "-m" = "$vendor_mode$" "-w" = "$vendor_warning$" "-c" = "$vendor_critical$" } vars.snmp_community = "public" }
  42. 42. Easy to use apply Service "fancy-vendor test" { import "generic-service" check_command = "fancy-vendor-check" vars.snmp_community = "isthissecure" vars.vendor_mode = "proprietary-magic" vars.vendor_warning = "80" vars.vendor_warning = "90" assign where host.type = "fancy-vendor-node" }
  43. 43. Using commands ● safe against shell injections ● clean interface, easy to write ● just set a var in service or host ● check our ITL template library
  44. 44. ONE MORE THING...
  45. 45. Icinga 2 is enhanceable object Service "webservice" { import "generic-service" check_command = "load" host_name = "a really great server" vars.load_wload1 = {{ if (get_time_period("9to5").is_inside) { return 40 } else { return 60 } }} }
  46. 46. WHAT YOU SEE IS WHAT YOU GET
  47. 47. Nagios CGI
  48. 48. Icinga Classic
  49. 49. Icinga Web 1
  50. 50. ✗ limitations in current Icinga interfaces ✗ parsing the status.dat is not fast ✗ executing commands is tedious ✗ really hard to extend and integrate ✗ no unified interface so far
  51. 51. Icingaweb 2 • easy to extend and embed • multiple authentication providers • reads from IDO database • responsive release soon TM
  52. 52. Web 2MySQL / PostgreSQL MySQL / PostgreSQL 2 or Icinga 1 The simplest setup set up within a few minutes...
  53. 53. Web 2 MonitoringMonitoring DocsDocs BPBP GraphiteGraphite PNPPNP
  54. 54. Demo
  55. 55. CONCLUSION
  56. 56. Where to start? • Go to docs.icinga.org • Try our Vagrant VMs • Use Icinga 2 packages • Rethink you configuration • Install Icinga Web 2 and play with it • Give us feedback #icinga
  57. 57. You?
  58. 58. Berlin 2016 March 1st Berlin 2016 March 1st Portland 2015 October 10th Portland 2015 October 10th Icinga Camp community meetups
  59. 59. THANK YOU! www.icinga.org exchange.icinga.org docs.icinga.org dev.icinga.org git.icinga.org @icinga /icinga +icinga

×