System Center Operations Manager 2012 Monitoring Linux CentOS

操作步骤:

  1. 部署SCOM 2012 环境,安装CentOS 5.6 OS
  1. 下载Linux 相关MP 及 CentOS MP, 导入MP到SCOM 2012
  2. 配置SCOM 2012 ,创建SCOM 运行方式账号
  1. 安装代理到CENTOS
  1. 将CENTOS 证书复制到SCOM2012, 并通过SCOM 签名再导入到CENTOS
  1. 检查监控

一、 部署SCOM 2012 环境, 安装CENTOS

clip_p_w_picpath001

1. 部署SCOM 2012 测试环境, 将SCOM所有角色及DB 安装在同一台服务器(生产环境建议安装分布式),详细安装步骤请参考

"Operation Manager 2012 部署"

2.

  1. 下载MP http://scxcommunity.codeplex.com/SourceControl/list/changesets
    1. http://scxmpcentos56.codeplex.com/releases

http://scxcommunity.codeplex.com/SourceControl/list/patches

clip_p_w_picpath002

解压后查看MPS\ 总共有5个文件,只用到以下两个

clip_p_w_picpath003

Microsoft.Linux.CentOS.Library.xml 可以直接导入成功

Microsoft.Linux.CentOS.5.xml 导入会遇到问题,以下方法可以解决

  1. 将Microsoft.Linux.CentOS.Library.xml 封装为MP

D:\CentOS&SCOM2012>D:\soft\SCOM2012_Installation\cn_system_center_2012_operation

s_manager_x86_and_x64_dvd_844026\SupportTools\AMD64\MPSeal.exe Microsoft.Linux.C

entOS.Library.xml /keyfile pairkey.snk /company "cubecore"

正在尝试密封 ManagementPack 文件: Microsoft.Linux.CentOS.Library.xml

: Verification failed with 6 errors:

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

Error 1:

Found error in 2|Microsoft.Linux.CentOS.Library|6.1.7000.273|Microsoft.Linux.Cen

tOS.Library|| with message:

Could not load management pack [ID=Microsoft.SystemCenter.InstanceGroup.Library,

KeyToken=31bf3856ad364e35, Version=6.1.7221.0]. The management pack was not fou

nd in the store.

Microsoft.EnterpriseManagement.Common.ObjectNotFoundException: An object of clas

s ManagementPack with name Microsoft.SystemCenter.InstanceGroup.Library was not

found.

在 Microsoft.EnterpriseManagement.AggregateStoreManagementPackManagement.GetM

anagementPack(String name, String keytoken, Version version)

在 Microsoft.EnterpriseManagement.Configuration.ManagementPackReference.GetMa

nagementPack()

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

Error 2:

Found error in 2|Microsoft.Linux.CentOS.Library|6.1.7000.273|Microsoft.Linux.Cen

tOS.Library|| with message:

Could not load management pack [ID=Microsoft.Unix.Library, KeyToken=31bf3856ad36

4e35, Version=6.1.7000.256]. The management pack was not found in the store.

Microsoft.EnterpriseManagement.Common.ObjectNotFoundException: An object of clas

s ManagementPack with name Microsoft.Unix.Library was not found.

在 Microsoft.EnterpriseManagement.AggregateStoreManagementPackManagement.GetM

anagementPack(String name, String keytoken, Version version)

在 Microsoft.EnterpriseManagement.Configuration.ManagementPackReference.GetMa

nagementPack()

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

Error 3:

Found error in 2|Microsoft.Linux.CentOS.Library|6.1.7000.273|Microsoft.Linux.Cen

tOS.Library|| with message:

Could not load management pack [ID=System.Library, KeyToken=31bf3856ad364e35, Ve

rsion=6.1.7221.0]. The management pack was not found in the store.

Microsoft.EnterpriseManagement.Common.ObjectNotFoundException: An object of clas

s ManagementPack with name System.Library was not found.

在 Microsoft.EnterpriseManagement.AggregateStoreManagementPackManagement.GetM

anagementPack(String name, String keytoken, Version version)

在 Microsoft.EnterpriseManagement.Configuration.ManagementPackReference.GetMa

nagementPack()

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

Error 4:

Found error in 2|Microsoft.Linux.CentOS.Library|6.1.7000.273|Microsoft.Linux.Cen

tOS.Library|| with message:

Could not load management pack [ID=System.Health.Library, KeyToken=31bf3856ad364

e35, Version=6.1.7221.0]. The management pack was not found in the store.

Microsoft.EnterpriseManagement.Common.ObjectNotFoundException: An object of clas

s ManagementPack with name System.Health.Library was not found.

在 Microsoft.EnterpriseManagement.AggregateStoreManagementPackManagement.GetM

anagementPack(String name, String keytoken, Version version)

在 Microsoft.EnterpriseManagement.Configuration.ManagementPackReference.GetMa

nagementPack()

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

Error 5:

Found error in 2|Microsoft.Linux.CentOS.Library|6.1.7000.273|Microsoft.Linux.Cen

tOS.Library|| with message:

Could not load management pack [ID=Microsoft.Linux.Library, KeyToken=31bf3856ad3

64e35, Version=6.1.7000.273]. The management pack was not found in the store.

Microsoft.EnterpriseManagement.Common.ObjectNotFoundException: An object of clas

s ManagementPack with name Microsoft.Linux.Library was not found.

