OTRS - Nagios Integration

Jens Bothe
Senior Consultant, OTRS AG

NETWAYS Nagios Konferenz Nürnberg, 12.09.2008

History of OTRS & ((otrs)) 2008 Partner Program & stable Releases: OTRS::ITSM 1.OTRS 2. USA) & stable Release OTRS 2.org (www.0 o > 12.otrs.otrs.1 .2.5 o Productive operation of OTRS right from the start 2001 Open-Source Project OTRS. (Silicon Valley.000 productive installations 2005 Stable Release OTRS 2.000 productive installations – NASA is running OTRS! 2003 Formation of OTRS GmbH (www.3 o > 60. OTRS 0.000 productive installations 2006 Formation of OTRS Inc.0 .000 productive installations 2007 OTRS GmbH  OTRS AG & stable Releases: OTRS::ITSM 1. o > 49.000 productive installations 2002 1st stable Release.0 o > 26.OTRS 2. a project @ SuSE Linux AG o Project: creation of a Ticket System (STTS) to support the distributors specific processes 2 .1 o > 35.com) & stable Release OTRS 1.org) was founded o Vision: Development of a generic helpdesk software for cross-industry use 1999 OTRS AG 2008 Source of OTRS.

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 .2) OTRS AG 2008 3 .release 2   released September 11.0.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 . 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.

2.org/pub/otrs/packages/ SystemMonitoring-2.2 local MTA to deliver mails between OTRS and Nagios (i.3.otrs.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 .agenda  System requirements  Linux OS    Running installation of Nagios Running installation of OTRS 2.0.e. procmail) actual release of SystemMonitoring module: ftp://ftp.questions & suggestions OTRS AG 2008 4 .

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' OTRS AG 2008 5 .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.1. record Host | and Service.SystemMonitoring module 1.1 .

Nagios Acknowledge flowchart 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 .

otrs OTRS AG 2008 7 .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.Nagios configuration etc/objects/contacts.

OTRS Configuration Processing of Nagios notifications OTRS AG 2008 8 .

OTRS configuration Sending acknowledges to Nagios OTRS AG 2008 9 .

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 .Nagios checkscript flowchart Start Search for number of tickets No Nagios Checker Yes No.

max_warn_treshhold => 20.OTRS Nagios checker Copyright (C) 2001-2008 OTRS AG.org/cvs/Kernel/System/Ticket. # Information used by Nagios # Name of check shown in Nagios Status Information checkname => 'OTRS Checker'.NagiosCheck . # Text shown in Status Information if everything is ok OK_TXT => 'enjoy tickets:'. }. min_crit_treshhold => 2.otrs. max_crit_treshhold => 25. # 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:'.org/ -For possible search options see: http://dev.html -> TicketSearch() Examples see below %Config = ( Search => { TicketCreateTimeNewerMinutes => 5.pm # # # # # # # -Example Configfile for otrs. OTRS AG 2008 11 . min_warn_treshhold => 5.OTRS configuration Kernel/Config/NagiosCheck. ). http://otrs.

pl -c $ARG1$ -N etc/objects/localhost.cfg define command{ command_name command_line } check_otrs /opt/otrs/bin/otrs.NagiosCheck.Nagios configuration etc/objects/commands.pm OTRS AG 2008 12 .cfg define service{ use host_name service_description check_command } local-service localhost OTRS Number of tickets check_otrs!/opt/otrs/Kernel/Config/NagiosCheck.

OTRS services in Nagios OTRS AG 2008 13 .

cgi?host= $LQData{"TicketFreeText1"} OTRS AG 2008 14 .211.55.6/nagios/cgi-bin/ status.Backlink OTRS -> Nagios Using a predefined link for the "Free Field" in OTRS http://10.

NagiosCheck.rrd.OTRS Nagios checkscript & rrdtools rrdtool create /opt/otrs/var/otrs.rrd DS:opentickets:GAUGE:600:U:U RRA:AVERAGE:0.png --start -86400 --title "OTRS Performance Data" --vertical-label "offene Tickets" -w 600 -h 200 DEF:opentickets=otrs.pm` rrdtool update otrs.5:1:2400 bin/otrs.pl -c /opt/otrs/Kernel/Config/ NagiosCheck.rrd $TODAY:$TMPTICKETS rrdtool graph /opt/otrs/var/httpd/htdocs/images/opentickets_daily.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 .sh TMPTICKETS=`/opt/otrs/bin/otrs.rrd:opentickets:AVERAGE AREA:opentickets#00ff00:"offene Tickets" rrdtool graph /opt/otrs/var/httpd/htdocs/images/opentickets_weekly.

OTRS Nagios checkscript & rrdtools OTRS AG 2008 16 .

OTRS Nagios checkscript & rrdtools OTRS AG 2008 17 .

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