2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.common.monitoring;
23 import org.openecomp.sdc.common.datastructure.ESTimeBasedEvent;
25 public class MonitoringEvent extends ESTimeBasedEvent {
27 private static final String MONITORING_EVENT_TEMPLATE = "hostid=\"%s\" hostcpu=\"%s\" hostmem=\"%s\" hostdisk=\"%s\" " + "jvmid=\"%s\" jvmcpu=\"%s\" jvmmem=\"%s\" jvmtnum=\"%s\" " + "appid=\"%s\" appstat=\"%s\"";
29 private String hostid;
31 private Double hostmem;
32 private String hostdisk;
36 private Integer jvmtnum;
38 private String appstat;
40 public String getHostid() {
44 public void setHostid(String hostid) {
48 public Long getHostcpu() {
52 public void setHostcpu(Long hostcpu) {
53 this.hostcpu = hostcpu;
56 public Double getHostmem() {
60 public void setHostmem(Double hostmem) {
61 this.hostmem = hostmem;
64 public String getHostdisk() {
68 public void setHostdisk(String hostdisk) {
69 this.hostdisk = hostdisk;
72 public String getJvmid() {
76 public void setJvmid(String jvmid) {
80 public Long getJvmcpu() {
84 public void setJvmcpu(Long jvmcpu) {
88 public Long getJvmmem() {
92 public void setJvmmem(Long jvmmem) {
96 public Integer getJvmtnum() {
100 public void setJvmtnum(Integer jvmtnum) {
101 this.jvmtnum = jvmtnum;
104 public String getAppid() {
108 public void setAppid(String appid) {
112 public String getAppstat() {
116 public void setAppstat(String appstat) {
117 this.appstat = appstat;
121 public String toString() {
122 return getFormattedString(MONITORING_EVENT_TEMPLATE, hostid, hostcpu, hostmem, hostdisk, jvmid, jvmcpu, jvmmem, jvmtnum, appid, appstat);