opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
136 stars 35 forks source link

Add basic support for asset tags #96

Closed chuhn closed 7 years ago

chuhn commented 8 years ago

Support for reading and writing asset tags.

mattpascoe commented 8 years ago

so far so good. just curious your use case on this one. While I started to stub this out awhile ago, I ultimately never completed it due to other options. Specifically I have started using custom attributes to store asset tags, serial numbers, and other information per host or subnet. I'm just curious if that method would work for your use case or not?

Part of my hesitancy to add asset tag (and serial numbers) to this part of ONA is that there are many other types of attributes that one might want to add. It seems there are more generic ways to accomplish this ability beyond just a few specific attributes.

Anyway, just want to investigate your situation a bit.

Thanks

chuhn commented 8 years ago

As said in #95 I'm about to migrate from an old Oracle-based ONA installation. That installation is entangled with our own home-grown asset management. The asset management information is visible in ONA by misuse of the locations table which has been replaced by a DB view of the asset management tables (reference → Asset Tag, address → Device Owner).

We are about to upgrade ONA and replace the asset management with a different solution, therefore I want to disentangle this setup. The asset tag is the identifier that links ONA hosts to asset management devices. My plan would be to write an ONA plugin that will retrieve the asset information and display it in ONA.

I guess I could also use a custom attribute if you'd recommend that as the way to go. I just came across the asset_tag field and it looked like meant to to the job.

mattpascoe commented 8 years ago

Ahh ok yep that all makes sense.

At this point I would certainly lean toward using custom attribute as it is the more generic way to add arbitrary bits of data. I at one point had aspirations of ONA tracking a lot of asset type information but realized I shouldn't be building a single tool to do everything. Linking ONA to an external system is the better way since there are many other asset tools that do a way better job of it.

Currently using the host actions method is one way that is already tied into the custom attributes. It allows you to provide the custom attribute value as a portion of a URL reference to an external system. In addition to that, as you said, it would be a very good thing to write a plugin that just queries the asset system and provides data visibly in ONA. There are several good examples of this in the existing plugins we offer (vmware_stats, livestatus_info, amazon_aws_detail etc)

At this point I'd like to not merge this pull request and explore the custom attribute path more. I'd be happy to discuss further and help out in exploring that. hit me up in IRC for quicker chatting if you want.