19
WWW.ICINGA.ORG Icinga 2 Open Source Monitoring redesigned Icinga Camp San Francisco 2014 25 th Sept. - Team Icinga

Icinga 2 at Icinga Camp San Francisco

  • Upload
    icinga

  • View
    9.876

  • Download
    0

Embed Size (px)

DESCRIPTION

Talk on Icinga 2 at Icinga Camp 2014 in San Francisco

Citation preview

Page 1: Icinga 2 at Icinga Camp San Francisco

WWW.ICINGA.ORGWWW.ICINGA.ORG

Icinga 2Open Source Monitoring redesignedIcinga 2Open Source Monitoring redesigned

Icinga Camp San Francisco 2014

25th Sept. - Team Icinga

Icinga Camp San Francisco 2014

25th Sept. - Team Icinga

Page 2: Icinga 2 at Icinga Camp San Francisco

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

• Introduction

• Icinga 2

• Demo

• What‘s next

• Questions & Answers

Agenda

Icinga Camp San Francisco 2014

Page 3: Icinga 2 at Icinga Camp San Francisco

INTRODUCTION

Page 4: Icinga 2 at Icinga Camp San Francisco

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

Us

• Michael Friedrich• @dnsmichi, 31, Austrian• Working @NETWAYS• Icinga responsibilities

• Core 1.x & 2.x Developer• Release Manager

• On the team since 2009

Icinga Camp San Francisco 2014

• Gunnar Beutner• Working @NETWAYS• Icinga responsibilities

• Core 1.x & 2.x Developer

• On the team since 2011

Page 5: Icinga 2 at Icinga Camp San Francisco

Icinga 2

Page 6: Icinga 2 at Icinga Camp San Francisco

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

Icinga 2 - Overview

• Stable version: 2.1.1 (16.9.2014)• Supports all major distributions • Based on C++ and Boost• New configuration format• Compatible with plugins, addons, UIs

Icinga Camp San Francisco 2014

Page 7: Icinga 2 at Icinga Camp San Francisco

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

Features

• Available Features• Checker, Notifications• Compat (status files, Perfdata, Command Pipe)• Graphite• DB IDO, Livestatus• Cluster

• Simple feature enable/disable• Recurring Downtimes• Scalable for high performance• Embedded health checks• Integrated load-balancing of checks and notifications• Communication using SSL x509 certificates, IPv4/6• Monitoring Plugins 100% compatible

Icinga Camp San Francisco 2014

Page 8: Icinga 2 at Icinga Camp San Francisco

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

Cluster

• Zone model for distributed setups • Child zones don’t see each other

Icinga Camp San Francisco 2014

Page 9: Icinga 2 at Icinga Camp San Francisco

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

Cluster

• Event replication, Config Sync & High Availability• Secure communication with SSL x509 • Load-Balancing of Checks & Notifications

Icinga Camp San Francisco 2014

Page 10: Icinga 2 at Icinga Camp San Francisco

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

Config Differences

• New notification object instead of contacts• Apply services, notifications, dependencies using

• Assign where <condition>• Ignore where <condition>

• Freely definable custom attributes (command macros, apply conditions, ui filter)

• Global constants

• Conditional command arguments

• Icinga Template Library & Plugin Check Commands

• Many, many details

Icinga Camp San Francisco 2014

Page 11: Icinga 2 at Icinga Camp San Francisco

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

Configuration: Templates, Groups, Apply

template Host "db-server" { check_interval = 5m retry_interval = 3m check_command = "hostalive"}

template Service "db-service" { check_interval = 3m retry_interval = 1m}

object HostGroup "mysql-server" { display_name = "MySQL Server" assign where match("*mysql*", host.name) assign where match("db-*", host.vars.prod_mysql_db) ignore where host.vars.test_server == true ignore where match("*internal", host.name)}

object Host "mysql-db1" { import "db-server" import "mysql-server" address = "192.168.70.10"}

