Anda di halaman 1dari 19

OTRS - Nagios Integration

Jens Bothe
Senior Consultant, OTRS AG

NETWAYS Nagios Konferenz Nrnberg, 12.09.2008

History of OTRS & ((otrs))


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

2007

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

2006

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

2005

Stable Release OTRS 2.0


o > 26,000 productive installations NASA is running OTRS!

2003

Formation of OTRS GmbH (www.otrs.com) & stable Release OTRS 1.0


o > 12,000 productive installations

2002

1st stable Release, OTRS 0.5


o Productive operation of OTRS right from the start

2001

Open-Source Project OTRS.org (www.otrs.org) was founded


o Vision: Development of a generic helpdesk software for cross-industry use

1999
OTRS AG 2008

Source of OTRS, a project @ SuSE Linux AG


o Project: creation of a Ticket System (STTS) to support the distributors specic processes
2

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 notication e-mails

Nagios HP Open View all other monitoring solutions that send e-mails

SystemMonitoring module - release 2


released September 11, 2008 provides specic 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)

OTRS AG 2008

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 conguration to send notications to OTRS OTRS conguration to process Nagios notications OTRS conguration: acknowledge on ticket lock OTRS Nagios check script Conguration of check script using checker in Nagios Creation of graphs via rrdtool Round Table - questions & suggestions
OTRS AG 2008

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 congured in 'CloseActionState'

OTRS AG 2008

Nagios Acknowledge
owchart

Start

TicketLockUpdate

No Active

Yes Yes Freefields Host & Service populated No

Ticket Lock

Service=Host Yes No

Host Acknowledge

Service Acknowledge

Stop

OTRS AG 2008

Nagios conguration
etc/objects/contacts.cfg
define contact{ contact_name use alias email } define contactgroup{ contactgroup_name alias members }

otrs generic-contact OTRS System otrs@localhost

admins Nagios Administrators nagiosadmin, otrs

OTRS AG 2008

OTRS Conguration
Processing of Nagios notications

OTRS AG 2008

OTRS conguration
Sending acknowledges to Nagios

OTRS AG 2008

Nagios checkscript
owchart
Start

Search for number of tickets

No Nagios Checker Yes

No. of affected items

Yes No N < min_warn N < max_error

Yes Critical

No

Warning

No

Yes N > max_warn N > max_error

Yes Critical

No

Warning

End

OTRS AG 2008

10

OTRS conguration
Kernel/Cong/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:', );

OTRS AG 2008

11

Nagios conguration
etc/objects/commands.cfg
define command{ command_name command_line } check_otrs /opt/otrs/bin/otrs.NagiosCheck.pl -c $ARG1$

-N

etc/objects/localhost.cfg
define service{ use host_name service_description check_command }

local-service localhost OTRS Number of tickets check_otrs!/opt/otrs/Kernel/Config/NagiosCheck.pm

OTRS AG 2008

12

OTRS services in Nagios

OTRS AG 2008

13

Backlink OTRS -> Nagios


Using a predened link for the "Free Field" in OTRS
http://10.211.55.6/nagios/cgi-bin/ status.cgi?host= $LQData{"TicketFreeText1"}

OTRS AG 2008

14

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.sh
TMPTICKETS=`/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"

OTRS AG 2008

15

OTRS Nagios checkscript & rrdtools

OTRS AG 2008

16

OTRS Nagios checkscript & rrdtools

OTRS AG 2008

17

Contact

((
OTRS AG 2008

Jens O. Bothe
Senior Consultant OTRS AG Norsk-Data-Strae 1 61352 Bad Homburg v.d.H. Germany enjoy@otrs.com Fon.: +49 (0)6172 681988 0 www.otrs.com

18

Anda mungkin juga menyukai