81
WWW.ICINGA.ORG SIG-NOC Meeting - Stuttgart 04/08/2015 Icinga - Open Source Monitoring

Icinga 2 @ SIG-NOC Meeting

  • Upload
    icinga

  • View
    6.177

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Icinga 2 @ SIG-NOC Meeting

WWW.ICINGA.ORG

SIG-NOC Meeting - Stuttgart

04/08/2015 Icinga - Open Source Monitoring

Page 2: Icinga 2 @ SIG-NOC Meeting

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

• On the team since 2009

Page 3: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Agenda

• Icinga Project

• Icinga 1.x

• Icinga 2

• Icinga Web 2

• Demo

• Conclusion & Vision

Page 4: Icinga 2 @ SIG-NOC Meeting

THE ICINGA PROJECT

Page 5: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

The Icinga Project – Introduction

#icinga

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 6: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

The Icinga Project – About us

• Originally forked from Nagios in April 2009

• Independent, redesigned version Icinga 2 since 2014

• Different teams with autonomic responsibilities

Page 7: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

The Icinga Project - Icinga Exchange

Page 8: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

The Icinga Project - Icinga Exchange - GitHub

Page 9: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

The Icinga Project – Tools & Platform

Icinga Core 1.x

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 1.x 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: Icinga 2 @ SIG-NOC Meeting

ICINGA 1

Page 11: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 1 - Overview

• Original fork from Nagios 3.2.0

• Improved Core, intergrated IDOUtils DB backend

• Enhanced Classic UI & new Icinga Web 1.x

• Stable version: 1.13.1 (5.4.2015)

• 38 releases until today

• We’ll keep it in maintenance!

Page 12: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 1 – Changes 2014/2015

• Core

– Usability, security & performance fixes

– Recurring downtimes script

• Classic UI

– Enhanced filters for modified by attributes

– Support for compressed logfiles

• Icinga Web 1

– Rewritten session handling

– Custom variables in grids

Page 13: Icinga 2 @ SIG-NOC Meeting

ICINGA 2 - INTRODUCTION

Page 14: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Host

Databases Network

Icinga 2 – Use cases

#icinga

Monitors

Apps

Hardware OS Storage

Host Switches Services

Page 15: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga 2 – Use cases

#icinga

Alerts Mail

SMS

Voice

Ticket

Page 16: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga 2 – Use cases

#icinga

Reports

Page 17: Icinga 2 @ SIG-NOC Meeting

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

Page 18: Icinga 2 @ SIG-NOC Meeting

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

Page 19: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Vagrant

Page 20: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Checker

Notify

Gelf

Perfdata Graphite

IDO

Compat

Livestatus

Icinga 2 - Architecture

#icinga

Page 21: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Livestatus

Icinga 2 - Enable Livestatus

#icinga

Page 22: Icinga 2 @ SIG-NOC Meeting

ICINGA 2 - CLUSTER

Page 23: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

CA Zones API

Icinga 2 - Cluster Overview

Cluster

#icinga

Page 24: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#osmc

Icinga 2 - Cluster Architecture

• API communication using SSL

• Bidirectional connections supported

• Zone support for logic splits in the configuration

• Hash-based load distribution

• “binlog” like retention for monitoring events and messages

• Distributed components throughout the cluster

• Automatic redistribution of checks

• Integrated health check

Page 25: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga 2 - Cluster Distribution

Checker

Perfdata GELF

IDO

Open

TSDB

Graphite

Livestatus Checker

Statusdat

#icinga

Page 26: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga 2 - Cluster Zones

IDO

Checker

Graphite

Livestatus Checker

Statusdat

Host Host

Host

#icinga

Checker

Perfdata IDO

Page 27: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga 2 – Resource optimization

0

100

200

300

400

500

600

700

800

0

500

1000

1500

2000

2500

3000

30.000 Services

CPU-Cycles Memory

Megabyte

Cycle

s in m

illio

ns

#icinga

Page 28: Icinga 2 @ SIG-NOC Meeting

ICINGA 2 - CONFIGURATION

Page 29: Icinga 2 @ SIG-NOC Meeting

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

Page 30: Icinga 2 @ SIG-NOC Meeting

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!

Page 31: Icinga 2 @ SIG-NOC Meeting

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

Page 32: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Value Types

• Get to know all the value types!

Page 33: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Constants

• PluginDir, MysqlPassword, SnmpCommunity, …

Page 34: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Templates

• Templates for generic attributes

Page 35: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Custom Attributes

• Numbers, Strings, Booleans, Arrays, Dictionaries

• Filters, Match Conditions, additional information

Page 36: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Commands

• Optional/conditional arguments, functions, default values

Page 37: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Hosts and Services

• Checkable objects and attributes

