Monitoring Fedora Core 4 with SCOM 2007 R2 – Part 2

earthThe creation of the troja management pack is easy. You only have to add to discovery tasks which create the RHEL4 computer object and the operating system object and fills them with some basic informations.

In the authoring console you have the add a reference to the Microsoft.Linux.RHEL.4 MP because we will use the RHEL4 Computer object.

This is the XML code of the first discovery task:

<Discovery ID=”Technidata.Fedora.4.Computer.Discovery” Enabled=”true” Target=”RedHat!Microsoft.Linux.RedHat.Computer” ConfirmDelivery=”false” Remotable=”true” Priority=”Normal”>
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID=”RHEL4!Microsoft.Linux.RHEL.4.Computer” />
</DiscoveryTypes>
<DataSource ID=”DS” TypeID=”Unix!Microsoft.Unix.WSMan.TimedEnumerate.Filtered.MatchesRegularExpression.DiscoveryData”>
<TargetSystem>$Target/Property[Type=”Unix!Microsoft.Unix.Computer”]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem?__cimnamespace=root/scx</Uri>
<Filter />
<SplitItems>false</SplitItems>
<Interval>300</Interval>
<SyncTime />
<FilterProperty>//*[local-name()=”Caption”]</FilterProperty>
<FilterValue>.*Fedora Core release 4.*</FilterValue>
<ClassId>$MPElement[Name=”RHEL4!Microsoft.Linux.RHEL.4.Computer”]$</ClassId>
<InstanceSettings>
<Settings>
<Setting>
<Name>$MPElement[Name=”Unix!Microsoft.Unix.Computer”]/PrincipalName$</Name>
<Value>$Target/Property[Type=”Unix!Microsoft.Unix.Computer”]/PrincipalName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name=”Unix!Microsoft.Unix.Computer”]/TimeZoneOffset$</Name>
<Value>$Data///*[local-name()=”CurrentTimeZone”]$</Value>
</Setting>
</Settings>
</InstanceSettings>
</DataSource>
</Discovery>

As you can see it is mainly copied from the RHEL4 MP. Only the filer value has changed.
The second discovery does more or less the same but creates an OS object:

<Discovery ID=”Technidata.Fedora.4.OperatingSystem.Discovery” Enabled=”true” Target=”RHEL4!Microsoft.Linux.RHEL.4.Computer” ConfirmDelivery=”false” Remotable=”true” Priority=”Normal”>
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID=”RHEL4!Microsoft.Linux.RHEL.4.OperatingSystem” />
</DiscoveryTypes>
<DataSource ID=”DS” TypeID=”Unix!Microsoft.Unix.WSMan.TimedEnumerate.Filtered.MatchesRegularExpression.DiscoveryData”>
<TargetSystem>$Target/Property[Type=”Unix!Microsoft.Unix.Computer”]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem?__cimnamespace=root/scx</Uri>
<Filter />
<SplitItems>false</SplitItems>
<Interval>300</Interval>
<SyncTime />
<FilterProperty>//*[local-name()=”Caption”]</FilterProperty>
<FilterValue>.*Fedora Core release 4.*</FilterValue>
<ClassId>$MPElement[Name=”RHEL4!Microsoft.Linux.RHEL.4.OperatingSystem”]$</ClassId>
<InstanceSettings>
<Settings>
<Setting>
<Name>$MPElement[Name=”Unix!Microsoft.Unix.Computer”]/PrincipalName$</Name>
<Value>$Target/Property[Type=”Unix!Microsoft.Unix.Computer”]/PrincipalName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name=”Unix!Microsoft.Unix.OperatingSystem”]/OSVersion$</Name>
<Value>$Data///*[local-name()=”Version”]$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name=”Unix!Microsoft.Unix.OperatingSystem”]/OSVersionDisplayName$</Name>
<Value>$Data///*[local-name()=”Caption”]$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name=”System!System.Entity”]/DisplayName$</Name>
<Value>$Data///*[local-name()=”Caption”]$</Value>
</Setting>
</Settings>
</InstanceSettings>
</DataSource>
</Discovery>
</Discoveries>

If you save and imports this management pack into SCOM the Fedora system will be discovered as a RHEL4 system and the normal RHEL4 MP will do the monitoring for you.

This entry was posted in English, Operations Manager, System Center and tagged , , , , , , , . Bookmark the permalink.

