这些API允许管理员用户添加,编辑或删除事件日志以及执行来自事件日志的操作。
该API允许管理员用户在Applications Manager中添加,编辑或删除EventLogs。
执行此API请求所涉及的参数包括:
字段 | 描述 |
---|---|
logFileName | 事件的LogFile属性 |
category | Windows或WindowsAzure的日志文件类型-EventLogs,AzureTraceLogs,AzureDiagnosticLogs |
ruletype | 日志文件的AM_RULETYPE表中的RULETYPE ID列。 |
XML -http://[ APM Host ]:[ APM Port ]/AppManager/xml/logfile?apikey=[ API Key ]&logFileName=[ Log File Name ]&category= [ EventLogs Catagory ]
JSON -http://[ APM Host ]:[ APM Port ]/AppManager/json/logfile?apikey=[ API Key ]&logFileName=[ Log File Name ]&category= [ EventLogs Catagory ]
http://app-windows:59090/AppManager/xml/logfile?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&logFileName=adminlogfile&category=EventLogs
XML - http://[ APM Host ]:[ APM Port ]/AppManager/xml/logfile?apikey=[ API Key ]&logFileName=[ Log File Name ]&ruletype= [ Rule Type]
JSON - http://[ APM Host ]:[ APM Port ]/AppManager/json/logfile?apikey=[ API Key ]&logFileName=[ Log File Name ]&ruletype= [ Rule Type ]
http://app-windows:59090/AppManager/xmlAppManager/xml/logfile?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&logFileName=newadminname&ruletype=10000
XML - http://[ APM Host ]:[ APM Port ]/AppManager/xml/logfile?apikey=[ API Key ]&ruletype=[ Type ]&TO_DELETE=[ TRUE ]
JSON - http://[ APM Host ]:[ APM Port ]/AppManager/json/logfile?apikey=[ API Key ]&ruletype=[ Type ]&TO_DELETE=[ TRUE ]
http://app-windows:59090/AppManager/xml/logfile?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&ruletype=10000&TO_DELETE=true
该API允许管理员用户在Applications Manager中执行EventLog配置。执行此API请求所涉及的参数为:
字段 | 描述 |
---|---|
rulename | 输入您选择的规则名称。 |
eventid | 输入与事件日志文件关联的事件ID |
source | 事件日志文件的来源 |
category | EventLogs类别 |
eventtype | 接受的值是
|
severity | 1,4分别表示严重和警告 |
ruletype | AM_RULETYPE表的RULETYPE ID列,用于映射到应用程序或安全事件等的日志文件。 |
status | EventLog的状态。接受的值分别是1和0,分别表示启用和禁用 |
resourceids | Windows监视器的Resourceids(支持逗号分隔的值)。 |
logCategoryName | Windows的EventLogs类别名称 |
ruleid | 规则 ID |
servertypes | 支持的Windows Monitor Server类型 |
haid | 业务组 id |
TimeFrame | 根据给定的时间窗口将告警严重级别设置为严重或警告的选项。接受的值为:
|
XML - http://[ APM Host ]:[ APM Port ]/AppManager/xml/logfile?apikey=[ API Key ]&logFileName=[ Log File Name ]&ruletype= [ Rule Type ]&..
JSON - http://[ APM Host ]:[ APM Port ]/AppManager/json/logfile?apikey=[ API Key ]&logFileName=[ Log File Name ]&ruletype= [ Rule Type ]&..
适用于所有监视器:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&rulename=addedinrestapi&eventid=121&source=&category=&username=&eventtype=0&message=&severity=1&ruletype=1&status=1&resourceids=&logCategoryName=EventLogs&applyto=allmonitor&TimeFrame=1
适用于特定的监视器类型:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&logCategoryName=WindowsEventLogs&status=1&rulename=adminmontyperestapi&rulescope=1&haid=10045&severity=1&eventid=210&resourceids=&message=-1&applyto=monitortype&ruletype=1&username=-1&category=-1&source=-1&servertypes=Windows 2000&eventtype=0&displayname=addmontype&TimeFrame=1
适用于选定的监视器:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&rulename=admintestindi&eventid=121&alsource=&category=&username=&eventtype=0&message=&severity=1&ruletype=1&status=1&resourceids=10000097,10000100,20000076,20000065&logCategoryName=EventLogs&applyto=monitorlist&TimeFrame=1
适用于组的监视器:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&prerulestatus=&logCategoryName=WindowsEventLogs&status=1&rulename=adminhaid&rulescope=1&haid=10056&severity=1&eventid=210&message=-1&applyto=monitorgroup&ruletype=1&username=-1&category=-1&source=-1&servertypes=&savetype=new&eventtype=0&TimeFrame=1
更改高级选项:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&logCategoryName=EventLogs&status=1&rulename=newname&severity=1&eventid=121&resourceids=&message=testdesc1&applyto=monitorlist&category=testcatecategory1&username=testuser1&ruletype=1&source=testsource1&ruleid=10003&eventtype=1&displayname=newname&TimeFrame=1
更改事件类型:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&eventtype=3&ruleid=10004&TimeFrame=1
更改严重级别:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&severity=4&ruleid=10004&TimeFrame=1
更改应用选项:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&severity=4&ruleid=10004&applyto=monitorlist&resourceids=10000094&TimeFrame=1
http://app-windows:59090/AppManager/xml/logrulet?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&severity=4&ruleid=10005&applyto=monitorgroup&haid=10056&TimeFrame=1
监视器类型添加/删除:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&type=monitortype&action=add&servertypes=Windows 2012&ruleid=10006&TimeFrame=1
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&type=monitortype&action=remove&servertypes=Windows 2012&ruleid=10006&TimeFrame=1
要从规则中添加/删除监视器:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&action=add&resourceids=100001&ruleid=10007&type=monitorlist&TimeFrame=1
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&action=remove&resourceids=10000097&ruleid=10007&type=monitorlist&TimeFrame=1
变更状态:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&action=changestatus&ruleids=10000003,10000002&status=disable&TimeFrame=1
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&action=changestatus&ruleids=10000003,10000002&status=enable&TimeFrame=1
删除日志规则:
http://app-windows:59090/AppManager/xml/logrule?apikey=f87f10d80b6addd2b247c0b0b67b0f9a&action=changestatus&ruleids=10000003,10000002&status=disable