String port = mbean.getKeyProperty("name"); try { String objName = conf.getObjName() + "/" + checkObjName(port); String objType = getReqProcType(); AgentHeartBeat.addObject(objType, HashUtil.hash(objName), objName); add(objName, mbean, objType, ValueEnum.DECIMAL, "bytesReceived", CounterConstants.REQUESTPROCESS_BYTES_RECEIVED); add(objName, mbean, objType, ValueEnum.DECIMAL, "bytesSent", CounterConstants.REQUESTPROCESS_BYTES_SENT); add(objName, mbean, objType, ValueEnum.DECIMAL, "errorCount", CounterConstants.REQUESTPROCESS_ERROR_COUNT); add(objName, mbean, objType, ValueEnum.DECIMAL, "processingTime", CounterConstants.REQUESTPROCESS_PROCESSING_TIME); add(objName, mbean, objType, ValueEnum.DECIMAL, "requestCount", CounterConstants.REQUESTPROCESS_REQUEST_COUNT); } catch (Exception e) { String objName = conf.getObjName() + "/" + checkObjName(name); String objType = getDataSourceType(); AgentHeartBeat.addObject(objType, HashUtil.hash(objName), objName); add(objName, mbean, objType, ValueEnum.DECIMAL, "numActive", CounterConstants.DATASOURCE_CONN_ACTIVE); add(objName, mbean, objType, ValueEnum.DECIMAL, "numIdle", CounterConstants.DATASOURCE_CONN_IDLE); add(objName, mbean, objType, ValueEnum.DECIMAL, "maxActive", CounterConstants.DATASOURCE_CONN_MAX); add(objName, mbean, objType, ValueEnum.DECIMAL, "maxTotal", CounterConstants.DATASOURCE_CONN_MAX);
getMBeanServer(); if ((collectCnt <= 40 && collectCnt % 5 == 0) || ObjTypeDetector.dirtyConfig) { if (ObjTypeDetector.dirtyConfig) { ObjTypeDetector.dirtyConfig = false; getMBeanList(); long v = CastUtil.clong(server.getAttribute(beanObj.mbean, beanObj.attrName)); if (deltas.contains(beanObj.counter)) { v = getDelta(key, v); MeterResource meter = getMeter(key); meter.add(v); v = (long) meter.getSum(60); pw.getPack(beanObj.objName, TimeTypeEnum.FIVE_MIN).add(beanObj.counter, new DecimalValue(sum)); } else { MeterResource meter = getMeter(key); meter.add(v); double avg = meter.getAvg(300);
getMBeanServer(); if ((collectCnt <= 40 && collectCnt % 5 == 0) || ObjTypeDetector.dirtyConfig) { if (ObjTypeDetector.dirtyConfig) { ObjTypeDetector.dirtyConfig = false; getMBeanList(); long v = CastUtil.clong(server.getAttribute(beanObj.mbean, beanObj.attrName)); if (deltas.contains(beanObj.counter)) { v = getDelta(key, v); MeterResource meter = getMeter(key); meter.add(v); v = (long) meter.getSum(60); pw.getPack(beanObj.objName, TimeTypeEnum.FIVE_MIN).add(beanObj.counter, new DecimalValue(sum)); } else { MeterResource meter = getMeter(key); meter.add(v); double avg = meter.getAvg(300);
getMBeanServer(); if ((collectCnt <= 40 && collectCnt % 5 == 0) || ObjTypeDetector.dirtyConfig) { if (ObjTypeDetector.dirtyConfig) { ObjTypeDetector.dirtyConfig = false; getMBeanList(); long v = CastUtil.clong(server.getAttribute(beanObj.mbean, beanObj.attrName)); if (deltas.contains(beanObj.counter)) { v = getDelta(key, v); MeterResource meter = getMeter(key); meter.add(v); v = (long) meter.getSum(60); pw.getPack(beanObj.objName, TimeTypeEnum.FIVE_MIN).add(beanObj.counter, new DecimalValue(sum)); } else { MeterResource meter = getMeter(key); meter.add(v); double avg = meter.getAvg(300);
String port = mbean.getKeyProperty("name"); try { String objName = conf.getObjName() + "/" + checkObjName(port); String objType = getReqProcType(); AgentHeartBeat.addObject(objType, HashUtil.hash(objName), objName); add(objName, mbean, objType, ValueEnum.DECIMAL, "bytesReceived", CounterConstants.REQUESTPROCESS_BYTES_RECEIVED); add(objName, mbean, objType, ValueEnum.DECIMAL, "bytesSent", CounterConstants.REQUESTPROCESS_BYTES_SENT); add(objName, mbean, objType, ValueEnum.DECIMAL, "errorCount", CounterConstants.REQUESTPROCESS_ERROR_COUNT); add(objName, mbean, objType, ValueEnum.DECIMAL, "processingTime", CounterConstants.REQUESTPROCESS_PROCESSING_TIME); add(objName, mbean, objType, ValueEnum.DECIMAL, "requestCount", CounterConstants.REQUESTPROCESS_REQUEST_COUNT); } catch (Exception e) { String objName = conf.getObjName() + "/" + checkObjName(name); String objType = getDataSourceType(); AgentHeartBeat.addObject(objType, HashUtil.hash(objName), objName); add(objName, mbean, objType, ValueEnum.DECIMAL, "numActive", CounterConstants.DATASOURCE_CONN_ACTIVE); add(objName, mbean, objType, ValueEnum.DECIMAL, "numIdle", CounterConstants.DATASOURCE_CONN_IDLE); add(objName, mbean, objType, ValueEnum.DECIMAL, "maxActive", CounterConstants.DATASOURCE_CONN_MAX); add(objName, mbean, objType, ValueEnum.DECIMAL, "maxTotal", CounterConstants.DATASOURCE_CONN_MAX);
String port = mbean.getKeyProperty("name"); try { String objName = conf.getObjName() + "/" + checkObjName(port); String objType = getReqProcType(); AgentHeartBeat.addObject(objType, HashUtil.hash(objName), objName); add(objName, mbean, objType, ValueEnum.DECIMAL, "bytesReceived", CounterConstants.REQUESTPROCESS_BYTES_RECEIVED); add(objName, mbean, objType, ValueEnum.DECIMAL, "bytesSent", CounterConstants.REQUESTPROCESS_BYTES_SENT); add(objName, mbean, objType, ValueEnum.DECIMAL, "errorCount", CounterConstants.REQUESTPROCESS_ERROR_COUNT); add(objName, mbean, objType, ValueEnum.DECIMAL, "processingTime", CounterConstants.REQUESTPROCESS_PROCESSING_TIME); add(objName, mbean, objType, ValueEnum.DECIMAL, "requestCount", CounterConstants.REQUESTPROCESS_REQUEST_COUNT); } catch (Exception e) { String objName = conf.getObjName() + "/" + checkObjName(name); String objType = getDataSourceType(); AgentHeartBeat.addObject(objType, HashUtil.hash(objName), objName); add(objName, mbean, objType, ValueEnum.DECIMAL, "numActive", CounterConstants.DATASOURCE_CONN_ACTIVE); add(objName, mbean, objType, ValueEnum.DECIMAL, "numIdle", CounterConstants.DATASOURCE_CONN_IDLE); add(objName, mbean, objType, ValueEnum.DECIMAL, "maxActive", CounterConstants.DATASOURCE_CONN_MAX); add(objName, mbean, objType, ValueEnum.DECIMAL, "maxTotal", CounterConstants.DATASOURCE_CONN_MAX);