Service Operations Insight

Expand all | Collapse all

Add existing CIs to a Service via cmd-line

silev02

silev02Apr 20, 2017 01:42 PM

  • 1.  Add existing CIs to a Service via cmd-line

    Posted Nov 07, 2013 02:43 AM

    How can I add existing CIs in SOI to Groups or Services? I have to add about 20 000 existing CIs to new Services and Groups I created, so the Service Modeler is not going to help.



  • 2.  RE: Add existing CIs to a Service via cmd-line

    Posted Nov 07, 2013 06:24 AM

    Nevermind. I answered my own question. Now to delete the 'unwanted' CIs. Can't get that to work.



  • 3.  RE: Add existing CIs to a Service via cmd-line

    Posted Nov 08, 2013 01:54 AM

    Just realised that I actually DIDN'T solve the problem. I am still sitting with a lot of CIs that needs adding to various groups and services.



  • 4.  Re: Add existing CIs to a Service via cmd-line

    Posted Jan 07, 2016 04:04 PM

    Does anyone have any suggestions on how to reference an existing CI to setup the relation to a service via an XML feed to GCEventAddCmd.bat?

     

    I have lots of services to create and lots of devices to reference from various connectors.  Almost all today are Spectrum connectors, but in the future there will be other systems connected into SOI as well.

     

    So I assume in my XML I must put a <CI> record such as:

    <CI>
    <property tag="eventType"            value="AddCI" />
    <property tag="MdrElementID"         value="Where do I get the Mdr Element ID?????" />   <!-- 0x7909986 -->
    <property tag="className"            value="Port"    />
    <property tag="Label"                value="Port 1" />
    <property tag="Description"          value="{some type of port description}" />
    <property tag="AdministrativeStatus" value="Managed"  />
    <property tag="InstanceName"         value="{some type of instance name}" />
    </CI>

    then create the relation to the service using the MdrElement ID from the CI record, but I'm wondering where do I get the Mdr Element ID that I use to reference an existing device that is being collected by one of the existing connectors?   If I go to the USM mobile view, it shows the Spectrum model handle.  If I look at the model in the service editor, it shows completely strange looking ID.  Neither of them seem to work for me when I reference them in the XML.



  • 5.  Re: Add existing CIs to a Service via cmd-line

    Posted Jan 08, 2016 05:34 AM

    Hi William,

     

    the basic principle in SOI is that you make use of CIs having been created by the same connector.

    E.g. you have to create the CIs via the Universal Connector (GCEventAddCmd.bat) first.

    By doing so you know the MdrElementID for the reference in the Relationship.

    The CIs you create this way should match the correlation criteria of the ones having been created by other connectors.

     

    The reason your XML does not work with either of the MdrElementIDs is:

    Every CI is identfied by the triple: MdrProduct, MdrProductInstance, MdrElementID.

    If you use the Univeral Connector and only specify the MdrElementID, the other two values are set for the Universal Connector, and thus there is no such CI in the system.

     

    MichaelBoehm



  • 6.  Re: Add existing CIs to a Service via cmd-line

    Posted Jan 08, 2016 10:11 AM

    So, if I find the correct MdrProduct, MdrProductInstance, MdrElementID, should I be able to use that in the Universal Connector XML to create a relationship to a CI that was created with the Spectrum connector?

     

    Also which MdrElementID, MdrProductInstance, MdrProduct triplet should I use?

     

    If I use the USM Web View and search around to finally find my CI, it tells me the triplet should be:

        Mdr Element ID: d08d571600064865991d3bf36a8f6442

        Mdr Prod Instance: tenant0

        Mdr Product CA:00030

    If I go into Service editor in the console and look at the USM Properties I get:

        same MDR Element ID, Mdr Prod Instance

        Mdr Product "CA Catalyst"

    If I look at the USM Notebook I get:

        Mdr Element ID: 0x79094cf

        Mdr Prod Instance: Spectrum-spechou-po-2p.sys.comcast.net

        Mdr Product: CA:000005

     

    I have actually tried each of them, and I can not get the CI added to my Service model.

     

    Example:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <Services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <Service>

      <property tag="eventType"            value="AddService"     />

      <property tag="MdrElementID"         value="Houston"        />

      <property tag="className"            value="Service"        />

      <property tag="ServiceName"          value="Houston"        />

      <property tag="Label"                value="Houston"        />

      <property tag="Description"          value="Houston Market" />

      <property tag="AdministrativeStatus" value="Managed"        />

      <property tag="ServiceVersion"       value=""               />

      </Service>

      <CI>

      <property tag="eventType"            value="AddCI" />

      <property tag="MdrElementID"         value="0x79094cf" />

      <property tag="MdrProductInstance"   value="Spectrum-spechou-po-2p.sys.comcast.net" />

      <property tag="MdrProduct"           value="CA:00005" />

      <property tag="className"            value="Switch"    />

      </CI>

      <Relationship>

      <property tag="eventType" value="AddRelationship"       />

      <property tag="SourceMdrElementID" value="Houston"      />

      <property tag="TargetMdrElementID" value="0x79094cf" />

      <property tag="ScopeMdrElementID"  value="Houston"      />

      <property tag="Semantic"           value="Aggregate"    />

      <property tag="className"          value="Relationship" />

      </Relationship>

    </Services>



  • 7.  Re: Add existing CIs to a Service via cmd-line

    Posted Jan 08, 2016 10:28 AM

    Hi Bill,

     

    as explained in my previous message (Best Practice):

    you should create the CIs via the Universal Connector (e.g. GCEventAddCmd.bat) by using your own conventions for the MdrElementID.

    Then you can link these CIs to Services.

     

    All other methods of cross-referencing CIs from a different connector are not supported.

    Even if you get them to work somehow, it is not the way SOI is designed and can cause unexpected effects.

     

    MichaelBoehm



  • 8.  Re: Add existing CIs to a Service via cmd-line

    Posted Jan 13, 2016 03:37 PM

    I think that I am finally understanding the process.  In general, this makes complete sense, thank you Mr. Hahn. 

     

    First I have to use the Universal Connector (GCEventAddCmd.bat) to create the CI's that will be associated with the services.  These CI's that are created by the Universal Connector should have specific correlation properties defined (From USM view, one or more of the mandatory properties).  The correlation properties are very important so that the CI's that I create are correlated with the ones that they match up with from the various connectors, such as my models from the Spectrum connectors.  To get the primary correlation properties, go into the USM View, then down at the bottom in the Create a new CI section, choose your time, and click create.  This will show you the primary mandatory properties.  From what I understand you don't need all these, but at least one needs to be filled out for correlation to take place.

     

    The CI's get created with the <Events> xml.  Example:

    <Events>

        <Event>

            <property tag="eventType" value="AddCIEvent" />

            <property tag="MdrElementID" value="ABCDTXHX00W" />

            <property tag="className" value="Switch" />

            <property tag="Label" value="abcdtxhx00w.houston.somewhere.net" />

            <property tag="Description" value="Joes cpe" />

            <property tag="AdministrativeStatus" value="Managed" />

            <property tag="PrimaryDnsName" value="abcdtxhx00w.houston.somewhere.net" />

            <property tag="ComputerName" value="ABCDTXHX00W" />

            <property tag="SysName" value="abcdtxhx00w.houston" />

        </Event>

        <Event>

            <property tag="eventType" value="AddCIEvent" />

            <property tag="MdrElementID" value="ABCDTXHX00W_1" />

            <property tag="className" value="Port" />

            <property tag="Label" value="ABCDTXHX00W_1" />

            <property tag="Description" value="Joes cpe 10/100/G 1" />

            <property tag="AdministrativeStatus" value="Managed" />

            <property tag="IfIndex" value="1" />

            <property tag="PortID" value="1" />

            <property tag="IfType" value="ethernetCsmacd" />

            <property tag="DeviceMacAddress" value="00-23-8a-3d-cf-42" />

            <property tag="DeviceDnsName" value="abcdtxhx00w.houston.somewhere.net" />

        </Event>

     

    Then with the Universal Connector I perform the service mapping. Example:

    <Services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

        <Service>

            <property tag="eventType"            value="AddService"     />

            <property tag="MdrElementID"         value="Houston"        />

            <property tag="className"            value="Service"        />

            <property tag="ServiceName"          value="Houston"        />

            <property tag="Label"                value="Houston"        />

            <property tag="Description"          value="Houston Market" />

            <property tag="AdministrativeStatus" value="Managed"        />

            <property tag="ServiceVersion"       value=""               />

        </Service>

        <CI>

            <property tag="eventType"            value="AddCI" />

            <property tag="MdrElementID"         value="ABCDTXHX00W" />

            <property tag="className"            value="Switch"    />

            <property tag="Label"                value="abcdtxhx00w.houston.somewhere.net" />

            <property tag="Description"          value="Joes cpe" />

            <property tag="AdministrativeStatus" value="Managed"  />

            <property tag="InstanceName"         value="ABCDTXHX00W" />

        </CI>

        <Relationship>

            <property tag="eventType" value="AddRelationship"       />

            <property tag="SourceMdrElementID" value="Houston"      />

            <property tag="TargetMdrElementID" value="ABCDTXHX00W"  />

            <property tag="ScopeMdrElementID"  value="Houston"      />

            <property tag="Semantic"           value="Aggregate"    />

            <property tag="className"          value="Relationship" />

        </Relationship>

    </Services>

     

     

    This service mapping, will use the CI's that I created above in with the Universal Connector.  Now supposedly, if all goes well, the data from my Spectrum and APM connectors will correlate to the CI's that I have created with the Universal Connector and populate alarms and information in my service view.

     

    So, this makes sense.  I create my own service and CI's through the Universal Connector, but in such a way that they correlate to data that will come across from the various connectors.



  • 9.  Re: Add existing CIs to a Service via cmd-line

    Posted Jan 14, 2016 09:33 AM

    Very nice summary of the process.

    To get information about mandatory properties, have a look here:

    https://communities.ca.com/thread/241691856

     

     

    MichaelBoehm



  • 10.  Re: Add existing CIs to a Service via cmd-line

    Posted Feb 05, 2016 01:44 PM

    In the solution that i am creating which takes a layered approach to offering services to customers, in almost every case the connector will have constructed the object ci far before any service model will be constructed.  In most cases monitoring starts with the device (network or server) in the cases of servers, has application specific monitoring layered on top.  It is typically only at this point in time that a customer is mature enough in their monitoring solution to be able to construct Service Models.  As such all of the objects that we would want to include in a service model already exist at the SOI level.  Is there a mechanism, via the universal connector, CLI or REST API to create a service and then add the identifies server names to that model.

     

    Thanks, Gregg



  • 11.  Re: Add existing CIs to a Service via cmd-line

    Posted Feb 09, 2016 03:18 AM

    Hi Gregg,

     

    as explained in my previous messages (Best Practice):

    you should create the CIs via the Universal Connector (e.g. GCEventAddCmd.bat), making sure they correlate to the existing CIs from different connectors.

    Then you can link these CIs to Services also via the Universal Connector.

     

    All other methods of cross-referencing CIs from a different connector are not supported.

    Even if you get them to work somehow, it is not the way SOI is designed and can cause unexpected effects.

     

    MichaelBoehm



  • 12.  Re: Add existing CIs to a Service via cmd-line

    Posted Feb 09, 2016 10:58 AM

    Morning Michael,

     

    thanks for the update here.  read through the process summarized higher up in this thread and believe that i understand how i would go about accomplishing things.  Just one question for you before i start down this path.  Can any of this be done via the Rest or WebServices APIs as this is the desired route for numerous reasons.  To date i have been able to add new alert queues, escalation policies and actions, etc

     

    Thanks, Gregg



  • 13.  Re: Add existing CIs to a Service via cmd-line

    Posted Feb 10, 2016 03:47 AM

    Hi Gregg,

     

    you can also use the Universal Connector Web Service interface to provide input to the Universal Connector.

    See here for further details: Universal Connector Programming Interface - CA Service Operations Insight - 4.0 - CA Technologies Documentation

     

    MichaelBoehm



  • 14.  Re: Add existing CIs to a Service via cmd-line

    Posted Apr 20, 2017 01:42 PM

    Its possible to add in the group?



  • 15.  Re: Add existing CIs to a Service via cmd-line

    Posted Apr 24, 2017 02:34 AM

    Yes, you can add a group. For example of how to do it, refer to the files uploaded to the following url:

    How to add SOI Services with inclusions using data from Excel



  • 16.  Re: Add existing CIs to a Service via cmd-line

    Posted Apr 27, 2017 04:04 PM

    Thanks Madelaine, 

     

    Its Working.