通过Jython配置挂起检测策略

时间:2018-01-08 10:54:44

标签: websphere jython websphere-8 wsadmin

我想为WebSphere应用程序服务器创建一个dockerfile,以通过Jython脚本配置挂起检测策略。

我试过了:

AdminServerManagement.configureCustomProperty('DefaultNode01', 'server1', 'Administration', 'com.ibm.websphere.threadmonitor.interval', '600');

但因错误而失败:

ADMG0007E: The configuration data type Administration is not valid.

Websphere knowledge center中仅提供了UI步骤。任何人都知道如何通过脚本执行此操作?

1 个答案:

答案 0 :(得分:1)

感谢@covener,parentType'Server'可以工作。

wsadmin> AdminServerManagement.configureCustomProperty('DefaultNode01', 'server1', 'Server','com.ibm.websphere.threadmonitor.interval', '600');
---------------------------------------------------------------
 AdminServerManagement:  Configuring custom Property
 nodeName:               DefaultNode01
 serverName:             server1
 parentType:             Server
 propertyName:           com.ibm.websphere.threadmonitor.interval
 propertyValue:          600
 Optional Attributes:
     otherAttributeList  []
 Usage: AdminServerManagement.configureCustomProperty("DefaultNode01", "server1", "Server", "com.ibm.websphere.threadmonitor.interval", "600")
 Return: If the command is successful, a value of 1 is returned.
---------------------------------------------------------------

[description "The frequency, in seconds, at which managed threads in the selected application serv-er will be interrogated."]
[name com.ibm.websphere.threadmonitor.interval]
[required false]
[value 600]