Developing some CMDB automation

English! place to talk about OTRS development, programming and coding

Moderator: tto

OTRS expert
Posts: 66
Joined: 17 May 2013, 09:30
OTRS Version?: 6.0.4
Real Name: Stein Erik Berget

Developing some CMDB automation

Postby seberget2 » 24 Jan 2018, 16:33

Hi there!
Some background first. We have several servers running in different AWS regions. So I want to register these servers in the OTRS CMDB (6.0.4). So I use Amazon Web Services - EC2 as vendor. When I now select Model I would like it to be a list of the different instance types EC2 have available. I would also like that this selection also prepopulate the CPU, Ram and Hard disk and maybe other fields.

During normal operations we also change the instance type, and then we also would like it to change.

So how to make this happen. Would the best idea be to create a set of template Configuration Items that represent the different AWS Instance types? Listen to CI change events for the Model field and then merge the information from the template with the real CI. And then combine this with some ACL to make sure the fields from the template are not editable by a user in the UI.

Have any of you other ideas on how to do this?

Have a happy day!
OTRS 6.0.4 on Ubuntu with MySQL DB, and various plug-ins and a hack or two :-D

OTRS wizard
Posts: 129
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin Yazi

Re: Developing some CMDB automation

Postby zzz » 25 Jan 2018, 12:45

Hello seberget2,

how does the process look where you need the CPU, RAM and hard disk information?
An alternative would be to keep the EC2 linked fields empty and dynamically display the details on the screen where you need them.

Therefore you could create an admin module where you link the EC2 instance types with the corresponding technical information.

Best regards

OTRS guru
Posts: 4475
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x

Re: Developing some CMDB automation

Postby reneeb » 25 Jan 2018, 14:46

Two possible solutions come to my mind:

*) You could create ConfigItem-Event module that does the listen to the VersionAdd event and does an API request to the AWS-API based on the name of the item. That module

*) Create dynamic fields that get the information from the API with ... nAPI-5.0.1 . Define CI attributes based on DynamicFields with ... tion-5.0.3 .
Perl / OTRS development:
Free OTRS add ons from the community:
Commercial add ons:

Return to “OTRS Developers”

Who is online

Users browsing this forum: No registered users and 5 guests