在 Microsoft.EnterpriseManagement.AggregateStoreManagementPackManagement.GetM

anagementPack(String name, String keytoken, Version version)

在 Microsoft.EnterpriseManagement.Configuration.ManagementPackReference.GetMa

nagementPack()

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

Error 6:

Found error in 2|Microsoft.Linux.CentOS.Library|6.1.7000.273|Microsoft.Linux.Cen

tOS.Library|| with message:

Could not load management pack [ID=Microsoft.SystemCenter.Library, KeyToken=31bf

3856ad364e35, Version=6.1.7221.0]. The management pack was not found in the stor

e.

Microsoft.EnterpriseManagement.Common.ObjectNotFoundException: An object of clas

s ManagementPack with name Microsoft.SystemCenter.Library was not found.

在 Microsoft.EnterpriseManagement.AggregateStoreManagementPackManagement.GetM

anagementPack(String name, String keytoken, Version version)

在 Microsoft.EnterpriseManagement.Configuration.ManagementPackReference.GetMa

nagementPack()

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

Could not load management pack [ID=Microsoft.SystemCenter.InstanceGroup.Library,

KeyToken=31bf3856ad364e35, Version=6.1.7221.0]. The management pack was not fou

nd in the store.

在SCOM 安装包上可以找到

..\SCOM2012_Installation\cn_system_center_2012_operations_manager_x86_and_x64_dvd_844026\ManagementPacks

clip_p_w_picpath004

封装为 Microsoft.Linux.CentOS.Library.mp导入到SCOM 2012

clip_p_w_picpath005

clip_p_w_picpath006

  1. 安装SN.exe工具,并修改Microsoft.Linux.CentOS.5.xml

Location of Strong Name Tool (Sn.exe)

In case you aren't using the "Visual Studio Command Prompt" (Start >> Microsoft Visual Studio 2010 >> Visual Studio Tools >> Visual Studio Command Prompt (2010)) you can locate sn.exe at %ProgramFiles%\Microsoft SDKs\Windows\v7.0A\bin\sn.exe

源文档 <http://msdn.microsoft.com/en-us/library/k5b5tt23(VS.80).aspx>

3.1 使用SN工具生成snk-------------------------------------------------------------------------------------------------------------------

D:\CentOS&SCOM2012>sn.exe -k "d:\CentOS&SCOM2012\pairkey.snk"

Microsoft (R) .NET Framework Strong Name Utility Version 3.5.21022.8

Copyright (c) Microsoft Corporation. All rights reserved.

Key pair written to d:\CentOS&SCOM2012\pairkey.snk

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

D:\CentOS&SCOM2012>sn.exe -T CentOSMPs\Microsoft.Linux.CentOS.Library.mp

Microsoft (R) .NET Framework Strong Name Utility Version 3.5.21022.8

Copyright (c) Microsoft Corporation. All rights reserved.

Public key token is 695daaca381bca7e

3.2 修改Microsoft.Linux.CentOS.5.xml 内容

a. 将刚刚生成的Public key 规换原始的KEY

clip_p_w_picpath007

b. SCOM 2012 自带LINUX 各种代理安装文件,但没有CENTOS 的代理,所以需使用Redhat 的安装包

将scx-1.3.0-206.rhel.5.x64.rpm 拷贝 并重命名为scx-1.3.0-206.CentOS.5.x86_64.rpm

clip_p_w_picpath008

编辑Microsoft.Linux.CentOS.5.xml

b. 按代理安装文件的名称修改内容

第一处

clip_p_w_picpath009

第二处

clip_p_w_picpath010

修改完成后导入到SCOM

clip_p_w_picpath011

导入成功后应显示为

clip_p_w_picpath012

  1. 安装代理到CENTOS

CentOS的1270、22端口要开放。

CentOS要可以访问OpsMgr服务器的5723端口

方法1.

clip_p_w_picpath013

clip_p_w_picpath014

clip_p_w_picpath015

clip_p_w_picpath016

clip_p_w_picpath017

clip_p_w_picpath018

手机安装代理将scx-1.3.0-206.CentOS.5.x86_64.rpm 拷到CENTOS 主机后

clip_p_w_picpath019

clip_p_w_picpath020

clip_p_w_picpath021

在CENTOS 主机查看证书

clip_p_w_picpath022

在SCOM 2012 主机操作

C:\Program Files\System Center 2012\Operations Manager\Server\scxcertconfig.exe -sign D:\CentOS&SCOM2012\CentOS_Cert\scx-host-SCOM2012-TEST-OS5.6.pem D:\CentOS&SCOM2012\CentOS_Cert\scx-host-SCOM2012-TEST-OS5.6new.pem

将证书scx-host-SCOM2012-TEST-OS5.6new.pem拷到CENTOS 主机命名为scx-host-SCOM2012-TEST-OS5.6.pem

并重启

scxadmin –restart

以下是我做的所有操作,

参考文档:

SCOM 2012 Linux Monitoring SUSE 11.1

源文档 <http://blog.scomfaq.ch/2012/03/15/scom-2012-linux-monitoring-lab-part-1-setup-suse-11-1/>

http://blog.scomfaq.ch/2012/03/15/scom-2012-linux-monitoring-lab-part-1-setup-suse-11-1/

http://blogs.msdn.com/b/scxplat/archive/tags/centos/

clip_p_w_picpath023