OTRS Trouble Ticket Integration

From OpenNMS

(Redirected from OTRS Integration)

Contents

OTRS Integration Documentation

OTRS OpenNMS package information

Read this carefully. OTRS changed between version 2.3 and 2.4. You will need to choose the correct OTRS OpenNMS package for your OTRS installation.

  • Version 1.0.0 has been tested with OTRS versions up to 2.3. It does not work with OTRS 2.4. Version 1.0.0 is only available from the OpenNMS SourceForge page.
  • Version 1.1.0 has been tested with OTRS version 2.4. Version 1.1.0 is available from the OpenNMS SourceForge page _and_ the OTRS master repository

Install the OpenNMS package in OTRS

  1. To get the installation package for this module either:
    • Visit the OpenNMS SourceForge page: http://sourceforge.net/projects/opennms/files/ or the OTRS master repo (ftp.otrs.org) and download a copy of the package to your workstation, or
    • Add the OpenNMS package (version 1.1.0 or later only) directly from the OTRS online repo - see step 2 below. You will need internet access direct from your OTRS host for this.
  2. Add the package to otrs
    • At the webUI for OTRS, go to Admin->Package Manager.
    • Add the OpenNMS package, either from a local copy (the machine running the browser), or from the OTRS master repository.
  3. Add the SOAP user to OTRS
    • At the webUI for OTRS, go to Admin->SysConfig.
    • Show the Group for "Framework".
    • Select Core::SOAP
    • Set the SOAP::User and SOAP::Password (the sample java code expects opennms/opennms but you should use a "proper" password for production). The opennms package uses the same authentication technique as the existing SOAP handle.
  4. Ensure you have the SOAP::Lite, and SOAP::DateTime CPAN modules installed. If you have used the existing OTRS SOAP handle, you will probably already have SOAP::Lite. SOAP::DateTime may not be installed.
  5. Check the path to the perl binary in $OTRS_HOME/bin/cgi-bin/opennms.pl. The package does not check for the location of your perl binary, and assumes it's /usr/bin/perl. If this is not the case then you will have to modify the cgi by hand.

Install OTRS Trouble Ticket Plugin in OpenNMS

The implementation of the OTRS plugin is as simple as the following steps:

  • Edit the $OPENNMS_HOME/etc/opennms.properties file and change this:
opennms.ticketer.plugin=org.opennms.netmgt.ticketd.NullTicketerPlugin

to something like this:

opennms.ticketer.plugin=org.opennms.netmgt.ticketer.otrs.OtrsTicketerPlugin
opennms.alarmTroubleTicketEnabled = true
opennms.alarmTroubleTicketLinkTemplate = <a href="http://localhost/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=${id}">${id}</a>

(obviously you will want to specify the hostname of your otrs server, rather than "localhost")

  • Edit the $OPENNMS_HOME/etc/otrs.properties file and change the following according to your installation:
otrs.endpoint=http://localhost/otrs/opennms.pl
otrs.username=opennms
otrs.password=opennms
otrs.state=new
otrs.priority=3 normal
otrs.lock=unlock
otrs.queue=Raw
otrs.articletype=note-external
otrs.defaultuser=root@localhost
otrs.articlefrom=jonathan@opennms.org
otrs.articlesendertype=agent
otrs.articlecontenttype=text/plain; charset=ISO-8859-15
otrs.articlehistorycomment=update by OpenNMS
otrs.articlehistorytype=OwnerUpdate
otrs.ownerid=1
otrs.validopenstateid=1, 4, 6, 7, 8
otrs.validclosedstateid=2, 3, 9
otrs.validcancelledstateid=5
otrs.openstateid=1
otrs.closedstateid=2
otrs.cancelledstateid=5
otrs.ticketopenedmessage=Ticket opened by OpenNMS
otrs.ticketclosedmessage=Ticket closed by OpenNMS
otrs.ticketcancelledmessage=Ticket cancelled by OpenNMS
otrs.ticketupdatedmessage=Ticket updated by OpenNMS
otrs.articleupdatesubject=Ticket update from OpenNMS

Key fields that you will need to update are:

  • otrs.endpoint - you will need to substitute the domain name for your OTRS server here.
  • otrs.username=opennms - this will need to be the SOAP user you configured in the OTRS framework.
  • otrs.password=opennms - this will need to be the SOAP password that you configured in the OTRS framework.
  • otrs.articlefrom - This will be the eMail that the ticket appears from - you probably don't want to use my eMail address ;-).
  • otrs.ticketopenedmessage etc. - This allows you to localize the OTRS article body when the state of a ticket is changed via OpenNMS.
  • otrs.articleupdatesubject - This allows you to localize the OTRS article subject the state of a ticket is changed via OpenNMS.

If you are running OTRS 2.4, you can optionally change:

otrs.articlecontenttype=text/plain; charset=ISO-8859-15

to

otrs.articlecontenttype=text/html; charset=ISO-8859-15

This will allow OTRS to render the HTML from Alarms correctly (thanks Patrick).

Version History/Availability

Personal tools
DevJam 2008 Sponsors
DevJam 2008 Sponsor: Google
DevJam 2008 Sponsor: Netregistry
DevJam 2008 Sponsor: Papa John's
NewEdge Networks
OpenNMS takes home the gold award!
Join the Free Software Foundation
Support This Project Commercial OpenNMS Support OpenNMS Italia Get OpenNMS at SourceForge.net. Fast, secure and Free Open Source software downloads Our Network Simulator Our Java Profiler