OTRS – Manuallly Importing CMDB Items

OTRS — Jeff Eske on June 19, 2013 at 7:56 am

UPDATED:  I’ve changed employers and have moved on to other projects.  I no longer use OTRS, or have access to OTRS, so I won’t really be able to help you beyond what I’ve already posted here. 


I’ve seen the number of people looking at my short entry dealing with importing items into OTRS’s CMDB, so I thought I’d expand on that a bit.  I’ll go ahead and give a slight overview, then provide a quick-and-dirty description of how to manually import items into the CMDB.  Later, when time permits, I’ll add a better explanation of how to automate the import process.  I may clean this up at a later time, bur for now, I want to get down the basics.

You can manually import CMDB items (computers, software, etc.) into OTRS using the Import/Export function, via the web interface.  There is also a way that you can automatically import items, via cron and the commandline.  I have a brief overview of that here, but will create a more complete explanation at a later time.  First things first though; you have to do the steps below anyway, before you can automatically import items.  You have to have the import template created in order to automate the process, since the automation uses an existing template.


To create the template, we’ll need to identify what we’re importing, the delimiter, and the CMDB columns to be included.  In my example, I’m importing desktop computers, the file is a comma-delimited format, and I’ll be submitting the minimum required fields.

Required Fields
What I mean by minimum required fields is that OTRS has a small number of fields within a CMDB record that have to be filled in.  If you go into the CMDB section online and manually add an item, you can see what the requried fields are; they’ll be marked with an asterisk (star).  For my desktop computer import, I’ll need to AT LEAST provide: Computer Name,  Deployment State, Incident State, Network Adapter  1(NIC1), and whether it gets IP over DHCP.

Creating an Import Template

So, here’s a quick-and-dirty rundown of how to setup an import template.  The values that are shown in the images below SHOULD get you a working template.  You will however, probably want to edit the values to more precisely match what you need.  As always, please read my disclaimer before proceeding.

1> Goto: Admin -> System Administration -> Import/Export

Import/Export Link Location


2> On the Import/Export Management screen, click the “Add Template” button.

Import Template - Add Template


3> Set the values in the Step 1 screen

Import Template - Step 1

Name: Name of your new template
Object: The object type
Format: format of the import data
Valid: set it as valid, if you want to be able to use the template…


4> When finished, click Next


5> Set the values in the Step 2 screen

Import Template - Step 2
Class: whatever type of import it will be – this affects what elements show up later.
Maximum number of one element: Not sure what this does 🙂
Empty field means keep value:  This will leave existing data, rather than “blanking” it out.

6> When finished, click Next


7> Set the values in Step 3 screen

Import Template - Step 3
Column Separator: The separator used in your import file.
Include Column Headers: That’s up to you.  I do “No”


8> When finishd, click Next


9> Add mapping elements

Import Template - Step4

There are a few things to note when adding elements:

1> Click “Add Mapping Element” to add a line for each field that is in the import file.
2> Add an entry for EVERY field in the import file, in the order they exist in the file.
3> There are some REQUIRED fields.  These fields have to exist in the import file, and have valid values, in order for the record to import.  The required fields are: Name,Deployment State, Incident State,NIC1,IP over DHCP


10> When finished adding elements, click Next


11> Fill in search criteria to be used for exporting (optional)

Import Template - Step 5

You don’t really need to do anything with this, if you’re only planning on importing items.

12> If/when you finish adding search criteria, click Finish


13> Note the number of the template that you just created

List of Existing Templates

This should bring you back to Import/Export Management page that shows a listing of the existing Import/Export templates.  You should see your newly created template listed there.  Note the Number of your template, since this is what will be used to automate the import.

To actually import items, you’ll simply click on the “Import” link for the appropriate import template, select the source file with all of the records in it, and hit the “Import” button.  When it finishes, it will give you Summary page which indicates total records, successes, and failures.



Carb Tuning

Uncategorized — Jeff Eske on June 13, 2013 at 3:58 pm

The Sporty doesn’t seem to be getting enough gas to idle, if I push the choke all the way in, even after it’s warmed up.  That would lead me to believe that it’s probably running lean on idle.  When I went to reset the idle, I found out that the little anti-tamper plug had already been removed by someone.  That makes things easier for me.  The interesting thing is there are only 10k miles on the thing, with 8k of those coming from my brother-in-law and he claims no one has done any carb/tuneup work on the bike since he’s had it.  He said the the previous guy bought a jet kit, but chickened out and didn’t put it in.  I’m guessing that he probably went so far as to drill out the plug, but not do the jets.  I still have the jet kit, plus I ordered a .45 pilot jet from J&P Cycles, so if/when I install those, I’ll see if everything is still stock on the inside.

I also ordered new intake and carb gaskets from J&P Cycles, since I’ve seen on the forums that those are only good for a few riding seasons before they dry up.  If they’re dried up, they could be leaking and leaning things out some.  I guess we’ll see once I get the parts and pull things apart.

Jeff Eske

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Jeff's Meanderings*