Icinga 2 Vro Kaplan @verosk http://inuits.eu/ Playground Vagrant - - PowerPoint PPT Presentation

icinga 2
SMART_READER_LITE
LIVE PREVIEW

Icinga 2 Vro Kaplan @verosk http://inuits.eu/ Playground Vagrant - - PowerPoint PPT Presentation

Whats new Icinga 2 Vro Kaplan @verosk http://inuits.eu/ Playground Vagrant VM http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/getting-started#vagrant Modules & features icinga2-enable-feature


slide-1
SLIDE 1

What’s new

Icinga 2

Věroš Kaplan

@verosk

http://inuits.eu/

slide-2
SLIDE 2

Playground

Vagrant VM

http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/getting-started#vagrant

slide-3
SLIDE 3

Modules & features

icinga2-enable-feature icinga2-disable-feature IDOUtils graphite classic-web (CGIs) …

slide-4
SLIDE 4

Icinga Web 2 (beta)

Icinga Camp Antwerp https://www.icinga.org/community/events/icinga-camp-antwerp/

slide-5
SLIDE 5

Modules & features

icinga2-enable-feature icinga2-disable-feature IDOUtils graphite ...

slide-6
SLIDE 6

Yet another New programming language

Types

  • lists, strings, numbers, ...

Operators

http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring- icinga2#expression-operators

New VIM syntax highlighting

https://github.com/Icinga/icinga2/tree/master/tools/syntax/vim

slide-7
SLIDE 7

Comments

// this is one-line comments /* this is multi line comment */ # this is no longer comment

slide-8
SLIDE 8

Include

include <magic_file> include “not_so_magic_file” include “lot_of_files/*.conf” include_recursive “directory” // only *.conf

slide-9
SLIDE 9

Operators

http://docs.icinga.

  • rg/icinga2/latest/doc/module/icinga2/chapter/c
  • nfiguring-icinga2#expression-operators

display_name = Icinga2Location + “ rocks”

slide-10
SLIDE 10

Constants!

/etc/icinga2/constants.conf

slide-11
SLIDE 11

Time granularity

define service “is_it_friday” { check_interval = 1h retry_interval = 30m ... } check_interval = 1min retry_check_interval

slide-12
SLIDE 12

Templates

template Host “Foo-Bar” { bar }

  • bject Host “Foo-Bar-Praha” {

import “Foo-Bar” }

slide-13
SLIDE 13

structured vars …

  • bject Host "core-switch" {

import "generic-host" address = "127.0.0.1" vars.interfaces["0"] = { port = 1 vlan = "internal" address = "127.0.0.2" qos = "enabled" } }

slide-14
SLIDE 14

Commands

define CheckCommand “ssh” { … } define NotificationCommand “hipchat” { … } define EventCommand “ipmi-restart” { … }

slide-15
SLIDE 15

Define command

define command “check” { command = [ … “/check_ping” ] args = { “-H” = host.address “-w” = host.vars.warn_timeout ... } }

slide-16
SLIDE 16
slide-17
SLIDE 17

Apply command

apply Service “foo” { ... assign where (host.vars.location == ‘praha’) }

slide-18
SLIDE 18

Advanced command

apply Service “check_disk_c” { xxx assign where (host.vars.has_disk_c) }

slide-19
SLIDE 19

Advanced apply

apply Service “check_disk_c” { xxx assign where ((host.vars.has_disk_c) && (host.vars.has_nsca)) }

slide-20
SLIDE 20

for Loops

apply Service for (customer => config in host.vars.hosting) { import "generic-service" check_command = "ping4" … }

slide-21
SLIDE 21

Na^H^HMonitoring plugins!

s/nagios-plugins/monitoring-plugins/ Extra opts: /etc/monitoring-plugins.ini

https://www.monitoring-plugins.org/doc/extra-opts.html

slide-22
SLIDE 22
slide-23
SLIDE 23

Random notes

  • new notifications
  • distributed monitoring zones
slide-24
SLIDE 24

ENOTIME