可使用命令行界面将事件提交至事件服务器。
将事件发送到事件服务器。
emitevent.jacl 脚本提供了一个将事件提交到事件服务器的命令行界面。您可以通过提供一个 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