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.