Forum Discussion

teppotahkapaa's avatar
7 months ago

Device configuration "key/value" pairs synchronization to ITSM

  With Powerflow most data are pretty easy to sync from SL1 to ITSM/CMDB, in this case ServiceNow. But now we have requirement that we should sync cloud device tags from SL1 to SN. The data from Az...
  • DouglasR's avatar
    7 months ago

    One possible way to make this work with the data as is would be to update the DA and stringify the Key/Value pairs using json.dumps() into a single attribute or asset field in SL1.

    Then in the PowerFlow mappings configuration, you could utilize a jinja template to load that string back into an object, using json.loads(). Once you have that object, you can either iterate through every key/value pair, or select a specific key to map to a ServiceNow attribute.

    Something like: (note I have not run this personally, this is just an example)

    {%- set tagObj = json.loads(tagString) -%}
    {%- set oneTagValue = tagObj['desiredTagKey'] %}

    Hopefully this suffices using the DA data as it exists today. However, it does seem there is room for improvement in that the DA should set the tags in a way that is more easily and consistently consumable by PF.

    To best address this, please open a support ticket requesting the improvement, and let us know how you feel would be the best way to handle this tag data.

     

    Thanks