OTRS Trouble Ticket Integration

From OpenNMS

Contents

OTRS Integration Documentation

Install the OpenNMS package in OTRS

  1. Add the package to otrs
    • At the webUI for OTRS, go to Admin->Package Manager.
    • Add the OpenNMS package (current version is 1.0.0 - should be available from the OTRS repo soon).
  2. 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.
  3. 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.
  4. 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.

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