5 Responses to Monitoring Fedora Core 4 with SCOM 2007 R2 – Part 2

  1. David Komanek says:

    Dear Markus, thanks for the guide.

    I was able to export management packs (newer fedora versions, so I used Red Hat 5 as a template), I am able to open them in the authoring console with all their dependencies. But I am not sure how to add the two discoveries you published in the management packs, because there doesn’t seem to be a way to place the xml to the the authoring console.

    Should I just edit the xml files, remove all the present discoveries and add the two new to both xml files and then rename the files and import them to the SCOM console ? Or should I do it some different way ?

    Thanks,

    David

  2. markus says:

    @David Komanek
    Hi David,
    I have created a part 3 of this post. I hope it answers your questions. If not just ask again

    You’re welcome

    Markus

  3. David Komanek says:

    Hi Markus,

    thank you very much for the third part. It is much more clearer to me, but I still have issues. I am trying to derive the new MP from RHEL.5, because I suppose the the newer Fedora versions are based on it. Everything goes well until I try to save the first discovery. It claims following error:

    : Verification failed with [1] errors:
    ——————————————————-
    Error 1:
    : Failed to verify Discovery [PrFUK.Fedora.Computer.RHEL5.Based.Discovery]
    Failed to verify referenced module : ID=verzeOSInvalid configuration specified for Module [verzeOS]Cannot find MPElement: RHEL5!Microsoft.Linux.RHEL.5.Computer specified in expression: $MPElement[Name=”RHEL5!Microsoft.Linux.RHEL.5.Computer”]$Cannot resolve identifier [RHEL5!Microsoft.Linux.RHEL.5.Computer] in the context of ManagementPack [Fedora]. Unknown alias [RHEL5]
    ——————————————————-

    Failed to verify Discovery [PrFUK.Fedora.Computer.RHEL5.Based.Discovery]Failed to verify referenced module : ID=verzeOSInvalid configuration specified for Module [verzeOS]Cannot find MPElement: RHEL5!Microsoft.Linux.RHEL.5.Computer specified in expression: $MPElement[Name=”RHEL5!Microsoft.Linux.RHEL.5.Computer”]$Cannot resolve identifier [RHEL5!Microsoft.Linux.RHEL.5.Computer] in the context of ManagementPack [Fedora]. Unknown alias [RHEL5]
    : Failed to verify Discovery [PrFUK.Fedora.Computer.RHEL5.Based.Discovery]
    Failed to verify referenced module : ID=verzeOSInvalid configuration specified for Module [verzeOS]Cannot find MPElement: RHEL5!Microsoft.Linux.RHEL.5.Computer specified in expression: $MPElement[Name=”RHEL5!Microsoft.Linux.RHEL.5.Computer”]$Cannot resolve identifier [RHEL5!Microsoft.Linux.RHEL.5.Computer] in the context of ManagementPack [Fedora]. Unknown alias [RHEL5]
    : Failed to verify referenced module : ID=verzeOS
    Invalid configuration specified for Module [verzeOS]Cannot find MPElement: RHEL5!Microsoft.Linux.RHEL.5.Computer specified in expression: $MPElement[Name=”RHEL5!Microsoft.Linux.RHEL.5.Computer”]$Cannot resolve identifier [RHEL5!Microsoft.Linux.RHEL.5.Computer] in the context of ManagementPack [Fedora]. Unknown alias [RHEL5]
    : Invalid configuration specified for Module [verzeOS]
    Cannot find MPElement: RHEL5!Microsoft.Linux.RHEL.5.Computer specified in expression: $MPElement[Name=”RHEL5!Microsoft.Linux.RHEL.5.Computer”]$Cannot resolve identifier [RHEL5!Microsoft.Linux.RHEL.5.Computer] in the context of ManagementPack [Fedora]. Unknown alias [RHEL5]
    : Cannot find MPElement: RHEL5!Microsoft.Linux.RHEL.5.Computer specified in expression: $MPElement[Name=”RHEL5!Microsoft.Linux.RHEL.5.Computer”]$
    Cannot resolve identifier [RHEL5!Microsoft.Linux.RHEL.5.Computer] in the context of ManagementPack [Fedora]. Unknown alias [RHEL5]
    : Cannot resolve identifier [RHEL5!Microsoft.Linux.RHEL.5.Computer] in the context of ManagementPack [Fedora]. Unknown alias [RHEL5]

    My XML file for the first discovery follows:

    $Target/Property[Type=”Unix!Microsoft.Unix.Computer”]/NetworkName$
    http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem?__cimnamespace=root/scx

    false
    300

    //*[local-name()=”Caption”]
    .*Fedora release*
    $MPElement[Name=”RHEL5!Microsoft.Linux.RHEL.5.Computer”]$

    $MPElement[Name=”Unix!Microsoft.Unix.Computer”]/PrincipalName$
    $Target/Property[Type=”Unix!Microsoft.Unix.Computer”]/PrincipalName$

    $MPElement[Name=”Unix!Microsoft.Unix.Computer”]/TimeZoneOffset$
    $Data///*[local-name()=”CurrentTimeZone”]$

    Do you think it is enough information to tell how I broke it ?

    Thanks in advance again.

  4. David Komanek says:

    Hm, the xml is not well displayed here, but the only changes I did in it are these:

    .*Fedora release.* as a FilterValue
    RHEL5!Microsoft.Linux.RHEL.5.Computer as part of ClassId

  5. markus says:

    @David Komanek
    Hi,
    I think the problem is a wrong alias in the references of the new management pack: ” Unknown alias [RHEL5]”. Have you add a reference to the Red Had 5 MP and what alias did you set?

    If you want you can send a screenshot or the mp to the email address in the impressum.

    Good luck

    Markus

Leave a Reply to David Komanek Cancel reply