icinga2-2013-kw26x - Icinga Wiki

crashclappergapSoftware and s/w Development

Dec 13, 2013 (3 years and 11 months ago)

198 views

ICINGA 2

CALENDAR

WEEK

26

GUNNAR BEUTNER, MICHAEL FRIEDRICH

SCRIPT VARIABLES


Supports user
-
definable

variables.


Can
currently

only

be

used

for

numeric

values
.


Supported

operators
: +,
-
, *, /, &, |, <<, >>, ()

set

StateOK

= (0)

set

StateWarning

= (1)

set

StateCritical

= (2)

set

StateUnknown

= (3)

set

StateUncheckable

= (4)


/*


*
Converting

states

to

their

filter

values
: 1<<
state


*/

set

StateFilterOK

= (1<<
StateOK
)

set

StateFilterWarning

= (1<<
StateWarning
)

set

StateFilterCritical

= (1<<
StateCritical
)

set

StateFilterUnknown

= (1<<
StateUnknown
)

set

StateFilterUncheckable

= (1<<
StateUncheckable
)

NOTIFICATION

FILTERS


Allows

filtering

by

notification

type (
DowntimeStart
,
DowntimeEnd
, Problem,
Recovery
, etc.)


Allows

filtering

by

service

state

(OK,
Warning
, Critical, etc.)


Can
be

defined

for

both

User
and

Notification

objects
.

object

User {


notification_state_filter

= (
StateFilterOK

|
StateFilterCritical
),


notification_type_filter

= (
NotificationFilterProblem

|
NotificationFilterRecovery
)

}

FLAPPING

DETECTION


Algorithm

is

quite

similar

to

what

Icinga

1.x
does
:


Keep
track

of


good

and


bad

checks
.


Bad
checks

are

checks

where

a
state

change

occurred


„Forget“
about

old

checks

after a
few

minutes
.

VALIDATION


Service
shortname

validation

is

still
missing

(
should

be

finished

on
Thursday
/
Friday
).


Conditional

validation

replaced

with

a
more

traditional
approach
.


Added

validators

for

LegacyTimePeriod

in
the

built
-
in
validation

config
.


Added

validators

for

command

objects
.

COMPAT LOG


first line of raw output logged in ALERT msg (also for status.dat)


still missing:

NOTIFICATION, ACKNOWLEDGE, DOWNTIME, FLAPPING, PASSIVE CHECKS


requires messages sent as events

CONFIG CONVERSION I


Perl,
-
c icinga.cfg
-
o conf/,
-
h
-
v


Import keeps object structure (templates, etc)


host
-
>service relations using service templates


service
-
>hostgroup<
-
hostmembers transformation


Check|Event|NotificationCommand objects


$ARGn$ command arguments as freely definable macros


hostcheck based on command name, if possible

CONFIG CONVERSION II


Notification object for Services and Users


convert notification_options to notification_{type,state}_filter


Dependencies and parents merged into 2.x dependencies


Escalations == Notification with begin and end time


Custom Vars, *_url, etc as custom dictionary

CONFIG CONVERSION CAVEATS


wildcards as "all objects",

no explicit regex support, excludes ignore objects


host deps and parents merged into dependencies


missing various attributes, such as failure_criteria for dependencies


flapping logic changed, no threshold conversion


some special object tricks ignored


output unsorted, no "this could be a template instead" magic


nothing critical!