ddos 新增ddos协议跟流量阈值的下发,日志流量统计默认保护dddos

This commit is contained in:
zhanghongqing
2018-10-18 10:11:38 +08:00
parent f17fe56c9d
commit b201c7a520
7 changed files with 97 additions and 3 deletions

View File

@@ -56,6 +56,16 @@ public class InlineIp {
private Date opTime;
@Expose
private Integer policyGroup;
@Expose
private String userRegion;//用于存储协议跟流量阀值
public String getUserRegion() {
return userRegion;
}
public void setUserRegion(String userRegion) {
this.userRegion = userRegion;
}
/**
* action
* @return action

View File

@@ -22,6 +22,28 @@ public class DdosIpCfg extends BaseIpCfg {
*/
private static final long serialVersionUID = -5446903784736960824L;
private String antiddosProtocol;//目前支持TCP_SYN, DNS, NTP
private Long bpsThreadshold;// 即DDoS攻击保护动作触发阈值每秒Bit数和每秒包数
private Long ppsThreadshold;
public String getAntiddosProtocol() {
return antiddosProtocol;
}
public void setAntiddosProtocol(String antiddosProtocol) {
this.antiddosProtocol = antiddosProtocol;
}
public Long getBpsThreadshold() {
return bpsThreadshold;
}
public void setBpsThreadshold(Long bpsThreadshold) {
this.bpsThreadshold = bpsThreadshold;
}
public Long getPpsThreadshold() {
return ppsThreadshold;
}
public void setPpsThreadshold(Long ppsThreadshold) {
this.ppsThreadshold = ppsThreadshold;
}
}

View File

@@ -59,6 +59,9 @@ public class DdosLogController extends BaseController{
params.put("pageNo", page.getPageNo());
if(entry!=null&&entry.getIsBlock()!=null) {
params.put("searchIsBlock", entry.getIsBlock());
}else {
entry.setIsBlock(1);//默认保护ddos日志
params.put("searchIsBlock", entry.getIsBlock());
}
//查询值判断
initLogSearchValue(entry,params);

View File

@@ -34,6 +34,9 @@
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
<result column="antiddos_protocol" property="antiddosProtocol" jdbcType="VARCHAR" />
<result column="bps_threadshold" property="bpsThreadshold" jdbcType="BIGINT" />
<result column="pps_threadshold" property="ppsThreadshold" jdbcType="BIGINT" />
</resultMap>
<sql id="columns">
@@ -42,7 +45,7 @@
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable
,r.area_effective_ids,r.function_id,r.cfg_region_code
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.antiddos_protocol,r.bps_threadshold,r.pps_threadshold
</sql>
<select id="findPage" resultMap="ddosIpCfgMap">
@@ -213,7 +216,10 @@
dest_port,
dest_ip_address,
cfg_type,
cfg_region_code
cfg_region_code,
antiddos_protocol,
bps_threadshold,
pps_threadshold
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
@@ -245,7 +251,10 @@
#{destPort,jdbcType=VARCHAR},
#{destIpAddress,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER}
#{cfgRegionCode,jdbcType=INTEGER},
#{antiddosProtocol,jdbcType=VARCHAR},
#{bpsThreadshold,jdbcType=BIGINT},
#{ppsThreadshold,jdbcType=BIGINT}
)
</insert>
@@ -340,6 +349,9 @@
<if test="cfgRegionCode != null " >
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
</if>
antiddos_protocol = #{antiddosProtocol,jdbcType=VARCHAR},
bps_threadshold = #{bpsThreadshold,jdbcType=BIGINT},
pps_threadshold = #{ppsThreadshold,jdbcType=BIGINT}
</trim>
</set>
<where>