`
taupo
  • 浏览: 29395 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

Sis intergration monitor

阅读更多
Step by Step description of our problem :


1. We import Measurements via SiteScope Logfile Integration to BAC :

Logfile looks like this :
30.03.2009;00:49:01;ATDEV1;MAINFRAME;100;MF-SLA3
30.03.2009;00:49:01;AIL1;MAINFRAME;100;MF-SLA3
30.03.2009;01:47:01;ATDEV1;MAINFRAME;80;MF-SLA3
30.03.2009;01:47:01;AIL1;MAINFRAME;80;MF-SLA3
30.03.2009;02:48:01;ATDEV1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;02:48:01;AIL1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;03:49:01;ATDEV1;MAINFRAME;100;MF-SLA3
30.03.2009;03:49:01;AIL1;MAINFRAME;100;MF-SLA3
30.03.2009;04:47:01;ATDEV1;MAINFRAME;80;MF-SLA3
30.03.2009;04:47:01;AIL1;MAINFRAME;80;MF-SLA3
30.03.2009;05:48:01;ATDEV1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;05:48:01;AIL1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;06:49:01;ATDEV1;MAINFRAME;100;MF-SLA3
30.03.2009;06:49:01;AIL1;MAINFRAME;100;MF-SLA3
30.03.2009;07:47:01;ATDEV1;MAINFRAME;80;MF-SLA3
30.03.2009;07:47:01;AIL1;MAINFRAME;80;MF-SLA3
30.03.2009;08:48:01;ATDEV1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;08:48:01;AIL1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;09:49:01;ATDEV1;MAINFRAME;100;MF-SLA3
30.03.2009;09:49:01;AIL1;MAINFRAME;100;MF-SLA3
30.03.2009;10:47:01;ATDEV1;MAINFRAME;80;MF-SLA3
30.03.2009;10:47:01;AIL1;MAINFRAME;80;MF-SLA3
30.03.2009;11:48:01;ATDEV1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;11:48:01;AIL1;MAINFRAME;66.666667;MF-SLA3
30.03.2009;12:49:01;ATDEV1;MAINFRAME;100;MF-SLA3
30.03.2009;12:49:01;AIL1;MAINFRAME;100;MF-SLA3





regular Expression : /(\d+\.\d+\.\d+\;\d+:\d+:\d+);(\w+);(\w+);(\d+|\d+\.\d+);(.*)/

Field mapping Script :

#####################################################################
# EMS Integration metrics config file           #
# Use this file to send metrics to Business Availability Center     #
#     #
# Refer to "Integration Monitor Configuration Files" in SiteScope   #
#  documentation for more information.          # 
#####################################################################

[$DEFAULT_PARAMETERS$]
# Time stamp in seconds since Jan 1st 1970 format.
# Use time() to get the sitescope host time or str_to_seconds() to read a value from the input event
TimeStamp:DOUBLE=str_to_seconds($group0, "dd.MM.yyyy;HH:mm:ss")

# Quailty in SiteScope terms: QUALITY_ERROR, QUALITY_WARNING, QUALITY_GOOD
#Quality:INT="1".equals($group3) ? QUALITY_GOOD : ("0".equals($group3) ? QUALITY_ERROR : QUALITY_GOOD)
Quality:INT=QUALITY_GOOD

# Logical monitor name (e.g. "Whatsup Gold log integration")
MonitorName=  "LPAR_Availability_" + $group1

# The name of the host / device that caused this event. If the name cannot be determined an IP address can be used instead
TargetName=$group1
target_name=$group1

# The status string of the monitor (e.g: "Log file read, 3 matches found")
MonitorState="LPAR Availability for " + $group1 + " = " + $group3 + " - " + $group4

subject="system"

# The monitor type (e.g. "Log Monitor", "CPU Monitor" )
MonitorType="LPAR"
data_source="LPAR"
host_type="lpar"
target_ip="127.0.0.1"
host_os="0.0.0.0.0.0"
host_description="LPAR"


# Measurement name (e.g. "matches per minute", "CPU Utilization")
MeasurementName(1)="LPAR_Availability"
# Value as double
Value(1):DOUBLE=$group3

############################################################
# In order to send more than one measurement    #
# per DB row / Log file line add pairs                     #
# MeasurementName(*)=                    #
# Value(*):DOUBLE=            #
# where * = 1,2,.,n            #
# ##########################################################


[allR]
$MATCH=true
$ACTION=TOPAZ_BUS_POST(ss_t)




Topology Script :



# Please write your script here...
import logger
import common_lib
import ems_lib
import system_lib


# Java imports
from java.lang import *
from java.util import *
from appilog.common.system.types.vectors import ObjectStateHolderVector
from appilog.common.system.types import ObjectStateHolder
from appilog.common.system.types import AttributeStateHolder

def DiscoveryMain(Framework):
global OSHVResult
OSHVResult = ObjectStateHolderVector()

monitorSource = Framework.getDestinationAttribute("data_source")

########## Custom

host_name = Framework.getDestinationAttribute("target_name")
short_host_name = Framework.getDestinationAttribute("target_name")
host_ip = Framework.getDestinationAttribute("target_ip")

default_domain = Framework.getDestinationAttribute("domain_name")
#host_domain = DomainScopeManager.getDomainByIp(host_ip, default_domain)
domainName = DomainScopeManager.getDomainByIp(host_ip, default_domain)

#host_type = Framework.getDestinationAttribute("host_type")
host_type = "lpar"

logger.info("OSHVector contains ", host_type)
logger.info("OSHVector contains ", host_ip)
logger.info("OSHVector contains XXXXXX", host_domain)
logger.info("OSHVector contains ", host_type)



hostType = "lpar"
logger.info("OSHVector contains", hostType)
host = ObjectStateHolder(hostType)

if host_ip != None:
host_id = host_ip + " " + domainName
else:
host_id = host_name + " " +  domainName

host.setAttribute("host_key", host_id)
host.setAttribute("host_dnsname", host_name)
host.setAttribute("host_hostname", short_host_name)

host.setBoolAttribute("root_enableageing", "true")
host.setBoolAttribute("host_iscomplete","true")


###### #host_os = Framework.getDestinationAttribute("host_os")
host_os = "0.0.0.0.0.0"
if host_os != None:
host.setAttribute("host_os", host_os)

#host_description = Framework.getDestinationAttribute("host_description")
host_description = "LPAR"
if host_description != None:
host.setAttribute("data_description", host_description)


# creating the host
OSHVResult.add(host)

########
# creating the ems monitor (that monitors the host)
#monitorId = String.valueOf(host.getAttribute("host_dnsname").getValue())
monitorId = Framework.getDestinationAttribute("target_name")
monitorHost = ems_lib.createEMSMonitor(monitorId, monitorSource, "lpar")
OSHVResult.add(monitorHost)

# connecting the ems monitor to the host
linkHostMonitor = common_lib.createAgingLink("monitored_by", host, monitorHost)
OSHVResult.add(linkHostMonitor)

monitoredCIType = String.valueOf(monitorHost.getAttribute("monitored_ci_type").getValue())

Framework.setUserObject("result_object", monitoredCIType)

return OSHVResult

















In BAC SAM we see the data :


Measurement Name = LPAR_Availabilty











Cloned KPI : Availability LPAR (ID = 2006)


New Business Rule (cloned from : SiteScope Measurement Rule) with ID = 2003








<condition cmdb-class="sitescope_monitor">
    <property-condition name="monitor_type" operator="LIKE" value="%LPAR%"/>
    <property-condition name="managed_by" operator="EQ" value="Discovery:SiteScope"/>
</condition>

<task-config>
    <contextmenu id="ssMonitorMenu"/>
    <kpis-config>
        <kpi-config type="1">
            <rule type="4"/>
            <trinity-selector override-ci-selector="true">
                <CompositeSelector logicalOp="OR">
                    <CompositeSelector logicalOp="AND">
                        <Selector key="sampleType" op="EQ" type="String" value="ss_monitor_t"/>
                        <Selector key="u_iConnectionId" op="EQ"
                            type="Long" value="RefProp:monitor_id"/>
                        <Selector key="u_iSessionId" op="EQ" type="Long" value="RefProp:session_id"/>
                    </CompositeSelector>
                    <CompositeSelector logicalOp="AND">
                        <Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
                        <Selector key="u_iConnectionId" op="EQ"
                            type="Long" value="RefProp:monitor_id"/>
                        <Selector key="u_iSessionId" op="EQ" type="Long" value="RefProp:session_id"/>
                    </CompositeSelector>
                </CompositeSelector>
            </trinity-selector>
        </kpi-config>
        <kpi-config type="2006">
            <rule type="2003">
                <rule-parameter key="No data timeout" type="Long" value="86400"/>
            </rule>
            <trinity-selector>
                <CompositeSelector logicalOp="AND">
                    <Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
                    <Selector key="szCategoryName" op="EQ" type="String" value="lpar_availability"/>
                    <Selector key="u_iConnectionId" op="EQ" type="Long" value="RefProp:monitor_id"/>
                    <Selector key="u_iSessionId" op="EQ" type="Long" value="RefProp:session_id"/>
                </CompositeSelector>
            </trinity-selector>
        </kpi-config>
    </kpis-config>
</task-config>


2. Now we want to use these data also in SLM :

So, we created a CI based SLA :





Then we added the SiteScope Performance KPI to our SLA CIs ( in addition to the SiteScope Availability KPI, which was already there).


Business Rule = SiteScope Monitor Average Value



As Measurement Type we entered the Measurement Name = LPAR_Availability (see above),
which holds the required data.





In addition, we enabled the measurement type filtering, as mentioned in the docs :


Edit the XML File to Enable Measurement Type Filtering  
a. Open the following file: <Data Processing server root directory>\conf\ ble_offline_dssampletype_adapters.xml.
b. Within the XML file, find the following parent tag:
<DSSampleAdapter Type="legacy" SampleType="ss_t">.
Within this tag, add the following text after the line </FilteringFields>:
<SelectingFields>
    <Field Name="time_stamp"/>
    <Field Name="start_time"/>
    <Field Name="frequency"/>
    <Field Name="cfg_frequency"/>
    <Field Name="u_iSessionId "/>
    <Field Name="u_iMeasurementId"/>
    <Field Name="szCategoryName"/>
    <Field Name="u_iMonitorId"/>
    <Field Name="u_iTargetId"/>
    <Field Name="u_iConnectionId"/>
    <Field Name="u_iStatus"/>
    <Field Name="u_iCategoryId"/>
    <Field Name="u_iQuality"/>
    <Field Name="instance_id"/>
    <Field Name="u_iHasProperty"/>
    <Field Name="iErrCode"/>
    <Field Name="dValue"/>
    <Field Name="monitor_curr_quality"/>
</SelectingFields>
c. Save the edited XML file and restart the offline engine.





 SLA works fine


分享到:
评论

相关推荐

    intergration test by testing

    intergration test by testing 集成测试

    Intergration Service Practise <2>

    "Integration Service Practice &lt;2&gt;" 主要关注的是微软SQL Server中的Integration Services (SSIS) 技术,这是一个强大的数据集成和工作流平台,用于在不同数据源之间移动、转换和加载数据。SSIS广泛应用于ETL(提取...

    QT Visual Studio Intergration (4.X )算号器

    QT Visual Studio Integration是一款将Qt框架与Microsoft Visual Studio集成的开发工具,它允许开发者在Visual Studio环境中编写、构建和调试Qt应用程序。这个插件对于那些习惯使用Visual Studio界面但又需要利用Qt...

    TIA博途-积分运算-全局FB库文件-GF-intergration-Calculate.zip

    在“GF_intergration_Calculate”这个例子中,我们可以推断这是一个用于积分运算的全局FB库文件。GF可能代表“通用功能”(General Function),而“Integration”显然指的是积分运算,“Calculate”则表示这个FB是...

    录像08_FICO intergration1.exe

    录像08_FICO intergration1

    录像09_FICO intergration2,39分钟.exe

    录像09_FICO intergration2,39分钟

    blackberry intergration

    ### 黑莓集成开发环境详解 #### 一、概述 黑莓(BlackBerry)作为曾经全球知名的移动设备品牌,在智能手机发展初期占据着重要的市场份额。其不仅以安全性著称,更在企业级市场拥有广泛的应用场景。...

    Sample PLC Intergration with a Mold Machine.rar

    《AB PLC与模具机的集成应用深度解析》 在工业自动化领域,PLC(Programmable Logic Controller)扮演着至关重要的角色,而Allen Bradley(AB)品牌的PLC因其可靠性和灵活性,广泛应用于各种生产线和机械设备中。...

    Data Integration Analyst Option 扩展 Informatica PowerCenter

    ### 数据集成分析师选项扩展Informatica PowerCenter:自助服务数据集成的关键特性与优势 #### 自助服务数据集成:提升效率与协作 **标题解读**:“Data Integration Analyst Option 扩展 Informatica PowerCenter...

    springboot-integration-examples,springboot与其他常用技术的集成.zip

    《SpringBoot与其他常用技术的集成》 在现代的软件开发中,SpringBoot因其简洁的配置、快速的开发体验以及强大的生态系统,已经成为Java开发者们的重要工具。本资源包"springboot-integration-examples"是一个开源...

    TOP接入系统(Taobao Intergration Platform)-产品需求说明书(规格最全的PRD).docx

    PRD TOP接入系统(Taobao Integration Platform)产品需求说明书详细阐述了阿里巴巴集团为商家与开发者提供的全面集成解决方案。这份文档由XXX编写,旨在定义产品的需求、目标、路线图以及潜在风险,以确保产品的成功...

    论文研究-基于动态交通仿真模型的最优路径选择方法.pdf

    采用动态交通仿真模型INTEGRATION搭建了动态交通仿真平台,应用组件式蚁群算法来求解动态交通信息诱导下的最优路径选择问题。实例表明,基于动态交通仿真模型的最优路径选择方法是可行的、正确的和有效的。...

    Telerik_OpenAccess_ORM_2012_2_607_source

    Telerik OpenAccess ORM 是一款强大的对象关系映射(ORM)框架,由Telerik公司开发,用于简化.NET应用程序中的数据访问层。2012年2月607版是该ORM工具的一个特定版本,可能包含了该时期的一些更新、修复和功能增强。...

    swing-explorer(Swing开发辅助工具)

    Swing Explorer是一款强大的Java Swing开发辅助工具,专为简化Swing GUI组件的创建、测试和调试而设计。这款工具能够帮助开发者直观地查看和编辑Swing组件,提高开发效率,减少错误,使得Swing应用的构建更加高效和...

    SQL Server 2005 Integration Service 专家教程 例程代码文件

    《SQL Server 2005 Integration Service 专家教程》是一本深入探讨SSIS(SQL Server Integration Services)的权威书籍,旨在帮助读者掌握如何利用该工具进行高效的数据集成和转换。SSIS是微软数据库管理系统SQL ...

    Expert SQL Server 2005 Integration Services

    Expert SQL Server 2005 Integration Services

Global site tag (gtag.js) - Google Analytics