19
NETWAYS Nagios Konferenz Nürnberg, 12.09.2008 OTRS - Nagios Integration Jens Bothe Senior Consultant, OTRS AG

Nagios Conference 2008 En

Embed Size (px)

Citation preview

Page 1: Nagios Conference 2008 En

NETWAYS Nagios KonferenzNürnberg, 12.09.2008

OTRS - Nagios Integration

Jens BotheSenior Consultant, OTRS AG

Page 2: Nagios Conference 2008 En

OTRS AG 2008 2

History of OTRS & ((otrs))

2007 OTRS GmbH OTRS AG & stable Releases: OTRS::ITSM 1.0 - OTRS 2.2.o > 49,000 productive installations

1999 Source of OTRS, a project @ SuSE Linux AGo Project: creation of a Ticket System (STTS) to support the distributors specific processes

2001 Open-Source Project OTRS.org (www.otrs.org) was foundedo Vision: Development of a generic helpdesk software for cross-industry use

2003 Formation of OTRS GmbH (www.otrs.com) & stable Release OTRS 1.0o > 12,000 productive installations

2006 Formation of OTRS Inc. (Silicon Valley, USA) & stable Release OTRS 2.1o > 35,000 productive installations

2002 1st stable Release, OTRS 0.5o Productive operation of OTRS right from the start

2005 Stable Release OTRS 2.0o > 26,000 productive installations – NASA is running OTRS!

2008 Partner Program & stable Releases: OTRS::ITSM 1.1 - OTRS 2.3o > 60,000 productive installations

Page 3: Nagios Conference 2008 En

OTRS AG 2008 3

Intention & History of the SystemMonitoring module

Ticketsystems and monitoring solutions mostly work as a standalone solution Idea: bringing together the best of both „worlds“

SystemMonitoring module - release 1 released october 2007

generic module to generate and close tickets using notification e-mails Nagios HP Open View all other monitoring solutions that send e-mails

SystemMonitoring module - release 2 released September 11, 2008 provides specific content for Nagios:

Acknowledge on ticket lock Nagios Checker for OTRS

Forecast: OpenNMS integration via SOAP interface

independent module: SystemMonitoring-OpenNMS transmission of performance data to Nagios (SystemMonitoring 2.0.2)

Page 4: Nagios Conference 2008 En

OTRS AG 2008 4

agenda

System requirements Linux OS

Running installation of Nagios Running installation of OTRS 2.3.2 local MTA to deliver mails between OTRS and Nagios (i.e.

procmail) actual release of SystemMonitoring module: ftp://ftp.otrs.org/pub/otrs/packages/

SystemMonitoring-2.0.2.opm Nagios configuration to send notifications to OTRS OTRS configuration to process Nagios notifications

OTRS configuration: acknowledge on ticket lock OTRS Nagios check script

Configuration of check script using checker in Nagios

Creation of graphs via rrdtool Round Table - questions & suggestions

Page 5: Nagios Conference 2008 En

OTRS AG 2008 5

SystemMonitoring module 1.1.1 - status quo

Mail matches 'FromAddress'? | +-> NO -> Continue with regular mail processing | +-> YES -> Does a ticket with matching Host/Service combination already exist in OTRS? | +-> NO -> Does 'State:' match 'NewTicketRegExp'? | | | +-> NO -> Stop processing this mail | | (silent drop) | | | +-> YES -> Create new ticket, record Host | and Service, attach mail | +-> YES -> Attach mail to ticket -> Does 'State:' match 'CloseTicketRegExp'? | +-> NO -> Continue with regular mail processing | +-> YES -> Change ticket type as configured in 'CloseActionState'

Page 6: Nagios Conference 2008 En

Start

FreefieldsHost & Service

populated

TicketLockUpdate

Service=Host

Stop

Host Acknowledge Service Acknowledge

Ticket Lock

ActiveNo

No

No

Yes

Yes

Yes

OTRS AG 2008 6

Nagios Acknowledgeflowchart

Page 7: Nagios Conference 2008 En

OTRS AG 2008 7

Nagios configurationetc/objects/contacts.cfg

define contact{ contact_name otrs use generic-contact alias OTRS System email otrs@localhost }

