13693261870
2024-09-02 7d1535b74b9c27411bc45b695675b335c30f3c3a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package com.wgcloud.config;
 
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
 
@Data
@Configuration
@ConfigurationProperties(prefix = "mail")
public class MailConfig {
 
 
    private Double memWarnVal = 98d;
    private Double cpuWarnVal = 98d;
    private String memWarnMail;
    private String cpuWarnMail;
    private String hostDownWarnMail;
    private String appDownWarnMail;
    private String heathWarnMail;
    private String allWarnMail;
 
 
    public Double getMemWarnVal() {
        if (memWarnVal == null) {
            return 98d;
        }
        return memWarnVal;
    }
 
    public void setMemWarnVal(Double memWarnVal) {
        this.memWarnVal = memWarnVal;
    }
 
    public Double getCpuWarnVal() {
        if (cpuWarnVal == null) {
            return 98d;
        }
        return cpuWarnVal;
    }
 
    public void setCpuWarnVal(Double cpuWarnVal) {
        this.cpuWarnVal = cpuWarnVal;
    }
 
    public String getMemWarnMail() {
        if (StringUtils.isEmpty(memWarnMail)) {
            return "true";
        }
        return memWarnMail;
    }
 
    public void setMemWarnMail(String memWarnMail) {
        this.memWarnMail = memWarnMail;
    }
 
    public String getCpuWarnMail() {
        if (StringUtils.isEmpty(cpuWarnMail)) {
            return "true";
        }
        return cpuWarnMail;
    }
 
    public void setCpuWarnMail(String cpuWarnMail) {
        this.cpuWarnMail = cpuWarnMail;
    }
 
    public String getHostDownWarnMail() {
        if (StringUtils.isEmpty(hostDownWarnMail)) {
            return "true";
        }
        return hostDownWarnMail;
    }
 
    public void setHostDownWarnMail(String hostDownWarnMail) {
        this.hostDownWarnMail = hostDownWarnMail;
    }
 
    public String getAppDownWarnMail() {
        if (StringUtils.isEmpty(appDownWarnMail)) {
            return "true";
        }
        return appDownWarnMail;
    }
 
    public void setAppDownWarnMail(String appDownWarnMail) {
        this.appDownWarnMail = appDownWarnMail;
    }
 
    public String getHeathWarnMail() {
        if (StringUtils.isEmpty(heathWarnMail)) {
            return "true";
        }
        return heathWarnMail;
    }
 
    public void setHeathWarnMail(String heathWarnMail) {
        this.heathWarnMail = heathWarnMail;
    }
 
    public String getAllWarnMail() {
        if (StringUtils.isEmpty(allWarnMail)) {
            return "true";
        }
        return allWarnMail;
    }
 
    public void setAllWarnMail(String allWarnMail) {
        this.allWarnMail = allWarnMail;
    }
}