Page 38: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Apply Services

• Match on (custom) attributes, names (assign)

• Exclude objects (ignore)

Page 39: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Apply For

• For loops over arrays/dictionaries

Page 40: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Notifications

• Dynamic notification rules

Page 41: Icinga 2 @ SIG-NOC Meeting

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?

Page 42: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Conditionals

• If-then-else

Page 43: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration: Loops

• While, for and break/continue

Page 44: Icinga 2 @ SIG-NOC Meeting

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

Page 45: Icinga 2 @ SIG-NOC Meeting

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

Page 46: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga 2 – Configuration – Another cool thing

#icinga

Page 47: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 – Configuration – Time dependent thresholds

• Time dependent thresholds

Page 48: Icinga 2 @ SIG-NOC Meeting

ICINGA 2 - MIGRATION

Page 49: Icinga 2 @ SIG-NOC Meeting

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

Page 50: Icinga 2 @ SIG-NOC Meeting

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

Page 51: Icinga 2 @ SIG-NOC Meeting

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”

}

Page 52: Icinga 2 @ SIG-NOC Meeting

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

}

Page 53: Icinga 2 @ SIG-NOC Meeting

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)

}

Page 54: Icinga 2 @ SIG-NOC Meeting

ICINGA WEB 2

Page 55: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2 - Motivation: Classic UI

• Not extendable

• Lacks real user management

– Authorization based on contacts - not enough for enterprise

needs

• Not usable on mobile devices

• Same machine as core

• Heavy I/O

Page 56: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2 – Motivation: Icinga Web 1.x

• Complicated XML configuration

• Cached configuration

• Framework overhead

• Not useable on mobile devices

• Slow in big environments

• Complicated API

Page 57: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2: Key features

• Lightweight like Classic UI & flexible as Icinga Web 1.x

• Easy to extend and embed into other projects

• Support for multiple authentication providers

– Internal DB

– LDAP

– HTTP Auth

• Support for IDO database & Livestatus

• Supports multiple backends simultaneously, as failover backend

• Responsive actions (tablet, mobile, etc)

• FAST!

Page 58: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2 - Overview

• Beta Version: 2.0.0-beta3 (13.3.2015)

• Release Candidate: 2.0.0-rc1 (late May 2015)

• Final version: 2.0.0 (scheduled for Q2 2015)

• Supports all major distributions

• Apache & Nginx support

• Packages and Vagrant Box available now!

https://dev.icinga.org/projects/icingaweb2/roadmap

Page 59: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Backends Authentication Setup Wizard

Framework / Icinga PHP Library Web 2

Icinga Web 2 - Foundation

#icinga

Page 60: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Web 2

Monitoring Docs

Icinga Web 2 - Modules

Business

Process Graphite PNP

#icinga

Page 61: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga Web 2 - Dashboard

#icinga

Page 62: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga Web 2 – Detail View

#icinga

Page 63: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga Web 2 – Event Grid

#icinga

Page 64: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga Web 2 – Service Grid

#icinga

Page 65: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2: CLI

• Uses Icinga Web 2 framework & backends

Page 66: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2: Responsiveness

• Your dashboard

• Workstation

• Tablet

• Mobile

• …

Page 67: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga Web 2 – Modules: PNP

#icinga

Page 68: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga Web 2 – Modules: Business Processes

#icinga

Page 69: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Icinga Web 2 – Modules: Ticketsystems

#icinga

Page 70: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2 – Modules: More, more, more

• Currently in development

– PNP (Graphing)

– Business Process

– Generic TTS (Ticket System Intergration)

• Coming

– Graphite (Graphing)

– Logstash as History Detail

– …

Page 71: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga Web 2 – Modules: Prototypes

• Ask Mr. Gelf

Page 72: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

Icinga 2 - Demo

DEMO

Page 73: Icinga 2 @ SIG-NOC Meeting

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

Page 74: Icinga 2 @ SIG-NOC Meeting

THE COMMUNITY

Page 75: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

The Community - Users

You?

Page 76: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

#icinga

The Community - Icinga Camps 2015

Kuala Lumpur 2015

June 9th

Portland 2015

October 10th

Antwerp 2015

April 13th

Page 77: Icinga 2 @ SIG-NOC Meeting

CONCLUSION

Page 78: Icinga 2 @ SIG-NOC Meeting

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

Page 79: Icinga 2 @ SIG-NOC Meeting

VISION

Page 80: Icinga 2 @ SIG-NOC Meeting

EXCHANGE. DEV. WIKI. BLOG. DOC. | WWW.ICINGA.ORG

Vision

• No enterprise edition

• Enterprise integration

#icinga

Page 81: Icinga 2 @ SIG-NOC Meeting

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