62
www.icinga.org Why favour Icinga over Nagios OSDC Berlin - 23th April 2015

OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

  • Upload
    netways

  • View
    111

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

www.icinga.org

Why favour Icinga over Nagios

OSDC Berlin - 23th April 2015

Page 2: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Bernd Erk

• Working @NETWAYS

• Icinga Co-Founder

• @gethash

Page 3: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

THE ICINGA PROJECT

Page 4: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

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.

Page 5: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Originally forked from Nagios in 2009

• Independent version Icinga 2 since 2014

Page 6: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

You?

Page 7: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Page 8: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Page 9: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

Icinga Core

C-based source

MySQL, PostgreSQL, Oracle

Icinga Quality, Testing and Community Support

Website and Open Source Ticketing System

Icinga Reports

based on Jasper

Reports

Icinga Doc

based on

Markdown

3rd Party Tools Icinga Web based on PHP using ExtJS, Agavi MVC

IDOUTILS

Icinga Web 2 Based on PHP / responsive design

Icinga 2

C++-based source with

multiple components

IDO Livestatus Cluster …

Page 10: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

ICINGA 2 - INTRODUCTION

Page 11: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Monitors everything

• In a regular interval

• Gathering status

• Collect performance data

Page 12: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Notifies using any channel

• Detects dependencies

• Handles events in configured way

Page 13: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Forwards logs to Logstash and Graylog

• Passes performance data to Graphite,

OpenTSDB or InfluxDB

Page 14: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Based on C++ and Boost

• Supports MySQL and PostgreSQL

• Includes a extensive template library

Page 15: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Version 2.3.4 is out since a couple of days

• Puppet, Chef and Ansible support

• Packages and Vagrant Box available

Page 16: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

WHY NAGIOS™ IS GOOD?

Page 17: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Monitoring things is very easy

• Very simple software stack

• No complex external dependencies

Page 18: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Active checks are powerful

• Gathering performance data

• Huge community

• Thousands of Plugins

Page 19: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

OK, BUT WHY ICINGA THEN?

Page 20: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

NAGIOS DOES NOT SCALE

Page 21: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• It is just a single loop

• Limitations using external interfaces

Page 22: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Icinga 2 is a multithreaded C++ Core

• Load is distributed automatically

• Ability to monitor thousands of devices in

second interval

Page 23: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Page 24: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

ADDING MODULES IS HARD

Page 25: OSDC 2015: Bernd Erk | Why favour Icinga over 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

Page 26: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

define module {

module_name mklivestatus

path /usr/local/icinga/bin/livestatus.o

module_type neb

args /usr/local/icinga/var/rw/live

}

Page 27: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

Checker

Notify

Gelf

Perfdata Graphite

IDO

Compat

Livestatus

Page 28: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• We have a powerful CLI

• Adding new features is easy

• You can really really do sophisticated setups

… but you don’t have too

Page 29: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

# icinga2 feature enable livestatus

# icinga2 feature enable ido-mysql

Page 30: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

DEMO

Page 31: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

NO CLUSTERING AND DISTRIBUTION

Page 32: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• There is no integrated failover mechanism

• Configuration is not distributed

• No shared monitoring information

Page 33: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Zones for multitenancy environments

• Support for logic splits in the config

• Availability and scaling zones

• Automatic redistribution of checks

Page 34: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

IDO

Config

Checker

Livestatus Checker

IDO

Checker

Perfdata GELF

Page 35: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

SECURITY IS A MESS

Page 36: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• NSCA works, but not in a good way

• NRPE has a couple of security issues

• You can make it secure … by hand

Page 37: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Bidirectional communication using SSL

• “binlog” like retention for events

• Distributed features throughout the cluster

Page 38: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

CONFIGURATION LIMITS

Page 39: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

define service{

host_name linux1,linux2,linux3,...,linux9

service_description ssh-check

other service directives ...

}

Page 40: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

apply Service "ssh" {

import "generic-service”

check_command = "ssh”

assign where host.address && host.vars.os == "Linux”

}

Page 41: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

apply Service "ssh" {

import "generic-service”

check_command = "ssh”

assign where host.address && host.vars.os == "Linux”

ignore where host.vars.test == true

}

Page 42: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

define hostgroup{

hostgroup_name linux-servers

alias Linux Servers

members linux1,linux2,linux3

}

Page 43: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

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)

}

Page 44: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

ONE MORE THING …

Page 45: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

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

}

}}

}

Page 46: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Different config format

• Won’t miss the old config!

• It is really time for change

• You will love it!

Page 47: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

WHAT YOU SEE IS WHAT YOU

GET

Page 48: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

HOPEFULLY NOT!

Page 49: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Page 50: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Page 51: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Parsing status.dat is not really cool

• Executing commands is hard

• Very inflexible architecture

Page 52: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Limitations in current Icinga interfaces

• Really hard to extend and integrate

• No unified interface so far

Page 53: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Easy to extend and embed

• Multiple authentication providers

• Support for db and livestatus

• Responsive

Page 54: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

Web 2

Monitoring Docs

BP Graphite PNP

Page 55: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

Demo

Page 56: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

THE COMMUNITY

Page 57: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

You?

Page 58: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

Portland 2015

October 10th

Kuala Lumpur 2015

June 9th

Page 59: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

CONCLUSION

Page 60: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Page 61: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

• Download Icinga 2

• Rethink you configuration

• Install Icinga Web 2 and play with it

• Give us feedback

#icinga

Page 62: OSDC 2015: Bernd Erk | Why favour Icinga over Nagios

THANK YOU!

www.icinga.org

dev.icinga.org

git.icinga.org

@icinga

/icinga

+icinga