locked
Management pack will not import RRS feed

  • Question

  • Getting this error when trying to import a custom management pack, and haven't been able to figure it out.

    Ping Management Pack could not be imported.
    
    If any management packs in the Import list are dependent on this management pack, the installation of the dependent management packs will fail.
    
    Database error. MPInfra_p_ManagementPackInstall failed with exception: 
    Database error. MPInfra_p_ManagementPackInstall failed with exception: 
    The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Module_ManagedType". The conflict occurred in database "OperationsManager", table "dbo.ManagedType", column 'ManagedTypeId'.
    Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 2, current count = 0.
    The statement has been terminated.

    It only fails if I include a specific collection rule. If I remove the collection rule from the MP, import succeeds.

    There is no other collection rule with the same ID. Below is the rule XML.

          <Rule ID="Ping.WmiPingStatus.Performance.Collection" ConfirmDelivery="false" DiscardLevel="100" Enabled="true" Priority="Normal" Remotable="false" Target="Ping.Target.Class">
            <Category>PerformanceCollection</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="Ping.WmiPingStatus.DataSource">
                <Interval>$Target/Property[Type="Ping.Target.Class"]/PingInterval$</Interval>
                <Target>$Target/Property[Type="Ping.Target.Class"]/Target$</Target>
              </DataSource>
            </DataSources>
            <ConditionDetection ID="PerfMapper" TypeID="Perf!System.Performance.DataGenericMapper">
              <ObjectName>Ping</ObjectName>
              <CounterName>Response Time (ms)</CounterName>
              <InstanceName>$Target/Property[Type="Ping.Target.Class"]/Target$</InstanceName>
              <Value>$Data/Property[@Name='ResponseTime']$</Value>
            </ConditionDetection>
            <WriteActions>
              <WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData" />
              <WriteAction ID="WriteToDW" TypeID="MSDL!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" />
            </WriteActions>
          </Rule>

    Any thoughts on this one?


    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

    Sunday, March 17, 2013 7:32 PM

Answers

  • Still having the same issue. Seems to me there is a problem when implementing a collection rule with a composite data source that includes Microsoft.Windows.WmiProvider or Microsoft.Windows.WmiProbe modules. I tried dicing up the workflows in several different ways. The workflows simulate fine, but the MP will not import.

    The only way I can get the MP to import is if I implement the Microsoft.Windows.WmiProvider directly on the rule data source, which isn't preferred because I'm sharing the composite data source module already with several other workflows. I would like to continue sharing the custom provider amongst all monitoring and collection workflows, but this just doesn't seem possible at the moment.

    Seems like a bug in the MP import stored procedure, but don't have enough time to profile and investigate. Hopefully someone from Microsoft can chime in.


    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

    Tuesday, March 26, 2013 6:14 PM
  • I had the same problem. It appears that "Target" is a reserved word. 
    You use it here:

    <InstanceName>$Target/Property[Type="Ping.Target.Class"]/Target$</InstanceName>

    Change "Target" to "TargetServer" and this should work. 

    Hugs,

    Tyson


    Wednesday, March 25, 2015 6:27 PM

All replies

  • Hi Jonathan,

    You can try to import the Mp using Install-ManagementPack –filepath <path of the file> from scom powershell. The output will give exact issue in importing the MP.

    http://technet.microsoft.com/en-us/library/gg132288.aspx

    Regards


    sridhar v

    Monday, March 18, 2013 6:41 AM
  • Sridhar,

    I have already tried importing using the command shell, and unfortunately it offers very little information about the failure. What is posted here offers more context.


    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

    Monday, March 18, 2013 2:34 PM
  • Still having the same issue. Seems to me there is a problem when implementing a collection rule with a composite data source that includes Microsoft.Windows.WmiProvider or Microsoft.Windows.WmiProbe modules. I tried dicing up the workflows in several different ways. The workflows simulate fine, but the MP will not import.

    The only way I can get the MP to import is if I implement the Microsoft.Windows.WmiProvider directly on the rule data source, which isn't preferred because I'm sharing the composite data source module already with several other workflows. I would like to continue sharing the custom provider amongst all monitoring and collection workflows, but this just doesn't seem possible at the moment.

    Seems like a bug in the MP import stored procedure, but don't have enough time to profile and investigate. Hopefully someone from Microsoft can chime in.


    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

    Tuesday, March 26, 2013 6:14 PM
  • Hi Jonathan,

    can you share the output of the Mp load using PowerShell.

    Regards


    sridhar v

    Monday, April 15, 2013 1:22 AM
  • I found a workaround and marked as answer. I'd rather not pursue this issue further. Thanks.

    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

    Monday, April 15, 2013 5:06 AM
  • I had the same problem. It appears that "Target" is a reserved word. 
    You use it here:

    <InstanceName>$Target/Property[Type="Ping.Target.Class"]/Target$</InstanceName>

    Change "Target" to "TargetServer" and this should work. 

    Hugs,

    Tyson


    Wednesday, March 25, 2015 6:27 PM
  • That sounds like an answer. Feeling the love :)

    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

    Wednesday, March 25, 2015 8:38 PM
  • I know this is an old post. But I have the EXACT same error while importing a SCOM Management Pack. Now the difference is, my pack is already active in SCOM.  So back in the times I had been able to import it, but not anymore.

    Now you could think that it's the update that I am trying to do, that's causing this error. BUT: When I try to import the exact same MP as the one that is active right now, into a brand new SCOM environment, I get the same error.

    I am not using the word Target anywhere.


    Thursday, September 21, 2017 12:33 PM