Forum Discussion

teppotahkapaa's avatar
teppotahkapaa
Contributor II
19 days 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 Azure virtual server, using Azure PP, is shown on SL1 like below, multiple key/value rows per device. So those are not easily stored into Attributes. And if I have understood correctly, quite a lot of tags used in cloud.

Any ideas how these could be synced with PF into ServiceNow?

 

5 Replies

  • 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

     

  • Quick and dirty answer for you here. If this is DA data you could always edit the DA and map the collection object to an asset field that is then synced over the SN integration. 

    • teppotahkapaa's avatar
      teppotahkapaa
      Contributor II

      This DA is: Microsoft: Azure Virtual Machine Configuration

      And as show, it actually retrieves multiple rows, with each one having key/value pair. In assets there is no such place to store those. Nor in PF, not easy way to send such information.

      Probably needs it's own DA (whooa) to read that data and store it into Attribute, probably easier than asset, or rewrite the SL made snippet to store that data also into other collection object, in one string, so that it can be sent to CMDB

    • teppotahkapaa's avatar
      teppotahkapaa
      Contributor II

      Well, this is DA made by ScienceLogic. So I am trying to find the correct logic here.

  • Hello and thank you for posting this question, I'm working internally to identify a solution. I will be back with you shortly. 

    Best, Sara