이벤트 선택자는 이벤트 세트를 정의합니다.
이벤트 선택자는 등록 정보 데이터(속성 또는 하위 요소)에 따라 이벤트 세트를 정의하는 일반 표현식입니다. 예를 들어, 이벤트 선택자는 심각도가 30(경고)보다 큰 특정 호스트의 모든 이벤트를 지정할 수 있습니다. 이벤트 선택자는 이벤트 그룹을 정의하고 필터 기준을 지정하며 이벤트 서버를 조회하는 데 사용됩니다.
공통 기본 이벤트 스펙은 XML을 기반으로 하므로, 이벤트 선택자는 XPath 구문 서브세트를 사용하여 작성됩니다. 이벤트 선택자에 사용할 수 있는 특정 구문은 다음 테이블에 요약된 대로 이벤트 선택자가 사용되는 방법에 따라 달라집니다.
이벤트 선택자 목적 | 구문 |
---|---|
이벤트 그룹 정의 | 기본 데이터스토어 플러그인이 지원하는 XPath 서브세트로 제한됩니다. |
이벤트 액세스 인터페이스를 통한 이벤트 조회 및 제거 | 기본 데이터스토어 플러그인이 지원하는 XPath 서브세트로 제한됩니다. |
이미터 필터 구성 | 유효한 모든 XPath |
공고 헬퍼 인터페이스를 통한 등록 | 유효한 모든 XPath |
XPath는 XML 문서의 파트를 식별하기 위해 사용되는 표준 언어입니다. 자세한 정보는 http://www.w3.org/TR/xpath에서 XPath 스펙을 참조하십시오.
CommonBaseEvent[@attribute = value]value는 숫자값 또는 작은따옴표나 큰따옴표로 묶인 문자열일 수 있습니다
CommonBaseEvent[/subelement/@attribute = value]
XPath 운영자를 사용할 경우 다음 일반 규칙을 기억하십시오.
다음 예는 유효한 XPath 이벤트 선택자입니다.
XPath 이벤트 선택자 | 선택자 정의 |
---|---|
CommonBaseEvent[@extensionName = 'ApplicationStarted'] | extensionName 속성 ApplicationStarted가 있는 모든 이벤트 |
CommonBaseEvent[sourceComponentId/ @location = "server1"] | location 속성 server1이 있는 sourceComponentId 요소가 포함된 모든 이벤트 |
CommonBaseEvent[@severity] | 값과 관계 없이 severity 속서이 있는 모든 이벤트 |
CommonBaseEvent[@creationTime < '2003-12-10T12:00:00-05:00' and @severity > 30] | 2003년 12월 10일에 EST로 정오 전에 작성된 심각도가 30보다 큰(경고) 모든 이벤트: |
CommonBaseEvent[contains(@msg, 'disk full')] | msg 속성 내에서 디스크 공간 없음 문구가 발생하는 모든 이벤트 |
CommonBaseEvent[(@severity = 30 or @severity = 50) and @priority = 100] | severity 속성이 30 또는 50이고 priority가 100인 모든 이벤트 |
CommonBaseEvent[30 < @priority and contains('this message', @msg)]대신 다음과 같이 다시 쓸 수 있습니다.
CommonBaseEvent[@priority > 30 and contains(@msg, 'this message')]
CommonBaseEvent[predicate_expression]단일 술부 표현식만이 CommonBaseEvent 요소와 연관될 수 있습니다. 스택 술부는 지원되지 않습니다(예: CommonBaseEvent[@extensionName = "server_down"][@severity = 10]).
CommonBaseEvent[contextDataElement[@contextValue = "myContextValue"] /@contextId = "myContextId"]대신 다음과 같이 다시 쓸 수 있습니다.
CommonBaseEvent[contextDataElement[@contextValue = "myContextValue" and @contextId = "myContextId"]]
CommonBaseEvent[extendedDataElements[@type = 'int' and children/@type = 'intArray' and children/@name = 'myName' and @value = 10]]대신 맨 위 레벨과 두 번째 레벨 속성을 함께 그룹화하여 다음과 같이 다시 쓸 수 있습니다.
CommonBaseEvent[extendedDataElements[@type = 'int' and @value = 10 and children/@type = 'intArray' and children/@type = 'myName']]
CommonBaseEvent[extendedDataElements[values = "myVal" and @type = "string"]]
CommonBaseEvent[extendedDataElements[(values = "myVal" or values = "yourVal") and @type = "string"]]이 예에서 유형 표현식은 괄호에 있는 복합 표현식의 두 개 파트에 모두 적용됩니다. 괄호 안에 다른 유형 표현식을 지정하여 대체할 수 있습니다.
CommonBaseEvent[extendedDataElements[values = "myVal" and starts-with(@type, 'string')]]
최종 갱신: Fri Jun 2 2006
(c) Copyright IBM Corporation 2005.
이 Information Center는 Eclipse 기술을 기반으로 합니다. (http://www.eclipse.org)