CollHostSoapHelperSeparatedKpi.java 1.58 KB
package com.sitech.ismp.coll.tivoli;
/**
 * 用于组装soap发送的数据,原来的CollHostSoapHelper数据组装的过于多。
 * 因为担心class和src可能不一致,因此未封装到一起。
 * 
 * @author zhurz
 *
 */
public class CollHostSoapHelperSeparatedKpi {
	private static String USER ="sysadmin";
	private static String PASSWORD= SoapParam.getString("PASS");
	public static String getSoap_cpu_Busy(String host_name)
	{
		StringBuffer result = new StringBuffer();
		
		String OBJECT="SMP_CPU";
		
		result.append("	<CT_Get>                                  ");
		//result.append("		<hub>"+HUB_NAME+"</hub>    			  ");
		result.append("		<object>"+OBJECT+"</object>  		  ");
		result.append("	    <target>"+host_name+":KUX</target>	  ");
		result.append("		<userid>"+USER+"</userid> 			  ");
		result.append("		<password>"+PASSWORD+"</password>     ");
		result.append("		<history>N</history>                  ");

		//attributes
		//result.append("		<attribute>	System_Name	</attribute>  ");
		//result.append("		<attribute>	Timestamp	</attribute>  ");
		
		//result.append("		<attribute>	CPU_ID	</attribute>      ");
		
		//result.append("		<attribute>	User_CPU	</attribute>  ");
		//result.append("		<attribute>	System_CPU	</attribute>  ");
		//result.append("		<attribute>	Idle_CPU	</attribute>  ");
		//result.append("		<attribute>	Wait_I/O	</attribute>  ");
		result.append("		<attribute>	CPU_Busy	</attribute>  ");
		//result.append("		<afilter>CPU_ID;EQ;aggregate</afilter>  ");
		
		result.append("	</CT_Get>                                 ");
		
		return result.toString();
	}
	
}