diff --git a/collector/src/main/java/org/dromara/hertzbeat/collector/collect/common/cache/CacheIdentifier.java b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/common/cache/CacheIdentifier.java index fa192388d05..7e838fd705e 100644 --- a/collector/src/main/java/org/dromara/hertzbeat/collector/collect/common/cache/CacheIdentifier.java +++ b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/common/cache/CacheIdentifier.java @@ -37,6 +37,8 @@ public class CacheIdentifier { private String username; private String password; + + private String customArg; @Override public String toString() { @@ -44,6 +46,7 @@ public String toString() { "ip='" + ip + '\'' + ", port='" + port + '\'' + ", username+password=>hash='" + Objects.hash(username, password) + '\'' + + ", customArg='" + customArg + '\'' + '}'; } } diff --git a/collector/src/main/java/org/dromara/hertzbeat/collector/collect/redis/RedisCommonCollectImpl.java b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/redis/RedisCommonCollectImpl.java index e799072764e..b067ee68c1d 100644 --- a/collector/src/main/java/org/dromara/hertzbeat/collector/collect/redis/RedisCommonCollectImpl.java +++ b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/redis/RedisCommonCollectImpl.java @@ -298,6 +298,7 @@ private CacheIdentifier doIdentifier(RedisProtocol redisProtocol) { .port(redisProtocol.getPort()) .username(redisProtocol.getUsername()) .password(redisProtocol.getPassword()) + .customArg(redisProtocol.getPattern()) .build(); }