define contactgroup{ contactgroup_name admins alias Nagios Administrators members nagiosadmin, otrs }

Page 8: Nagios Conference 2008 En

OTRS AG 2008 8

OTRS ConfigurationProcessing of Nagios notifications

Page 9: Nagios Conference 2008 En

OTRS AG 2008 9

OTRS configurationSending acknowledges to Nagios

Page 10: Nagios Conference 2008 En

Start

Search for number of tickets

N < min_warn

Warning

N > max_warn

Warning

N > max_error

N < max_error Critical

Critical

End

YesNo

Yes

Yes Yes

No

No

No

Nagios Checker

No. of affected items

No

Yes

OTRS AG 2008 10

Nagios checkscriptflowchart

Page 11: Nagios Conference 2008 En

OTRS AG 2008 11

OTRS configurationKernel/Config/NagiosCheck.pm

# --# Example Configfile for otrs.NagiosCheck - OTRS Nagios checker# Copyright (C) 2001-2008 OTRS AG, http://otrs.org/# --# For possible search options see:# http://dev.otrs.org/cvs/Kernel/System/Ticket.html -> TicketSearch()# Examples see below

%Config = ( Search => { TicketCreateTimeNewerMinutes => 5, }, min_warn_treshhold => 5, max_warn_treshhold => 20, min_crit_treshhold => 2, max_crit_treshhold => 25,

# Information used by Nagios# Name of check shown in Nagios Status Information checkname => 'OTRS Checker',# Text shown in Status Information if everything is ok OK_TXT => 'enjoy tickets:',# Text shown in Status Information if warning threshhold reached WARN_TXT => 'number of tickets:',# Text shown in Status Information if critical threshhold reached CRIT_TXT => 'critical number of tickets:',);

Page 12: Nagios Conference 2008 En

OTRS AG 2008 12

Nagios configurationetc/objects/commands.cfg

define command{ command_name check_otrs command_line /opt/otrs/bin/otrs.NagiosCheck.pl -c $ARG1$ -N }

etc/objects/localhost.cfg

define service{ use local-service host_name localhost service_description OTRS Number of tickets check_command check_otrs!/opt/otrs/Kernel/Config/NagiosCheck.pm

}

Page 13: Nagios Conference 2008 En

OTRS AG 2008 13

OTRS services in Nagios

Page 15: Nagios Conference 2008 En

OTRS AG 2008 15

OTRS Nagios checkscript & rrdtools

rrdtool create /opt/otrs/var/otrs.rrd DS:opentickets:GAUGE:600:U:U RRA:AVERAGE:0.5:1:2400

bin/otrs.rrd.shTMPTICKETS=`/opt/otrs/bin/otrs.NagiosCheck.pl -c /opt/otrs/Kernel/Config/NagiosCheck.pm`rrdtool update otrs.rrd $TODAY:$TMPTICKETS

rrdtool graph /opt/otrs/var/httpd/htdocs/images/opentickets_daily.png --start -86400 --title "OTRS Performance Data" --vertical-label "offene Tickets" -w 600 -h 200 DEF:opentickets=otrs.rrd:opentickets:AVERAGE AREA:opentickets#00ff00:"offene Tickets"rrdtool graph /opt/otrs/var/httpd/htdocs/images/opentickets_weekly.png --start -604800 --title "OTRS Performance Data" --vertical-label "offene Tickets" -w 600 -h 200 DEF:opentickets=otrs.rrd:opentickets:AVERAGE AREA:opentickets#00ff00:"offene Tickets"

Page 16: Nagios Conference 2008 En

OTRS AG 2008 16

OTRS Nagios checkscript & rrdtools

Page 17: Nagios Conference 2008 En

OTRS AG 2008 17

OTRS Nagios checkscript & rrdtools

Page 18: Nagios Conference 2008 En

OTRS AG 2008 18

Contact

(( Jens O. BotheSenior Consultant

OTRS AG Norsk-Data-Straße 1 61352 Bad Homburg v.d.H.Germany

[email protected]

Fon.: +49 (0)6172 681988 0www.otrs.com

Page 19: Nagios Conference 2008 En