B9D10d01

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

Transcript of B9D10d01

OTRS - Nagios IntegrationJens BotheSenior 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.3o > 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.1o > 35,000 productive installations

2005

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

2003

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

2002

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

2001

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

1999OTRS AG 2008

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

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

3

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 & suggestionsOTRS AG 2008

4

SystemMonitoring module 1.1.1 - status quoMail 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

5

Nagios Acknowledgeowchart

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

6

Nagios congurationetc/objects/contacts.cfgdefine 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

7

OTRS CongurationProcessing of Nagios notications

OTRS AG 2008

8

OTRS congurationSending acknowledges to Nagios

OTRS AG 2008

9

Nagios checkscriptowchartStart

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 congurationKernel/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 congurationetc/objects/commands.cfgdefine command{ command_name command_line } check_otrs /opt/otrs/bin/otrs.NagiosCheck.pl -c $ARG1$

-N

etc/objects/localhost.cfgdefine 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 -> NagiosUsing a predened link for the "Free Field" in OTRShttp://10.211.55.6/nagios/cgi-bin/ status.cgi?host= $LQData{"TicketFreeText1"}

OTRS AG 2008

14

OTRS Nagios checkscript & rrdtoolsrrdtool 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"

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. BotheSenior Consultant OTRS AG Norsk-Data-Strae 1 61352 Bad Homburg v.d.H. Germany [email protected] Fon.: +49 (0)6172 681988 0 www.otrs.com

18