object Host "customer-db7" { import "db-server" import "mysql-server" address = "192.168.71.30" vars.prod_mysql_db = "db-customer-xy„ //vars.no_health_check = true}

Icinga Camp San Francisco 2014

apply Service "mysql-health" { import "mysql-service" check_command = "mysql" assign where match(“192.168.7*”, host.address) assign where "mysql-server" in host.groups ignore where host.vars.no_health_check == true}

Page 12: Icinga 2 at Icinga Camp San Francisco

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

Configuration: Notifications

Icinga Camp San Francisco 2014

object User "testconfig-user" { import "generic-user" display_name = "Icinga Test User" states = [ Critical, Unknown, Ok ] types = [ Problem, Recovery, DowntimeStart, DowntimeEnd, DowntimeRemoved, FlappingStart, FlappingEnd ] email = "icinga@localhost"}

object UserGroup "cg_admin" { assign where user.name == "testconfig-user"}

object Host "my-server" { import "linux-server-template" address = "192.168.1.10"}

object Service "my-ping" { import "generic-service" check_command = "my-ping-check" vars.ping_wrta = 100 vars.ping_wpl = 20 vars.ping_crta = 500 vars.ping_cpl = 60}

apply Notification "service-by-mail" to Service { command = "notify-service-by-mail" interval = 10m period = "8x5" types = [ Problem, Recovery, Up ] states = [ Warning, Critical ] user_groups = [ "cg_admin" ] assign where host.name == "my-server" && service.name == "my-ping"} apply Notification "host-by-mail" to Host { command = "notify-host-by-mail" interval = 120m period = "8x5" types = [ Problem, Recovery ] states = [ Down, Up ] user_groups = [ "cg_admin" ] assign where host.name == "my-server"}

Page 13: Icinga 2 at Icinga Camp San Francisco

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

Configuration: Dependencies

Icinga Camp San Francisco 2014

apply Service "nrpe-health" { import "generic-service" check_command = "nrpe" assign where host.vars.agent == "nrpe"}

apply Service "nrpe-disk" { import "generic-service" check_command = "nrpe" vars.nrpe_command = "check_disk" assign where host.vars.agent == "nrpe"}

object Host "nrpe-server" { import "generic-host" address = "192.168.1.5" vars.agent = "nrpe"}

apply Dependency "disable-nrpe-checks" to Service { parent_service_name = "nrpe-health"

states = [ OK ] disable_checks = true disable_notifications = true assign where service.check_command == "nrpe" assign where host.vars.agent == "nrpe" ignore where service.name == "nrpe-health"}

Page 14: Icinga 2 at Icinga Camp San Francisco

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

Configuration: Commands

Icinga Camp San Francisco 2014

object CheckCommand "my-mysql" { import "plugin-check-command" command = [ PluginDir + "/check_mysql" ] //constants.conf -> const PluginDir arguments = { "-H" = "$mysql_host$" "-u" = "$mysql_user$" "-p" = "$mysql_password$" "-P" = "$mysql_port$" "-s" = "$mysql_socket$" "-a" = "$mysql_cert$" "-k" = "$mysql_key$" "-C" = "$mysql_ca_cert$" "-D" = "$mysql_ca_dir$" "-L" = "$mysql_ciphers$" "-f" = "$mysql_optfile$" "-g" = "$mysql_group$" "-l" = { set_if = "$mysql_ssl$" description = "Use ssl encryption" } } vars.mysql_host = "$address$" vars.mysql_ssl = false}

object EventCommand "event_by_ssh" { import "plugin-event-command"

command = [ PluginDir + "/check_by_ssh" ]

arguments = { "-H" = "$event_by_ssh_address$" "-p" = "$event_by_ssh_port$" "-C" = "$event_by_ssh_command$" "-l" = "$event_by_ssh_logname$" "-i" = "$event_by_ssh_identity$" "-q" = { set_if = "$event_by_ssh_quiet$" } "-w" = "$event_by_ssh_warn$" "-c" = "$event_by_ssh_crit$" "-t" = "$event_by_ssh_timeout$" }

vars.event_by_ssh_address = "$address$" vars.event_by_ssh_quiet = false}

object EventCommand "event_by_ssh_restart_service" { import "event_by_ssh"

vars.event_by_ssh_command = "test $service.state_id$ -gt 0 && sudo /etc/init.d/$event_by_ssh_service$ restart"}

Page 15: Icinga 2 at Icinga Camp San Francisco

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

Icinga Camp San Francisco 2014

Demo – Vagrant

DEMOEveryone:

‘cd icinga2x-cluster; vagrant up’

https://github.com/icinga/icinga-vagrant

Page 16: Icinga 2 at Icinga Camp San Francisco

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

Icinga Camp San Francisco 2014

Get Icinga 2

• Getting started• http://docs.icinga.org/icinga2

• Icinga 2 Standalone & Cluster Vagrant Boxes• https://github.com/icinga/icinga-vagrant

• Snapshots and release builds• http://packages.icinga.org

• Natively available on• Debian testing (Jessie) and Wheezy (Backports)

or http://www.debmon.org • Ubuntu (use PPA by formorer)• OpenSuSE (see buildserver)• Fedora (soon)

Page 17: Icinga 2 at Icinga Camp San Francisco

What’s next

Page 18: Icinga 2 at Icinga Camp San Francisco

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

What’s next

• Icinga 2 version 2.2 (29.10.2014)• Agent for remote checks• Integrated CLI commands

• Planned features• APIs• your idea?

• Modules for Puppet, Ansible, Chef, Saltstack• Join the team! - https://dev.icinga.org/projects/icinga-tools

• Roadmap (https://dev.icinga.org/projects/i2/roadmap) based on• Bugs• Sponsors• Feedback (dev.icinga.org, Twitter, etc.)• Team members’ interests

Icinga Camp San Francisco 2014

Page 19: Icinga 2 at Icinga Camp San Francisco

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

QUESTIONS & ANSWERS

Icinga Camp San Francisco 2014

Web + Blog www.icinga.org

Docs docs.icinga.org

Development dev.icinga.org

Sourcecode git.icinga.org

Releases github.com/Icinga

Wiki wiki.icinga.org

IRC #icinga on FreeNode

Mailing lists lists.icinga.org

Support support.icinga.org

Twitter twitter.com/icinga

Facebook facebook.com/icinga

…….. Everywhere!

?Questions & Answers