Transform Dell service tag to express service code.

Started by normalcy, November 28, 2017, 02:18:09 AM

Previous topic - Next topic

normalcy

Hi all, I have a WMI DCI that pulls the Dell service tag from the windows machines running the netxms agent.

WMI.Query(root\cimv2,select * from Win32_ComputerSystemProduct,IdentifyingNumber)

This number is generally not what is entered when calling up support, they prefer the DTMF friendly Express Service Code that is a numerical version of the Service Tag (easier to type on number pad).
I've found a couple of links that describe the service tag as a base-36 number [A-Z][0-9] that you just convert to decimal.

http://creativyst.com/Doc/Articles/HT/Dell/DellNumb.htm
https://serverfault.com/questions/589774/how-to-convert-a-dell-service-tag-to-an-express-service-code

What is the best way to do this in NetXMS?

Do I create a DCI that takes the same WMI query and uses a transformation script to convert the number?  Is this possible in NXSL with base36 conversion to decimal?

Or if NXSL can't handle arbitrary bases do I have to use an external Python/nxshell script to do the conversion and call that from a DCI?

My goal is to get it represented as a DCI to display on the object details tab and in DCI summary tables.

Thanks for any suggestions.