Service Operations Insight

 View Only
  • 1.  Can't import Database Instance from CMDB connector

    Posted Dec 22, 2016 03:58 PM

    Hi everyone;

     

    i'm having trouble importing a Database Instance CI from CMDB to SOI through the connector. I get this error in the invalid-ci log in SOI server, and the CI doesn't get created. I tried reading the documentation I could find about importing this class but can't get to solve the issue:

     

    2016-12-22 17:23:19,826 INFO [Source=CA:00020_SDserver.domain.local@SDserver_CatalystConnector, Thread=JMS SDserver_CatalystConnector] InvalidCIs - USM Validation failed: com.ca.ssa.sor.logicserver.USMDataValidationException: org.xml.sax.SAXParseException; lineNumber: 28; columnNumber: 26; cvc-complex-type.2.4.a: Invalid content was found starting with element 'usm-core:DBServerType'. One of '{"http://ns.ca.com/2009/07/usm-core":DBInstanceName}' is expected.
    {ClassName=DatabaseInstance, ConnectorConfigMdrProdInstance=SDserver.domain.local, ConnectorConfigMdrProduct=CA:00020, CreationTimestamp=2016-12-21T11:30:40-03:00, CreationUserName=MyUser, DBServerType=Unknown, DeviceDnsName=DBSERVER01, InstanceName=Unknown:INSTANCENAME01, IsInMaintenance=false, Label=INSTANCENAME01:DBSERVER01, LastModActivity=Update, LastModTimestamp=2016-12-22T13:22:48-03:00, LastModUserName=MyUser, MdrElementID=nr:9fc17d5d40e1b8448a3343f9946c91

     

    The Type filed in the CI attributes in SD is set to OracleServer which should be a valid one; however, it doesn't get created in SOI. 

     

    Thanks in advance for any help!



  • 2.  Re: Can't import Database Instance from CMDB connector
    Best Answer

    Posted Dec 23, 2016 01:57 AM

    Hi,

    this sounds like the DBInstanceName property is not defined during the import from the CMDB.

    This property is a mandatory field; if it is missing, the CI will not be created.

    You have to trace further (RAW data and connector policy) to figure out where this property is supposed to be filled.

    Most probable you have to add a value in any of the CI's properties in the CMDB in order for the connector to pick up the value.

     

     

    MichaelBoehm



  • 3.  Re: Can't import Database Instance from CMDB connector

    Posted Dec 23, 2016 09:07 AM

    Michael thank you for your help. I can't figure out where in SD CI Editing screen I can find the attribute that maps to DBInstance Name, if I take a look at the policy, it shows this:

     


    <EventClass extends="RunningSoftware" name="DatabaseInstance">
    <Normalize>
    <Field input="class" output="DBServerType" type="map">
    <mapentry mapin="DB2" mapout="DB2Server"/>
    <mapentry mapin="SQL" mapout="MSSQLServer"/>
    <mapentry mapin="Oracle" mapout="OracleServer"/>
    <mapentry mapin="Sybase" mapout="Sybase"/>
    <mapentry mapin=".*" mapout="Unknown"/>
    </Field>
    </Normalize>
    <Format>
    <Field format="" input="" output="DBInstanceName"/>
    <!--<Field conditional="system_name" output="DBInstanceName" format="{0}" input="system_name" />-->
    <Field conditional="asset_num" format="{0}" input="asset_num" output="DBInstanceName"/>
    <Field conditional="system_name" format="{0}" input="system_name" output="ProcessDistinguishingID"/>
    <Field conditional="db_id" format="{0}" input="db_id" output="ProcessDistinguishingID"/>
    </Format>
    </EventClass>

    I assume the "Input" part should be the attribute I have in the CI edit dialogue in SD?

     

    Thanks!



  • 4.  Re: Can't import Database Instance from CMDB connector

    Posted Dec 23, 2016 09:23 AM

    Yes, you are right about the Input.

    Normally the fields are called with the same name as in the underlying Domain Manage, e.g. the CMDB.

    Here you would have to look for a filed called "asset_num", possibly "Asset Number" or something similar.

    I don't have access to a CMDB right now, so cannot clarify that exactly.

    The policy also shows an alternative (commented out) using the system_name as DBInstanceName.  if this makes more sense to you, you can activate that line instead of the one with asset_num.

    If you look at the RAW data, you might also see something else that might make sense as DBInstanceName and you can map that attribute.

    If you modify something in the policy, you should also keep the attribute name in the conditional part identical.  This makes sure that the value is only used if it is set.

     

    The first line in the policy setting the DBInstanceName is weird: it just blanks out the attribute, e.g. if the second line, using asset_num, is not evaluated as true, the variable is blank and thus the CI will not be created.

     

    And after policy modifications you have to restart the Connector.

     

    MichaelBoehm



  • 5.  Re: Can't import Database Instance from CMDB connector

    Posted Dec 23, 2016 02:34 PM

    Michael, thanks a lot for your help, I'm trying to test this by changing the input to the "Type" attribute. I modified the policy file and ended up like this:

     

    <EventClass extends="ENTITY_NR" name="Database">
    <Normalize>
    <Field input="mdrDeviceMacAddress" output="DeviceMacAddress" outputtype="ref" type="map">
    <mapentry mapin="^[0-9A-Fa-f]{2}[-][0-9A-Fa-f]{2}[-][0-9A-Fa-f]{2}[-][0-9A-Fa-f]{2}[-][0-9A-Fa-f]{2}[-][0-9A-Fa-f]{2}$" mapout="mdrDeviceMacAddress"/>
    <mapentry mapin=".*" mapout=""/>
    </Field>
    <Field input="mdrDeviceIPAddress" output="DeviceIPV6Address" outputtype="ref" type="map">
    <mapentry mapin="^([0-9,A-F,a-f]){1,4}((:)([0-9,A-F,a-f]){1,4}){7}$" mapout="mdrDeviceIPAddress"/>
    <mapentry mapin=".*" mapout=""/>
    </Field>
    <Field input="mdrDeviceIPAddress" output="DeviceIPV4Address" outputtype="ref" type="map">
    <mapentry mapin="^\b(?:\d{1,3}\.){3}\d{1,3}\b$" mapout="mdrDeviceIPAddress"/>
    <mapentry mapin=".*" mapout=""/>
    </Field>
    </Normalize>
    <Format>
    <Field conditional="DeviceMacAddress" format="{0}" input="{replace([DeviceMacAddress,:,-])}" output="DeviceMacAddress"/>
    <Field conditional="mdrDevicePhysSerialNumber" format="{0}" input="mdrDevicePhysSerialNumber" output="DevicePhysSerialNumber"/>
    <Field conditional="mdrDeviceDnsName" format="{0}" input="mdrDeviceDnsName" output="DeviceDnsName"/>
    <Field conditional="server" format="{0}" input="server" output="DeviceDnsName"/>
    <Field conditional="version" format="{0}" input="version" output="Version"/>
    <Field format="{0}" input="name" output="DatabaseName"/>
    <Field format="{0}" input="type" output="DBInstanceName"/>
    </Format>
    </EventClass>

     

    ----------------------------

     

    <EventClass extends="RunningSoftware" name="DatabaseInstance">
    <Normalize>
    <Field input="class" output="DBServerType" type="map">
    <mapentry mapin="DB2" mapout="DB2Server"/>
    <mapentry mapin="SQL" mapout="MSSQLServer"/>
    <mapentry mapin="Oracle" mapout="OracleServer"/>
    <mapentry mapin="Sybase" mapout="Sybase"/>
    <mapentry mapin=".*" mapout="Unknown"/>
    </Field>
    </Normalize>
    <Format>
    <Field format="" input="" output="DBInstanceName"/>
    <Field conditional="type" output="DBInstanceName" format="{0}" input="system_name" />
    <!--<Field conditional="asset_num" format="{0}" input="asset_num" output="DBInstanceName"/>-->
    <!--<Field conditional="system_name" format="{0}" input="system_name" output="ProcessDistinguishingID"/>-->
    <!--<Field conditional="db_id" format="{0}" input="db_id" output="ProcessDistinguishingID"/>-->
    </Format>
    </EventClass>

     

    However I keep getting the error in the log. Anything else I should modify besides the xml file? What's odd is I don't have an "Asset Numer" attribute or anything like it for this class.

     

    Thanks again!



  • 6.  Re: Can't import Database Instance from CMDB connector

    Posted Dec 23, 2016 03:38 PM

    Michael;

     

    I solved the issue. the problem is that "Asset_Num" is named "Alternate CI ID" in SD. once I discovered that, I updated the attribute and it started working. Thanks a lot again!



  • 7.  Re: Can't import Database Instance from CMDB connector

    Broadcom Employee
    Posted Dec 23, 2016 05:51 AM

    Hi Francisco,

     

    If your queries are answered please mark the answer as correct so that it helps the community.