您可以使用指令行介面來送出事件給事件伺服器。
傳送事件給事件伺服器。
emitevent.jacl Script 提供了指令行介面,用來送出事件給事件伺服器。您可以提供來源 XML 檔或在指令行中指定內容值,來提供事件內容。
<CommonBaseEvent creationTime=current_system_time version="1.0.1"> <sourceComponentId component="emitevent.jacl" componentIdType="Application" location=local_hostname locationType="Hostname" subComponent="com.ibm.events.cli.util.EmitEventCliHelper" componentType="http://www.ibm.com/namespaces/autonomic/Tivoli /EventInfrastructure"/> <situation categoryName="ReportSituation"> <situationType xsi:type="ReportSituation" reasoningScope="EXTERNAL" reportCategory="CLI"/> </situation> </CommonBaseEvent>
current_system_time 參數是產生事件的系統時間,指定成一項 XML dateTime 字串。
install_root/events/samples 目錄中有兩個範例 XML 檔 eventsample1.xml 和 eventsample2.xml。
wsadmin -f emitevent.jacl -severity 30 -extensionname test_event
wsadmin -f emitevent.jacl -xml ../samples/eventsample1.xml